Powertop is a command line utility to help you to reduce power consumption on linux laptops.The tool is written by a guy from Intel, so it probably only works on intel chipset based laptops.

I have a Intel Centrino based Thinkpad T42 so I thought I’d give it a go. If you use linux on a laptop you’re probably already aware that battery life under linux is generally worse than running Windows. I’ve always found this particularly sad given that I don’t actually run many high-resource use applications.

Initially I thought powertop did some magic to Intel chipset laptops to make them reduce power usage … but it’s actually a tool like ‘top’, but shows you what CPU related activities are using up all your power. Most laptop CPUs have logic to shutdown parts of the chip that aren’t being used in order to save power (I think this was the main thing that interested me in the Centrino platform when it came out). So generally if you have lots of interrupts waking the CPU up all the time your power usage will go up. Powertop gives you a breakdown of what is causing the interrupts. The webpage also gives you some hints about what to do about the most common ones.

For me with my T42, the most surprising things were:

– the ibm_acpi/thinkpad_acpi utility causes a lot of interrupts. This is the kernel module that you generally run on Thinkpads to control the fan and check temperatures and other useful laptop things. I thought surely it would be helping me save power. Not so. Generally I make sure its not running now (except when the fan is annoying me).

– DRI. In order to do all those 3D things in linux (ie. beryl/compiz) you usually have to set up DRI/DRM or whatever. I had done this ages ago, but I don’t actually use beryl or compiz anymore. At least for the Xorg Radeon driver, dri helps chew through the battery. So putting Option ‘NoDRI’ in xorg.conf and remove the dri loadmodule bits gets rid fo DRI.

Also of note is the backlight for the screen. Like most people I have the screen at full brightness most of the time, but stepping it down a notch or two does save quite a fair bit. Actually if your battery is getting really low and you want your machine to last that little bit further, turning your backlight right down is probably one of the easiest ways to stretch it out.

At the outset of using powertop, I followed the instructions on their website and used a kernel that was tickless and supported HPET. This has required me to use a very very new kernel (2.6.24rc3). I’m not too sure how much of a difference that in itself made.

A good feature of powertop is that it makes suggestions about lowering power and lets you turn these features on inside the program; When I first ran it it suggested putting the sound chip in powersave mode, extending the dirty_writeback time, remounting the local filesystems with noatime, setting the ondemand CPU governor and putting the kernel into laptop_mode.

Powertop also shows you the current power usage in watts (I think this only works when you are running on batteries) and an estimated time to when the battery will give out.

The Thinkwiki and the powertop site have some other suggestions including disabling USB, but I’ve found this doesn’t make that much of a difference.

So far with my efforts, my idle power usage is down around the 10Watts mark and if I’m not doing too much I can get below 10 ‘wakeups from idle per second’. 5 is about the lowest it goes for me (the powertop website suggest 3 as the ideal). With an oldish 6 cell battery I definately get over 3hrs now without doing too much heavy CPU stuff( I just got 3.25hrs before it got down to 4% battery).