Sunday, June 8, 2008

Cutting down the power consumption od Dell Latitude D630 under Ubuntu

Running Gentoo on my laptop had it's pros and cons. I had a fully customized system, on the other hand I needed to learn more to have it that way. So I given a chance to Ubuntu (Hardy Heron).

Using laptop, I take it's power consumption quite seriously. With less power consumption, I can work (or watch movies, listen to music etc.) longer on my journeys. And since most of the power turns into heat, less consumption also makes using the computer more pleasant. Intel, who made the horrible and nearly always wrongly implemented by the PC vendors ACPI, also made a nice piece of software — PowerTop. This utility can show you, how much does the system drain the battery and what are the main reasons for high power usage.

On Gentoo, with all the power saving features my power usage was about 20W, giving me over 3 hours of work. On Ubuntu, it was 30W. That's a big difference. Interesting was the CPU was nearly on idle, so the problem had to be somewhere else.

I read about ACPI problems all the time and I know there are some with my laptop. I even patched the DSDT table on Gentoo (being lead by how-to). And there were some ACPI errors in the system log. So I tried doing the same under Ubuntu, what if that's what's causing the problem. There is substantially lower amount of nice how-tos for Ubuntu, maybe for Ubuntu people such problems don't happen. But fortunately there are different problems with similar solution, which we can use.

I don't want to make this long, so yes, it worked, there are no ACPI errors in my log now and the power usage is where it is under Gentoo. And here's my how-to based on Gentoo D630 how-to and Ubuntu ACPI Battery how-to. It should apply for Hardy Heron, things can be different in the future or were different in the past:

  1. Download the DSDT table for Dell D630 (even though it has a gzip extension, it's a plain-text file so don't bother uncompressing it) from address:
  2. Install the essential packages for compilation under Ubuntu and the iASL compiler:
    sudo apt-get install build-essential iasl
  3. Go to the directory you downloaded the DSDT table two and compile it using iasl:
    iasl Dell-Latitude_D630-A03-original.asl.gz
  4. There shouldn't be any errors and you should end up with dsdt.aml file. You need to copy it to /etc/initramfs-tools/ directory using name DSDT.aml (you should mind the caps):
    sudo cp dsdt.aml /etc/initramfs-tools/DSDT.aml
  5. Now you have to reconfigure the kernel to use the new DSDT table. When you upgrade the kernel in the future, this should happen automatically:
    sudo dpkg-reconfigure linux-image-$(uname -r)
  6. Now you have to restart your computer (I bet you don't do that much). Your system log should miss some ACPI errors and state something about loading a DSDT table.

Well, that's all, let's save the electric power together!

No comments: