Difference between revisions of "How to reduce power consumption"
m (→External resources) |
(large rewrite and details on. thanks to the powertop tips (and others)) |
||
Line 1: | Line 1: | ||
− | Reducing system power consumption will extend battery life, reduce system temperature and (on some models) reduce system fan noise. | + | {| width="100%" |
+ | |style="vertical-align:top;padding-right:20px;width:10px;" | [[Image:Gkrellm-thinkbat.png |IBM Embedded Security Subsystem]] | ||
+ | |style="vertical-align:top" | | ||
+ | <div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;"> | ||
+ | ===How to reduce power consumption=== | ||
+ | Reducing system power consumption will extend battery life, reduce system | ||
+ | temperature and (on some models) reduce system fan noise. | ||
+ | Power consumption can be greatly improved from a stock distribution configuration | ||
+ | to a fine tuned system. The general rules are : | ||
+ | * Unload drivers for unused devices (ie. USB 1.1, Yenta/PCMCIA, Wireless, IRDA, Bluetooth, ...) | ||
+ | * Reduce polling on devices (drives, USB subsystem, nvram, ...) | ||
+ | * Reduce hard drive activity | ||
+ | * Reduce LCD brightness to the minimum you can stand | ||
+ | * Reduce CPU wakeups, so it can stay longer in deep power saving c-states | ||
+ | |} | ||
+ | __TOC__ | ||
− | === | + | ==Tools== |
+ | Arjan van de Ven's [http://www.linuxpowertop.org/ PowerTOP] utility | ||
+ | is a gold mine to improve energy efficiency. This tool helps to easyly detect | ||
+ | the top power offender, and sometime suggest fixes accordingly. | ||
+ | PowerTOP users collected some [http://www.linuxpowertop.org/known.php tips & tricks] | ||
+ | and an informative [http://www.linuxpowertop.org/faq.php faq]. | ||
+ | When you see an application causing a lot of wakeups in PowerTOP, you should | ||
+ | strace it to understand what is happening. | ||
+ | |||
+ | To detect what make your disk spinning (a costly operation), | ||
+ | |||
+ | <code> | ||
+ | sysctl vm.block_dump=1 | ||
+ | </code> | ||
+ | |||
+ | will list all applications causing disks wakeups on the kernel's dmesg. | ||
+ | Other tools for this purpose are blktrace and iostat. | ||
+ | |||
+ | ==BIOS settings== | ||
+ | Some Thinkpad BIOS (like 2.08 BIOS on {{X40}}) offer two very lame options, | ||
+ | with a very misleading online help (saying "Usually not needed"). That's | ||
+ | |||
+ | <code> | ||
+ | CPU power management: (default disabled) | ||
+ | PCI bus power management: (default disabled) | ||
+ | </code> | ||
+ | |||
+ | You should indeed enable them, else the deepest C3 and C4 ACPI C-states | ||
+ | are disabled. | ||
+ | |||
+ | ==CPU== | ||
+ | Look at: | ||
+ | * [[How to make use of Dynamic Frequency Scaling]] | ||
+ | * [[Pentium M undervolting and underclocking]] | ||
+ | |||
+ | A good thing to keep in mind is that every CPU wakeup, even if it's for | ||
+ | a trivial light job, reduce the time the CPU stays on a deep power | ||
+ | saving C-state (like C3 or C4). Therefore you should ensure your applications | ||
+ | stay really idle when they meant to be idle (track to short select timeouts | ||
+ | in loop, etc.). | ||
+ | |||
+ | Also note that manually locking the CPU in the lowest P-state (frequency) | ||
+ | available is '''not''' an efficient way to improve battery lifetime. This will | ||
+ | cause the CPU to stay longer in C0 (power angry C-state) doing hard work when | ||
+ | there is something to do, while it could have done this work faster by augmenting | ||
+ | the CPU freq, and returned back faster to deeper, economic, C-state. | ||
+ | The best is to let the kernel choose the appropriate CPU frequencies by itself. | ||
+ | Have a look at [http://www.bughost.org/pipermail/power/2007-May/000166.html this explanation] | ||
+ | from Intel's kernel developer Arjan van de Ven. | ||
+ | |||
+ | ==Kernel settings and patches== | ||
+ | |||
+ | ===General settings=== | ||
+ | The 2.6.21 kernel brought some very effective changes (like dynticks). If | ||
+ | it's not already on your distribution and you value power efficiency, you | ||
+ | may think about compiling it (or a more recent one) yourself. | ||
+ | |||
+ | Here are a few options (beside the ACPI and APM related one) that matter by | ||
+ | reducing power consumption or helping to diagnose consumers, From PowerTOP's FAQ : | ||
+ | |||
+ | <code> | ||
+ | CONFIG_NO_HZ | ||
+ | CONFIG_HIGH_RES_TIMERS | ||
+ | CONFIG_HPET | ||
+ | CONFIG_CPU_FREQ_GOV_ONDEMAND | ||
+ | CONFIG_USB_SUSPEND | ||
+ | CONFIG_SND_AC97_POWER_SAVE | ||
+ | CONFIG_TIMER_STATS | ||
+ | CONFIG_ACPI_BATTERY | ||
+ | CONFIG_CPU_FREQ_STAT | ||
+ | # not from the PowerTOP FAQ: | ||
+ | CONFIG_BLK_DEV_IO_TRACE | ||
+ | CONFIG_X86_ACPI_CPUFREQ | ||
+ | CONFIG_X86_SPEEDSTEP_CENTRINO | ||
+ | CONFIG_X86_SPEEDSTEP_ICH | ||
+ | CONFIG_X86_SPEEDSTEP_SMI | ||
+ | </code> | ||
+ | |||
+ | PowerTOP FAQ also suggest to '''disable''' | ||
+ | CONFIG_IRQBALANCE et CONFIG_ACPI_DEBUG. | ||
+ | Those options are already in Fedora Core 7 and Ubuntu Gutsy default kernels. | ||
+ | |||
+ | Also, you need to properly set APM and ACPI. Look at: | ||
* [[Power Management]] | * [[Power Management]] | ||
* [[How to make use of Power Management features]] | * [[How to make use of Power Management features]] | ||
− | ===CPU=== | + | ===Useful Patchs=== |
− | + | ||
− | * [[ | + | Thomas Gleixner High Resolution Timers (hrt) patchset brings some improvements, |
+ | like the cpuidle work and Udo A. Steinberg and Venki Pallipadi "force | ||
+ | enable HPET" patches (non HPET timers causes about 20-30 CPU wakeups/second). | ||
+ | See http://www.tglx.de/projects/hrtimers/ | ||
+ | |||
+ | Kristen Carlson Accardi from Intel has a patchset to turn on Aggressive | ||
+ | Link Power Management (ALPM) for the ahci driver. See: | ||
+ | http://www.kernel.org/pub/linux/kernel/people/kristen/patches/SATA/alpm/ | ||
+ | |||
+ | ===Useful sysctls=== | ||
+ | The meaning of those settings are explained on the relevant sections of | ||
+ | this document. But for convenience sake, we regroupe them here too. | ||
+ | |||
+ | Note that the "ondemand" scaling governor is recommended by Intel developpers | ||
+ | for energy efficiency: it's expected to be more efficient than the "powersave" | ||
+ | governor, and than userspace daemon (cpureq-utils, cpufreqd, powernowd...). | ||
+ | Look [http://www.bughost.org/pipermail/power/2007-May/000071.html here], | ||
+ | [http://www.bughost.org/pipermail/power/2007-May/000073.html there] or | ||
+ | [http://www.bughost.org/pipermail/power/2007-May/000166.html here] for a | ||
+ | kernel developer explanation about "ondemand" being better on modern Intel CPUs. | ||
+ | |||
+ | The "link_power_management_policy" tunable won't be available unless you | ||
+ | run Kirsten patchset on AHCI SATA drives. | ||
+ | |||
+ | <code> | ||
+ | echo 5 > /proc/sys/vm/laptop_mode | ||
+ | echo 0 > /proc/sys/kernel/nmi_watchdog | ||
+ | echo Y > /sys/module/snd_ac97_codec/parameters/power_save | ||
+ | echo 1 > /sys/devices/system/cpu/sched_mc_power_savings | ||
+ | echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor | ||
+ | echo min_power > /sys/class/scsi_host/host0/link_power_management_policy | ||
+ | echo min_power > /sys/class/scsi_host/host1/link_power_management_policy | ||
+ | echo 1500 > /proc/sys/vm/dirty_writeback_centisecs | ||
+ | </code> | ||
+ | |||
+ | ==ATA drives== | ||
+ | Hard drives and CDRom drives spinning is very costly. To improve battery | ||
+ | lifetime, you should reduce disks access (or devices polling) the more you | ||
+ | can. | ||
+ | |||
+ | ===Hard Drives=== | ||
+ | The files access time update, while mandated by POSIX, is causing lots of | ||
+ | disks access, even for file accessed while on cache. If you don't use this | ||
+ | feature, disable it via: | ||
+ | |||
+ | <code> | ||
+ | mount -o remount,noatime / # and so on for all mounted fs | ||
+ | </code> | ||
+ | |||
+ | The laptop_mode reduce disk usage by regrouping writes. You should enable | ||
+ | it, at least while on battery. See [[Laptop-mode]] for more details: | ||
+ | |||
+ | <code> | ||
+ | echo 5 > /proc/sys/vm/laptop_mode | ||
+ | </code> | ||
+ | |||
+ | The default kernel dirty page writeback frequency is very conservative. On | ||
+ | a laptop running on battery, one might find more appropriate to reduce it: | ||
+ | |||
+ | <code> | ||
+ | echo 1500 > /proc/sys/vm/dirty_writeback_centisecs | ||
+ | </code> | ||
+ | |||
+ | Some power saving hard drives features can be activated with hdparm. | ||
+ | For more details look at [[How to make use of Power Management features]] : | ||
+ | |||
+ | <code> | ||
+ | hdparm -B 1 -S 12 /dev/sda # and/or any other disk device | ||
+ | </code> | ||
+ | |||
+ | ===Optical drive=== | ||
+ | The optical drive consumes about 1W even when not accessed.* [[How to hotswap UltraBay devices|Eject the UltraBay optical drive]], or just turn off its power supply (i.e., run the appropriate eject script but leave the drive inserted). | ||
+ | * [[How to set optical drive speed|Reduce the spinning speed of the optical drive]]. | ||
+ | |||
+ | The hald daemon polling tends to maintain the ATA buses out of power saving | ||
+ | modes, and to wakeup CDROM drive. If you have a recent hald version, you | ||
+ | can stop this polling when on battery (if your hald is not recent enough, | ||
+ | consider stopping it on battery) : | ||
+ | |||
+ | <code> | ||
+ | hal-disable-polling /dev/scd0 # or whatever your CD drive is | ||
+ | </code> | ||
+ | |||
+ | ==LCD Backlight/Brightness== | ||
+ | The LCD backlight is one of the major power drain (usually consumes | ||
+ | 5W or more at full brightness). So reducing brightness to the lowest readable | ||
+ | level will save you a lot of battery lifetime. Also, don't forget to configure | ||
+ | your screen saver to shutdown the screen backlight (and not to display some | ||
+ | eye candy), when no activity for a few minutes. | ||
+ | |||
+ | If you're choosing your Thinkpad laptop model, keep in mind that the screen | ||
+ | size affect the battery time greatly (more power needed for larger screens). | ||
+ | |||
+ | ==Graphic controllers== | ||
+ | All xorg Thinkpad graphics chipsets drivers (ati, radeon, fglrx, i810) have | ||
+ | the same bug causing very frequent CPU wakeups when DRI is activated, even | ||
+ | when you don't use any 3D application. | ||
+ | This problem is (partly) fixed on xorg git tree (but not released as of xorg | ||
+ | 7.2). If you value more battery than 3D, you should disable DRI: put this on | ||
+ | the /etc/X11/xorg.conf "Device" of you graphic controller: | ||
+ | |||
+ | <code> | ||
+ | Option "NoDRI" | ||
+ | </code> | ||
+ | |||
+ | Also be sure that DPMS is working (if not, had Option "DPMS" to your config). | ||
+ | |||
+ | On recent xrandr/xorg versions, you can disable the TV output when you're | ||
+ | not using it, it saves about 1W: | ||
+ | |||
+ | <code> | ||
+ | xrandr --output TV -off | ||
+ | </code> | ||
− | + | See also: | |
* [[How to make use of Graphics Chips Power Management features]] | * [[How to make use of Graphics Chips Power Management features]] | ||
* [[Problem with high power drain in ACPI sleep]] | * [[Problem with high power drain in ACPI sleep]] | ||
Line 17: | Line 226: | ||
* Disable CRT output (~0.5W difference) | * Disable CRT output (~0.5W difference) | ||
− | === | + | ==USB Subsystem== |
− | + | The kernel support an efficient USB 2.0 power saving feature if you enabled | |
− | + | CONFIG_USB_SUSPEND. This may not trigger in when you have an USB device | |
− | + | plugged (and beside, USB devices tends to suck power on their own), so avoid | |
+ | using such devices when on battery. | ||
+ | |||
+ | USB 1.1 is worst. It needs polling the bus frequently, hence can't really go | ||
+ | in a low power mode when you enabled it, even if you don't have any device | ||
+ | plugged. You'd better remove it when you don't use a 1.1 device: | ||
+ | |||
+ | <code> | ||
+ | rmmod uhci_hcd | ||
+ | </code> | ||
+ | |||
+ | If you don't intend to use any USB 1.1 only device (those tends to be rare | ||
+ | anyway), the USB 1.1 support can also be totaly avoided. On Debian and | ||
+ | derivatives, just do: | ||
+ | |||
+ | <code> | ||
+ | echo "blacklist uhci_hcd" > /etc/modprobe.d/blacklist. | ||
+ | </code> | ||
+ | |||
+ | ==Sound== | ||
+ | ALSA has a power saving feature that should be enabled on your kernel | ||
+ | (CONFIG_SND_AC97_POWER_SAVE). Note that this low power mode won't trigger in | ||
+ | unless you muted all sound inputs (micro, line in etc.). This feature has | ||
+ | to be activated with: | ||
+ | |||
+ | <code> | ||
+ | echo Y > /sys/module/snd_ac97_codec/parameters/power_save | ||
+ | </code> | ||
+ | |||
+ | Seel also [[How to enable AC97 power saving]]. | ||
− | == | + | ==Wireless Interface== |
− | + | Wireless network Consumes up to ~4W. | |
− | * | + | To save power, you can kill the Wi-Fi radio when it's not in use: |
− | + | ||
+ | <code> | ||
+ | echo 1 > /sys/bus/pci/drivers/ipw2200/*/rf_kill | ||
+ | </code> | ||
+ | |||
+ | If you need Wi-Fi, you can also reduce power consumption (at the price of | ||
+ | performances) by activating the power saving modes: | ||
+ | |||
+ | <code> | ||
+ | iwpriv eth0 set_power 5 # or 7 (even more saving, less perfs) | ||
+ | </code> | ||
− | + | Reducing Beacon intervals on your Access Point to 1 per second will also | |
− | + | reduce network card interrupts, and helps power savings. | |
− | |||
− | + | * See also, to activate power saving on the wireless network card: | |
− | |||
− | |||
** For [[Intel PRO/Wireless 2200BG Mini-PCI Adapter]] and [[Intel PRO/Wireless 2915ABG Mini-PCI Adapter]], see instructions for the [[ipw2200]] driver. | ** For [[Intel PRO/Wireless 2200BG Mini-PCI Adapter]] and [[Intel PRO/Wireless 2915ABG Mini-PCI Adapter]], see instructions for the [[ipw2200]] driver. | ||
** For [[Intel PRO/Wireless 3945ABG Mini-PCI Express Adapter]], see the [http://ipw3945.sourceforge.net/README.ipw3945 ipw3945 driver README] | ** For [[Intel PRO/Wireless 3945ABG Mini-PCI Express Adapter]], see the [http://ipw3945.sourceforge.net/README.ipw3945 ipw3945 driver README] | ||
− | == | + | ==Ethernet Controler== |
− | + | If you don't use Wake-on-LAN, you should disable it for your network card, | |
− | + | because it sucks a lot of power: | |
− | + | <code> | |
− | + | ethtool -s eth0 wol d | |
− | + | </code> | |
− | == | + | If you can, try to reduce useless network activity coming to your NIC |
+ | (ie. uneeded broadcasts), those cause interrupts and CPU wakeups. | ||
+ | |||
+ | ==Bluetooth== | ||
+ | When you don't need bluetooth, disable it. Because of it's radio, | ||
+ | bluetooth is not power friendly. | ||
+ | |||
+ | <code> | ||
+ | hciconfig hci0 down ; rmmod hci_usb | ||
+ | </code> | ||
+ | |||
+ | ==System Fans== | ||
+ | Consumes about 0.5W when running. | ||
+ | * [[ACPI fan control script]] | ||
+ | |||
+ | ==Misbehaving Userland== | ||
+ | You should avoid using Beagle, Compiz, Beryl, XMMS, gnome-power-manager | ||
+ | and Evolution while on battery. | ||
+ | Look at the PowerTOP's [http://www.linuxpowertop.org/known.php known problems] | ||
+ | list. | ||
+ | |||
+ | ==See Also== | ||
* [[How to measure power consumption]] | * [[How to measure power consumption]] | ||
* [[Script_for_monitoring_power_consumption]] | * [[Script_for_monitoring_power_consumption]] | ||
Line 51: | Line 317: | ||
==External resources== | ==External resources== | ||
+ | * [http://www.free-it.de/archiv/talks_2005/paper-11017/paper-11017.html ''Current trends in Linux Kernel Power Management''], Dominik Brodowski, 2005 | ||
+ | * [http://www.linuxpowertop.org PowerTOP] website | ||
* [http://www.gentoo.org/doc/en/power-management-guide.xml Power Management Guide] from the Gentoo Linux documentation | * [http://www.gentoo.org/doc/en/power-management-guide.xml Power Management Guide] from the Gentoo Linux documentation | ||
* [http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2005-November/030478.html When/where/what for low power consumption?] (thread on Linux-Thinkpad) | * [http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2005-November/030478.html When/where/what for low power consumption?] (thread on Linux-Thinkpad) | ||
* [http://www.linuxpowertop.org When/where/what for low power consumption? linuxpowertop] Intel utility for monitoring energy intensive processes (also available as Debian package) | * [http://www.linuxpowertop.org When/where/what for low power consumption? linuxpowertop] Intel utility for monitoring energy intensive processes (also available as Debian package) | ||
− | * '' | + | * ''8 hours of battery life on your lap(top)'' ([http://atrey.karlin.mff.cuni.cz/~pavel/swsusp/8hours.odp ODP]/[http://atrey.karlin.mff.cuni.cz/~pavel/swsusp/8hours.pdf PDF]), a presentation by Pavel Machek |
+ | |||
+ | |||
+ | [[Category:600X]] [[Category:A20m]] [[Category:A20p]] [[Category:A21e]] [[Category:A21m]] [[Category:A21p]] [[Category:A22e]] [[Category:A22m]] [[Category:A22p]] [[Category:A30]] [[Category:A30p]] [[Category:A31]] [[Category:A31p]] [[Category:i1200]] [[Category:i1300]] [[Category:i1620]] [[Category:G40]] [[Category:G41]] [[Category:R30]] [[Category:R31]] [[Category:R32]] [[Category:R40]] [[Category:R40e]] [[Category:R50]] [[Category:R50e]] [[Category:R50p]] [[Category:R51]] [[Category:R52]] [[Category:R60]] [[Category:R60e]] [[Category:T20]] [[Category:T21]] [[Category:T22]] [[Category:T23]] [[Category:T30]] [[Category:T40]] [[Category:T40p]] [[Category:T41]] [[Category:T41p]] [[Category:T42]] [[Category:T42p]] [[Category:T43]] [[Category:T43p]] [[Category:T60]] [[Category:T60p]] [[Category:T61]] [[Category:X20]] [[Category:X21]] [[Category:X22]] [[Category:X23]] [[Category:X24]] [[Category:X30]] [[Category:X31]] [[Category:X32]] [[Category:X40]] [[Category:X41]] [[Category:X41 Tablet]] [[Category:X60]] [[Category:X60s]] [[Category:Z60m]] [[Category:Z60t]] [[Category:Z61t]] [[Category:Z61e]] [[Category:TransNote]] |
Revision as of 15:52, 25 June 2007
Contents
- 1 How to reduce power consumption
- 2 Tools
- 3 BIOS settings
- 4 CPU
- 5 Kernel settings and patches
- 6 ATA drives
- 7 LCD Backlight/Brightness
- 8 Graphic controllers
- 9 USB Subsystem
- 10 Sound
- 11 Wireless Interface
- 12 Ethernet Controler
- 13 Bluetooth
- 14 System Fans
- 15 Misbehaving Userland
- 16 See Also
- 17 External resources
Tools
Arjan van de Ven's PowerTOP utility is a gold mine to improve energy efficiency. This tool helps to easyly detect the top power offender, and sometime suggest fixes accordingly. PowerTOP users collected some tips & tricks and an informative faq. When you see an application causing a lot of wakeups in PowerTOP, you should strace it to understand what is happening.
To detect what make your disk spinning (a costly operation),
sysctl vm.block_dump=1
will list all applications causing disks wakeups on the kernel's dmesg. Other tools for this purpose are blktrace and iostat.
BIOS settings
Some Thinkpad BIOS (like 2.08 BIOS on X40) offer two very lame options, with a very misleading online help (saying "Usually not needed"). That's
CPU power management: (default disabled)
PCI bus power management: (default disabled)
You should indeed enable them, else the deepest C3 and C4 ACPI C-states are disabled.
CPU
Look at:
A good thing to keep in mind is that every CPU wakeup, even if it's for a trivial light job, reduce the time the CPU stays on a deep power saving C-state (like C3 or C4). Therefore you should ensure your applications stay really idle when they meant to be idle (track to short select timeouts in loop, etc.).
Also note that manually locking the CPU in the lowest P-state (frequency) available is not an efficient way to improve battery lifetime. This will cause the CPU to stay longer in C0 (power angry C-state) doing hard work when there is something to do, while it could have done this work faster by augmenting the CPU freq, and returned back faster to deeper, economic, C-state. The best is to let the kernel choose the appropriate CPU frequencies by itself. Have a look at this explanation from Intel's kernel developer Arjan van de Ven.
Kernel settings and patches
General settings
The 2.6.21 kernel brought some very effective changes (like dynticks). If it's not already on your distribution and you value power efficiency, you may think about compiling it (or a more recent one) yourself.
Here are a few options (beside the ACPI and APM related one) that matter by reducing power consumption or helping to diagnose consumers, From PowerTOP's FAQ :
CONFIG_NO_HZ
CONFIG_HIGH_RES_TIMERS
CONFIG_HPET
CONFIG_CPU_FREQ_GOV_ONDEMAND
CONFIG_USB_SUSPEND
CONFIG_SND_AC97_POWER_SAVE
CONFIG_TIMER_STATS
CONFIG_ACPI_BATTERY
CONFIG_CPU_FREQ_STAT
# not from the PowerTOP FAQ:
CONFIG_BLK_DEV_IO_TRACE
CONFIG_X86_ACPI_CPUFREQ
CONFIG_X86_SPEEDSTEP_CENTRINO
CONFIG_X86_SPEEDSTEP_ICH
CONFIG_X86_SPEEDSTEP_SMI
PowerTOP FAQ also suggest to disable CONFIG_IRQBALANCE et CONFIG_ACPI_DEBUG. Those options are already in Fedora Core 7 and Ubuntu Gutsy default kernels.
Also, you need to properly set APM and ACPI. Look at:
Useful Patchs
Thomas Gleixner High Resolution Timers (hrt) patchset brings some improvements, like the cpuidle work and Udo A. Steinberg and Venki Pallipadi "force enable HPET" patches (non HPET timers causes about 20-30 CPU wakeups/second). See http://www.tglx.de/projects/hrtimers/
Kristen Carlson Accardi from Intel has a patchset to turn on Aggressive Link Power Management (ALPM) for the ahci driver. See: http://www.kernel.org/pub/linux/kernel/people/kristen/patches/SATA/alpm/
Useful sysctls
The meaning of those settings are explained on the relevant sections of this document. But for convenience sake, we regroupe them here too.
Note that the "ondemand" scaling governor is recommended by Intel developpers for energy efficiency: it's expected to be more efficient than the "powersave" governor, and than userspace daemon (cpureq-utils, cpufreqd, powernowd...). Look here, there or here for a kernel developer explanation about "ondemand" being better on modern Intel CPUs.
The "link_power_management_policy" tunable won't be available unless you run Kirsten patchset on AHCI SATA drives.
echo 5 > /proc/sys/vm/laptop_mode
echo 0 > /proc/sys/kernel/nmi_watchdog
echo Y > /sys/module/snd_ac97_codec/parameters/power_save
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
echo min_power > /sys/class/scsi_host/host1/link_power_management_policy
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
ATA drives
Hard drives and CDRom drives spinning is very costly. To improve battery lifetime, you should reduce disks access (or devices polling) the more you can.
Hard Drives
The files access time update, while mandated by POSIX, is causing lots of disks access, even for file accessed while on cache. If you don't use this feature, disable it via:
mount -o remount,noatime / # and so on for all mounted fs
The laptop_mode reduce disk usage by regrouping writes. You should enable it, at least while on battery. See Laptop-mode for more details:
echo 5 > /proc/sys/vm/laptop_mode
The default kernel dirty page writeback frequency is very conservative. On a laptop running on battery, one might find more appropriate to reduce it:
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
Some power saving hard drives features can be activated with hdparm. For more details look at How to make use of Power Management features :
hdparm -B 1 -S 12 /dev/sda # and/or any other disk device
Optical drive
The optical drive consumes about 1W even when not accessed.* Eject the UltraBay optical drive, or just turn off its power supply (i.e., run the appropriate eject script but leave the drive inserted).
The hald daemon polling tends to maintain the ATA buses out of power saving modes, and to wakeup CDROM drive. If you have a recent hald version, you can stop this polling when on battery (if your hald is not recent enough, consider stopping it on battery) :
hal-disable-polling /dev/scd0 # or whatever your CD drive is
LCD Backlight/Brightness
The LCD backlight is one of the major power drain (usually consumes 5W or more at full brightness). So reducing brightness to the lowest readable level will save you a lot of battery lifetime. Also, don't forget to configure your screen saver to shutdown the screen backlight (and not to display some eye candy), when no activity for a few minutes.
If you're choosing your Thinkpad laptop model, keep in mind that the screen size affect the battery time greatly (more power needed for larger screens).
Graphic controllers
All xorg Thinkpad graphics chipsets drivers (ati, radeon, fglrx, i810) have the same bug causing very frequent CPU wakeups when DRI is activated, even when you don't use any 3D application. This problem is (partly) fixed on xorg git tree (but not released as of xorg 7.2). If you value more battery than 3D, you should disable DRI: put this on the /etc/X11/xorg.conf "Device" of you graphic controller:
Option "NoDRI"
Also be sure that DPMS is working (if not, had Option "DPMS" to your config).
On recent xrandr/xorg versions, you can disable the TV output when you're not using it, it saves about 1W:
xrandr --output TV -off
See also:
- How to make use of Graphics Chips Power Management features
- Problem with high power drain in ACPI sleep
- Rovclock
- Reduce LCD brightness (~1-4W difference)
- Do this automatically after a period of inactivity
- Disable CRT output (~0.5W difference)
USB Subsystem
The kernel support an efficient USB 2.0 power saving feature if you enabled CONFIG_USB_SUSPEND. This may not trigger in when you have an USB device plugged (and beside, USB devices tends to suck power on their own), so avoid using such devices when on battery.
USB 1.1 is worst. It needs polling the bus frequently, hence can't really go in a low power mode when you enabled it, even if you don't have any device plugged. You'd better remove it when you don't use a 1.1 device:
rmmod uhci_hcd
If you don't intend to use any USB 1.1 only device (those tends to be rare anyway), the USB 1.1 support can also be totaly avoided. On Debian and derivatives, just do:
echo "blacklist uhci_hcd" > /etc/modprobe.d/blacklist.
Sound
ALSA has a power saving feature that should be enabled on your kernel (CONFIG_SND_AC97_POWER_SAVE). Note that this low power mode won't trigger in unless you muted all sound inputs (micro, line in etc.). This feature has to be activated with:
echo Y > /sys/module/snd_ac97_codec/parameters/power_save
Seel also How to enable AC97 power saving.
Wireless Interface
Wireless network Consumes up to ~4W. To save power, you can kill the Wi-Fi radio when it's not in use:
echo 1 > /sys/bus/pci/drivers/ipw2200/*/rf_kill
If you need Wi-Fi, you can also reduce power consumption (at the price of performances) by activating the power saving modes:
iwpriv eth0 set_power 5 # or 7 (even more saving, less perfs)
Reducing Beacon intervals on your Access Point to 1 per second will also reduce network card interrupts, and helps power savings.
- See also, to activate power saving on the wireless network card:
- For Intel PRO/Wireless 2200BG Mini-PCI Adapter and Intel PRO/Wireless 2915ABG Mini-PCI Adapter, see instructions for the ipw2200 driver.
- For Intel PRO/Wireless 3945ABG Mini-PCI Express Adapter, see the ipw3945 driver README
Ethernet Controler
If you don't use Wake-on-LAN, you should disable it for your network card, because it sucks a lot of power:
ethtool -s eth0 wol d
If you can, try to reduce useless network activity coming to your NIC (ie. uneeded broadcasts), those cause interrupts and CPU wakeups.
Bluetooth
When you don't need bluetooth, disable it. Because of it's radio, bluetooth is not power friendly.
hciconfig hci0 down ; rmmod hci_usb
System Fans
Consumes about 0.5W when running.
Misbehaving Userland
You should avoid using Beagle, Compiz, Beryl, XMMS, gnome-power-manager and Evolution while on battery. Look at the PowerTOP's known problems list.
See Also
External resources
- Current trends in Linux Kernel Power Management, Dominik Brodowski, 2005
- PowerTOP website
- Power Management Guide from the Gentoo Linux documentation
- When/where/what for low power consumption? (thread on Linux-Thinkpad)
- When/where/what for low power consumption? linuxpowertop Intel utility for monitoring energy intensive processes (also available as Debian package)
- 8 hours of battery life on your lap(top) (ODP/PDF), a presentation by Pavel Machek