Laptop Mode Tools
Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary heading Template:Article summary link Template:Article summary link Template:Article summary link Template:Article summary link
- 1 Preface
- 2 Installation
- 3 Configuration
- 4 Tips and tricks
- 5 Troubleshooting
The Linux kernel, starting from version 2.6.6, contains a feature called laptop mode. This feature is also present in the Linux 2.4 series starting from version 2.4.23. When enabled, the kernel allows the hard drive to spin down more often, resulting in significant power savings. Laptop Mode Tools (LTM) evolved from a simple program that controlled the hard drives to a centralized power saving solution providing a wide selection of options and can perform a number of varying power saving functions across separate subsystems simultaneously. Combined with acpid, cpufrequtils and pm-utils, LTM provides most users with a complete notebook power management suite.
# pacman -S laptop-mode-tools
Configuration is handled through the primary configuration file Template:Filename and through the configuration of dozens of feature-specific files in Template:Filename. Recent versions of LTM are able to automatically enable commonly used Template:Filename settings by way of the Template:Codeline variable in Template:Filename.
Spinning down the hard drive through Template:Codeline valuessaves power and makes everything a lot more quiet. By using the readahead function you can allow the drives to spin down more often even though you are using the computer. LTM can also establish Template:Codeline values. 1 is maximum hard drive power saving and 254 is minimum. Set this value to 254 when on AC and 1 when on battery. If you move around a lot when on battery it might be a good idea to set it higher (eg. 128)[clarifiy]. Template:Codeline and Template:Codeline values are configured in Template:Filename.
# hal-polling.conf # ThinkPad T40/T42/T60 Example # DEBUG=0 CONTROL_HAL_POLLING=1 BATT_DISABLE_HAL_POLLING=1 AC_DISABLE_HAL_POLLING=1 HAL_POLLING_DEVICES="/dev/scd?"
# cpufreq.conf # ThinkPad T40/T42/T60 Example # CONTROL_CPU_FREQUENCY=1 BATT_CPU_MAXFREQ=fastest BATT_CPU_MINFREQ=slowest BATT_CPU_GOVERNOR=ondemand BATT_CPU_IGNORE_NICE_LOAD=1 LM_AC_CPU_MAXFREQ=fastest LM_AC_CPU_MINFREQ=slowest LM_AC_CPU_GOVERNOR=ondemand LM_AC_CPU_IGNORE_NICE_LOAD=1 NOLM_AC_CPU_MAXFREQ=fastest NOLM_AC_CPU_MINFREQ=slowest NOLM_AC_CPU_GOVERNOR=ondemand NOLM_AC_CPU_IGNORE_NICE_LOAD=0 CONTROL_CPU_THROTTLING=0
- See CPU Frequency Scaling for details on how to setup the needed kernel modules.
Device and bus
- Enable the Intel SATA AHCI controller Aggressive Link Power Management feature to set the disk link into a very low power mode in the absence of disk IO.
# intel-sata-powermgmt.conf # ThinkPad T40/T42/T60 Example # DEBUG=0 CONTROL_INTEL_SATA_POWER=1 BATT_ACTIVATE_SATA_POWER=1 LM_AC_ACTIVATE_SATA_POWER=1 NOLM_AC_ACTIVATE_SATA_POWER=0
# usb-autosuspend.conf # ThinkPad T40/T42/T60 Example # DEBUG=0 CONTROL_USB_AUTOSUSPEND=1 BATT_SUSPEND_USB=1 LM_AC_SUSPEND_USB=1 NOLM_AC_SUSPEND_USB=0 AUTOSUSPEND_TIMEOUT=2
Display and graphics
- Available brightness values for certain laptops can can be obtained by running following two commands:
$ cat /proc/acpi/video/VID/LCD/brightness
For ThinkPad notebooks, minimum brightness values can be obtained by running one of the following two commands:
$ cat /sys/class/backlight/acpi_video0/brightness
$ cat /sys/class/backlight/thinkpad_screen/brightness
- For ThinkPad notebooks, maximum brightness values can be obtained by running one of the following two commands:
$ cat /sys/class/backlight/acpi_video0/max_brightness
$ cat /sys/class/backlight/thinkpad_screen/max_brightness
# lcd-brightness.conf # ThinkPad T40/T42 Example # DEBUG=0 CONTROL_BRIGHTNESS=1 BATT_BRIGHTNESS_COMMAND="echo 0" LM_AC_BRIGHTNESS_COMMAND="echo 7" NOLM_AC_BRIGHTNESS_COMMAND="echo 7" BRIGHTNESS_OUTPUT="/sys/class/backlight/thinkpad_screen/brightness"
# lcd-brightness.conf # ThinkPad T60 Example # DEBUG=0 CONTROL_BRIGHTNESS=1 BATT_BRIGHTNESS_COMMAND="echo 0" LM_AC_BRIGHTNESS_COMMAND="echo 7" NOLM_AC_BRIGHTNESS_COMMAND="echo 7" BRIGHTNESS_OUTPUT="/sys/class/backlight/acpi_video0/brightness"
# terminal-blanking.conf # ThinkPad T40/T42/T60 Example # DEBUG=0 CONTROL_TERMINAL=1 TERMINALS="/dev/tty1" BATT_TERMINAL_BLANK_MINUTES=1 BATT_TERMINAL_POWERDOWN_MINUTES=2 LM_AC_TERMINAL_BLANK_MINUTES=10 LM_AC_TERMINAL_POWERDOWN_MINUTES=10 NOLM_AC_TERMINAL_BLANK_MINUTES=10 NOLM_AC_TERMINAL_POWERDOWN_MINUTES=10
# ethernet.conf # ThinkPad T40/T42/T60 Example # DEBUG=0 CONTROL_ETHERNET=1 LM_AC_THROTTLE_ETHERNET=0 NOLM_AC_THROTTLE_ETHERNET=0 DISABLE_WAKEUP_ON_LAN=1 DISABLE_ETHERNET_ON_BATTERY=1 ETHERNET_DEVICES="eth0"
Wireless interface power management settings are hardware-dependent, and thus a bit trickier to configure. Depending on the wireless chipset, the settings are managed in one of the following three files:
- Template:Filename for a generic method of saving power (using "iwconfig wlan0 power on/off"). This applies to most chipsets (that is, anything but Intel chipsets listed below).
- Template:Filename for Intel chipsets driven by the old ipw driver. This apply to IPW3945, IPW2200 and IPW2100. It currently (as of LMT 1.55-1) uses iwpriv for IPW3945, and a combination of iwconfig and iwpriv settings for IPW2100 and IPW220. See Template:Filename for details. (note that the ipw3945 isn't used anymore, see below)
- Template:Filename for Intel chipsets driven by modules iwl4965, iwl3945 and iwlagn (this latter supports chipsets 4965, 5100, 5300, 5350, 5150, 1000, and 6000)
Note that activating the three of them shouldn't be much of a problem, since LTM detects the module used by the interface and acts accordingly.
The supported modules for each config file, indicated above, are taken directly from LTM. However, this seems to be a bit out-of-date, since the current 2.6.34 kernel doesn't provide the ipw3945 and iwl4965 modules anymore (3945 chipset uses iwl3945 instead, and 4965 uses the generic module iwlagn). This is only brought here for information, as this doesn't (or shouldn't) affect the way LTM works.
There is a known issue with some chipsets running with the iwlagn module (namely, the 5300 chipset, and maybe others). On those chipsets, the following settings of Template:Filename :
are ignored, because the Template:Filename file doesn't exist. Instead, the standard method (with "iwconfig wlan0 power on/off") is automatically used.
# ac97-powersave.conf # ThinkPad T40/T42/T60 Example # DEBUG=0 CONTROL_AC97_POWER=1
# intel-hda-powersave.conf # ThinkPad T40/T42/T60 Example # DEBUG=0 CONTROL_INTEL_HDA_POWER=1 BATT_INTEL_HDA_POWERSAVE=1 LM_AC_INTEL_HDA_POWERSAVE=1 NOLM_AC_INTEL_HDA_POWERSAVE=0 INTEL_HDA_DEVICE_TIMEOUT=10 INTEL_HDA_DEVICE_CONTROLLER=0