Powermanagement on the IBM T41
APM or ACPI? Which technology offers the best battery life using Linux and my Thinkpad? I did some extensive tests, and found the following:
- (properly configured) ACPI gives you longer battery life than APM.
- However, display brightness is by far the biggest factor in battery life.
- laptop mode has no impact.
- Windows XP + IBM's own drivers still have a small advantage.
- The experimental patch adding ATI Powerplay support to the XFree/Xorg radeon driver offers significant savings.
Test Methodology
There is no free battery benchmark available, not even mentioning a cross platform one. So often people just measure the battery life when idle. This has the advantage that the test then stresses the power savings that one can gain by lowering clock frequencies and voltages, but of course it is a purely synthetic benchmark: If you would not want to use your notebook you could just shut it down and enjoy infinite battery life.
To get meaningful numbers, I simulate a user browsing the web: Using refresh and redirects I let mozilla load a new webpage every 15 seconds. This is a somewhat realistic light load scenario, and it is completely cross platform.
To get reproducible results I performed the tests disconnected from the network and without the ipw2100 (centrino wireless) driver loaded (which to my knowledge does not yet support power management).
Results
Here is the most important result, the comparison Linux/APM, Linux/ACPI and WinXP/ACPI. In each case the display brightness was set to maximum, and the 6-cell battery was used. If you want to know the results for the larger 9-cell battery, multiply by 3/2.
Windows XP | 3h 33m | |
Linux/ACPI, laptop mode, ATI Powerplay | 3h 9m | |
Linux/ACPI, laptop mode, std. radeon | 2h 39m | |
Linux/ACPI, without laptop mode, std. radeon | 2h 38m | |
Linux/APM, without laptop mode, std. radeon | 2h 21m |
The default Fedora Core 2 radeon Xorg driver is denoted by "std. radeon", while for the second test above "ATI Powerplay" means that I used the patched drivers as detailed below.
Display Brightness
So far, I always set the display brightness to maximum. Personally, I use this always. But how much is saved by dimming the backlight? Here is the comparison for Linux/ACPI with laptop mode and the default Xorg drivers:
Linux/ACPI, maximal brightness | 2h 39m | |
Linux/ACPI, minimal brightness | 3h 30m |
Dimming the display is the most effective way to prolong your battery life, period.
My ACPI Configuration
Note: The following is just for reference, if you want to configure your own thinkpad you should use Fedora Core 3 which includes Xorg 6.8.1. The powerplay patches are then already included. The name of the "DynamicPM" option for the xorg.conf was changed to "Dynamicclocks". You can use my kernel rpm package which includes swsusp2.
My system is based on Fedora Core 2, which works already quite well out of the box. But of course I want to tweak the configuration to maximize battery life:
I am using kernel 2.6.6 with the swsusp2 patch. Suspend/resume works fine apart from USB (which I am not using at the moment). Here is my kernel config.
My kernel configuration compiles the enhanced speedstep support directly into the kernel, but for optimal power savings we want to use a userspace governor. This is a demon that adjusts the CPU speed according to demand. I am using cpuspeed, which is already part of FC2. Here is my /etc/cpuspeed.conf.
My T41 2379DJU uses the ATI Radeon Mobility 9000 chipset, and the following applies only to this chip. Alex Deutcher's ATI Powerplay support is not yet integrated into the current X.org release. If you do not want to recompile X then you can just download my /usr/X11R6/lib/modules/drivers/radeon_drv.o and /usr/X11R6/lib/modules/drivers/ati_drv.o. Be sure to make a backup of your current drivers before overwriting them. To enable the power management place
Option "DynamicPM" "True"
Just to reiterate, Xorg > 6.8.1 contains already all necessary patches, and the name of the option was changed to
Option "DynamicPM" "True"
in the device section of your /etc/X11/xorg.conf file. (For reference, my /etc/X11/xorg.conf).
Finally, you can enable the laptop mode in the kernel. In my tests it seems that the power savings of spinning down are amortized by the extra energy expenditure of spinning up again, but for different drives (I use a Hitachi 7K60 and a 5K80 in the ultrabay btw.) and different usages this might change. For this, follow the instructions in /usr/src/linux/Documentation/laptop-mode.txt.