Configuration file for laptop-mode-tools.
This manual page documents the options that can be set in the /etc/laptop-mode/laptop-mode.conf configuration file and in the modular configuration files in the /etc/laptop-mode/conf.d directory. For a description of what laptop mode does, see the laptop_mode(8) manual page.
The syntax of options is OPTION=value. There are some groups of options that specify values depending on power state and laptop mode is enabled. These use the prefix "LM_" to indicate that a value is used only when laptop mode is enabled, "NOLM_" to indicate the opposite, "AC_" to indicate that a value is used only when the system is running on AC power, and "BATT_" to indicate that a value is used only when the system is running on batteries. Settings are prefixed with a combination of an optional LM_/NOLM_ prefix and an optional AC_/BATT_. For instance, the combination LM_AC_ means "when the system is in laptop mode and on AC power". (Note that this situation happens only if ENABLE_LAPTOP_MODE_ALWAYS is enabled!) If one of the prefixes (either LM_/NOLM_ or AC_/BATT_) is missing, then the value is used independently of the state of laptop mode or AC power, respectively. Options that start with "CONTROL_" are boolean settings that determine whether laptop mode tools is allowed to control a certain aspect of your system. Boolean settings always expect "0" to indicate the false (negative/no/disabled) value, and "1" to indicate the true (positive/yes/enabled) value.
The following sections list the settings that are available in laptop-mode.conf and in the modular configuration files.
Note: Many settings were moved from the main configuration file to the modular configuration files. The settings here are split out by modular configuration file, but in installations upgraded from version 1.36 or earlier they may appear in both. In such cases, the configuration settings in the main configuration file override those in the modular configuration files. To avoid confusion, it is advised to move the settings from the main configuration files to the modular configuration files when this situation is detected.
The board-specific settings framework is for users and distributors who would like to ship their local customized settings on top of the default settings shipped upstream.
Add local customized settings under this folder to override the system defaults.
This is the main configuration file. It contains the settings for enabling and disabling, plus the core features: the Linux kernel laptop mode feature and related settings.
This module determines if laptop-mode-tools should be run or not. Default is 1 Set it to 0 if you would like to completely disable laptop-mode-tools
Set this to 1 if you want to see a lot of output when you start/stop laptop mode, and to 0 if you don't want this. Useful for debugging purposes.
Set this to 1 if you want to log messages to syslog when you start/stop laptop mode, and to 0 if you don't want this. Useful for debugging purposes.
Set this to 1 if you would like to execute the entire laptop-mode program in debug mode. WARNING: This will create a lot of text output. If you are debugging an individual module, perhaps you would want to enable each module specific debug mode (available in module conf files)
Set this to 1 to enable all laptop mode tools modules that are termed safe to be enabled and are marked auto. With this option alone, you can enable all auto modules. Incase you need to fine-control the behavior of individual modules, you can modify them accordingly. Default is 1
These options determine whether laptop mode will be activated when the computer is on battery or on AC power, respectively. Note that if the system service laptop-mode is not started, then laptop mode will never be started, even if this option is enabled.
When this option is enabled, laptop mode will be activated when the laptop's lid is closed, even if the system is not working on batteries. Note that if the system service laptop-mode is not started, then laptop mode will never be started, even if this option is enabled. This feature is only supported on ACPI.
The minimum number of battery minutes, charge (in mAh) or charge (in mWh) that you want to have available while your laptop is in laptop mode. When the number of minutes/mAhs/mWhs goes below this value, the data loss sensitive features are automatically disabled. Note that some batteries do not report a discharge rate, which means that MINIMUM_BATTERY_MINUTES has no effect for these batteries. These options are only supported on ACPI.
If this option is enabled, the data loss sensitive features of laptop mode are disabled when the battery reports its state as "critical". This option is only supported on ACPI.
If this option is enabled, the alarm values are ignored from the battery. This is helpful if you have a broken battery which is reporting false alarms.
The hard drives which laptop mode should operate upon. If you have multiple hard drives, you should list them all in this option, separated by spaces, for example: "/dev/hda /dev/hdb".
This option specifies the partitions or mount points that laptop mode should operate upon. Separate the partitions or mount points by spaces. You can include the entry "auto" to stand for the partitions on the hard drives specified in the HD option.
The maximum number of seconds worth of data that you can lose when power runs out or when the computer crashes. This is the maximum number of seconds that laptop mode will keep modified data in memory without being written to disk. (Note that the NOLM value is missing: modifying this value when laptop mode is disabled is extremely useless, as it won't save you any power, and will only lose you work.)
When this option is enabled, laptop mode tools controls the readahead on the filesystems it works upon.
The number of kilobytes to "read ahead" on your hard disks. Reading ahead means that whenever some data is read from disk, the data which is most likely to be accessed next is read as well, ahead of time. This then saves a hard disk spinup when the data is actually needed, because the data is then already in memory. Don't set this value too high, because the readahead applies to all files that are read!
When this option is enabled, laptop mode tools places the "noatime" option in the mount options of your filesystems when laptop mode is active. This option has the effect of disabling access time logging on files, which may save some disk activity. If you use programs that depend on access times (e.g., mutt), then you should disable this option, or enable the USE_RELATIME option.
When this option is enabled together with the CONTROL_NOATIME option, laptop mode tools will use the relatime option instead of the noatime option. This option works for more applications, and still causes relatively low levels of disk writes. Note that this functionality is only available in recent kernel versions, and laptop mode tools will ignore this setting for kernels before 2.6.23.
When this option is enabled, laptop mode tools adjusts your hard drives' idle timeouts, i.e., the time of inactivity before they spin down.
These settings control the idle timeout for your hard drives. The values are specified in seconds. Values up to 20 minutes can be represented accurately by the hardware, anything above that is rounded down to half-hour precision. Use the value 0 to disable idle timeout.
When this option is enabled, laptop mode tools adjusts your hard drives' power management settings.
These values specify the power management level for your hard drives. The legal values for these options can be found in the hdparm(8) manual page, in the documentation of the -B option.
When this option is enabled, laptop mode tools controls your hard drives' write cache settings.
These options specify whether the write caches should be enabled for your hard drives.
When this option is enabled, laptop mode tools controls /etc/syslog.conf as a symlink. This option is deprecated. Use the configuration-file-control module instead, which is configured in the /etc/laptop-mode/conf.d/configuration-file-control.conf module configuration file.
These options normally do not need to be modified from their default values. Do not tweak these settings unless you know what you are doing.
This option, enabled by default, tells laptop mode tools to assume that a device /dev/sdX is a SATA device, and that it should be controlled using hdparm. If your /dev/sdX drives are really SCSI drives, disable this option.
Enable this option if you have a laptop with a buggy ACPI implementation that doesn't send out AC adapter events. Enabling this option will make laptop mode check the AC adapter state whenever the battery state changes, which achieves just about the same effect as responding to AC adapter events.
When this option is enabled, laptop mode tools is allowed to control the mount options for your filesystems. Disabling this will break CONTROL_NOATIME, but it will most probably also break laptop mode itself, as changes to the mount options are crucial for achieving spun-down hard drives.
This option specifies the percentage of system memory that is allowed to contain unwritten modified data when laptop mode is active.
This option specifies the percentage of system memory that is allowed to contain unwritten modified data after the DIRTY_RATIO barrier has been crossed. The effect of this option is that when more than DIRTY_RATIO percent of memory contains modified data, the system will synchronously write back data until only DIRTY_BACKGROUND_RATIO percent of memory contains modified data.
These options contain the default (non-laptop-mode) values for some kernel options that are modified when laptop mode is active. You do not normally need to change these, they represent the normal kernel defaults.
This option specifies the number of units in a second that is utilized by a 2.4 kernel. If you run a 2.4 kernel with an XFS filesystem on non-Intel hardware, you need to change this option to reflect the kernel "ticks per second" value, which is the kernel variable HZ. Unfortunately this is not exposed anywhere, so you'll have to specify it manually.
The number of seconds that laptop mode waits after the disk goes idle before it starts a full sync. This should always be less than your hard disk idle timeout, because otherwise you'll have a sync directly after your drive spins down. Two seconds is usually a good value for this option.
This option expresses the unit of the XFS tuning parameters. The default is 100. This option is only useful for 2.4 kernels that have a value for HZ that is not 100. In the 2.6 kernel series, the XFS interfaces were modified to always use USER_HZ (which is currently always 100), so for these kernels you do not need to modify this value. Also, on 2.4 kernels the value of HZ is 100 for the most common architectures, so you need only change this value if you use a less common architecture.
The ethernet module allows you to control the behavior of your ethernet devices during AC and battery states.
Enable this to control various aspects of power savings in the ethernet devices.
These options specify the power states in which you would like to control the ethernet device
Here, you can specify the throttling speed for your ethernet device. The default is "slowest". Valid values are "slowest", "fastest" or the speed of your ethernet device, like 1000. To know the exact speed of your ethernet device, you can use the ethtool tool.
This setting controls the option to enable/disable the WoL (Wake On LAN) feature. It permanently disables the WOL feature on the ethernet device. Default is 1. Set it to 0 to enable the WOL feature.
Specify the list of ethernet devices to control. Defaults to eth0
Set this to 1 if you want to completely disable your ethernet device when running on battery. Default is 0
The cpufreq module allows you to control the Linux kernel's CPU frequency scaling settings.
When this option is enabled, laptop mode tools controls your CPU's frequency scaling bounds and the scaling governor. This option is currently only supported on 2.6 kernels.
These options specify the CPU frequency bounds and scaling governor in the various power states. You can change the MAXFREQ and MINFREQ values to any value listed in /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies. In addition, you can use "fastest" and "slowest". The GOVERNOR option controls the setting for /sys/devices/system/cpu/cpufreq/scaling_governor. The available options are dependent on the installed kernel. The most common ones are "conservative", "performance" and "ondemand". The IGNORE_NICE_LOAD option controls a setting that is available for the "conservative" and "ondemand" governors. Set this option to 1 if you want the frequency scaling governor to not increase the CPU frequency for the sake of low-priority ("nice") background processes.
When this option is enabled, laptop mode tools controls your CPU's throttling level. It is only useful if your CPU doesn't support frequency scaling. This option is only supported on some ACPI hardware.
These options specify the throttling level for the CPU in the various power states. You can change it to any level listed in /proc/acpi/processor/CPU0/throttling (use only the number!). In addition, you can use "maximum" (which is the slowest option), "minimum" (full speed) and "medium" (about halfway).
The sched-smt-power-savings module controls the behavior of the process scheduler on SMT boxes, when running in battery mode.
Set this to 1 to enable power savings in the process scheduler for SMT processors.
The dpms-standby module allows you to control the DPMS standby timeouts for X displays.
When this option is enabled, laptop mode will control the DPMS standby timeout for all X displays on the machine that users have logged on to. In short, this allows laptop mode to control the time after which your screen is blanked.
There is one limitation to this feature: the settings are not automatically applied to new X logons. This can be fixed by configuring the display manager. For the gdm display manager, configure a PostLogin directory (usually /etc/gdm/PostLogin or /etc/X11/gdm/PostLogin), and in that directory create a shell script called Default. In that file, include the command:
( sleep 60 ; /usr/sbin/laptop_mode force ) &
Similar configurations are possible for other window managers. Please consult your window manager documentation for more information.
These options specify the display standby timeouts for the X displays, in seconds.
The terminal-blanking module allows you to control the terminal blanking timeouts for the Linux text console.
When this option is enabled, laptop mode will control the terminal blanking settings for Linux's virtual consoles.
This option should contain a space-separated list of console device files that should be affected by the terminal blanking settings. Only one console device file needs to be included, because the settings are shared between all virtual consoles. By default this setting is set to /dev/tty1.
These options specify the terminal blanking and powerdown timeouts, in minutes. The allowed ranges are 1-60 minutes, or 0 to disable blanking or powerdown. The values are cumulative: the powerdown value is counted from the moment of screen blanking, not from the start of inactivity.
The lcd-brightness module allows you to control the brightness of your LCD screen.
When this option is enabled, laptop mode will adjust your LCD screen's brightness settings, if possible. You must configure the following settings for this to work.
The BRIGHTNESS_COMMAND settings specify commands that should be executed in order to set the brightness of your LCD. The BRIGHTNESS_OUTPUT setting specifies where the output of the command will be written. For instance, if your LCD's brightness is adjusted by writing a numeric value 3 to a file called /proc/brightness, you should set the command to "echo 3" and the output file to "/proc/brightness". If your LCD's brightness is adjusted using a utility like "toshset", you should include the entire toshset command line as the command, and set the output file to "/dev/null".
The auto-hibernate module allows you to automatically hibernate your computer when the battery goes critical or when the battery level goes below a certain threshold.
When this option is enabled, laptop mode will automatically hibernate your computer when the battery level reaches a certain configurable threshold. This feature is only available when ACPI is enabled.
This option specifies the command that laptop mode should execute when auto-hibernation is triggered. Normally, this is set to something like "/usr/sbin/hibernate".
The battery level threshold for auto-hibernation, as a percentage of total battery capacity.
When this option is enabled, auto-hibernation will kick in when the battery reports its state as "critical".
Some battery hardware does not send out proper level change events, or too infrequent ones. For such hardware, laptop mode tools will not detect that the battery has reached a critical level. The battery-level-polling module allows you to use the auto-hibernate module and the other battery level dependent features of laptop mode tools even when your battery does not send out frequent ACPI to indicate a change in level.
When this option is enabled, laptop mode tools will automatically poll the battery level every once in a while to see if the levels have changed, and to see if actions should be taken as a consequence.
The start-stop-programs module allows you to start or stop programs when the computer switches to a different power state.
If this option is enabled, laptop mode tools will automatically start and stop daemons or other programs for you. The actual configuration of which daemons are to be stopped/started is done by placing links to the daemons' init scripts in the following directories:
As you have probably guessed, the directories of the form "X-stop-daemons" should contain init scripts of daemons that you want stopped in mode X, while the directories of the form "X-start-daemons" should contain init scripts of daemons that you want started in mode X. Of course, it is possible to put in your own handling of modes as well: the only requirement on the scripts in the directories is that they handle the "start" and "stop" commands, like init scripts usually do.
The ordering of the script handling is as follows. When a mode is entered, the actions of the previous mode are undone, in reverse order. This means that if the previous mode had done "daemon1 stop", "daemon2 stop" and "daemon3 start", then the undoing actions will be "daemon3 stop", "daemon2 start", "daemon1 start". After that, the stop-scripts for the new mode are called, and then the start-scripts are called. Please note that there is no detection of commonalities between modes at this point, i.e., if the mode you're coming from and the mode you're going to both specify that a daemon "X" should be stopped, then the daemon will be un-stopped (that is, started) while leaving the previous mode, and then stopped again.
These options allow you to stop services (through their init scripts) in certain power states. Specify a space-separated list of service names in these options. These services are started/stopped together with the files from the directories mentioned above.
The ac97-powersave module allows you to enable the Intel AC97 integrated audio power saving mode.
If this option is enabled, laptop mode tools will automatically enable the AC97 power saving settings. The power saving settings are always enabled, not only on battery power. Note: On some machines it has been reported that the AC97 power savings triggers the annoying click sound during power state transitions
The nmi-watchdog module allows you to enable the NMI Watchdog timer power savings. Enabling this module lowers down one hw-pmu counter.
If this option is enabled, laptop mode tools will automatically disable the NMI Watchdog timer when on battery. This module is part of auto modules. Thus enabling auto modules setting will activate this module automatically.
The pcie-aspm module allows you to enable the PCI Express (PCIe) Active State Power Management (ASPM).
If this option is enabled, laptop mode tools will enable PCI ASPM powersave mode when on battery. This module is part of auto modules. Thus enabling auto modules setting will activate this module automatically. PCIe ASPM may require that the pcie_aspm=force kernel option is enabled.
The runtime-pm module allows you to enable the Runtime Power Management framework for the Linux kernel.
If this option is enabled, laptop mode tools will automatically enable the Kernel's Runtime Power Management settings. The power saving settings are always enabled, not only on battery power.
The intel-hda-powersave module allows you to enable the Intel HDA integrated audio power saving mode.
If this option is enabled, laptop mode tools will automatically enable the Intel HDA power saving settings. The power saving settings are always enabled, not only on battery power.
The configuration-file-control module allows you to switch between different configuration files when the computer is in different power states.
The primary use for this feature is for controlling the configuration files of syslog daemons. Syslog daemons have a tendency to sync their log files when entries are written to them. This causes disks to spin up, which is not very nice when you're trying to save power. The syslog.conf configuration file can be tweaked so that syslogd will not sync a given file, by prepending the log file name with a dash, like this:
mail.* -/var/log/mail/mail.log
Note: This feature will NOT work if CONTROL_SYSLOG_CONF is set in laptop-mode.conf. To start using this feature, remove the CONTROL_SYSLOG_CONF section in laptop-mode.conf, and then restart the laptop-mode-tools service. The new config files have different names than the old ones, and settings are NOT migrated. You will have to do this manually.
If this option is enabled, laptop mode tools will use the following options to switch configuration files depending on the power state.
This option should contain a space-separated list of configuration files that should be switched around depending on the power state.
For each configuration file, the specific configuration files will be named as follows:
.I <conffile>-nolm-ac
<conffile>-lm-ac
<conffile>-batt
The first file will be used when the system is on AC power and laptop mode is not active. The second file will be used when the system is on AC power and laptop mode is active. The third file will be used when the system is on battery power.
When the laptop mode tools service is enabled, it will replace the configuration files with a symlink to one of the three state-based configuration files. The original configuration file will be saved as <config file>.lmbackup, and it will be restored when the laptop mode tools service is disabled.
When you add files to this list, make sure to also add the appropriate programs and services to the configuration settings below.
You can create the alternate configuration files yourself. If you don't, they will be created by laptop mode tools the next time it is restarted. To force the files to be created, run the laptop-mode service init script with the "restart" parameter.
This option should contain a space-separated list of programs that should be signalled after the config files have been switched around. This only works for programs that respond to the SIGHUP signal by reloading their configuration files.
This option should contain a space-separated list of services which should be reloaded after the config files have been switched around.
The wireless-power module allows you to alter the power management settings for wireless network adapters that support the iwconfig "power" option. This module is not usable for Intel network adapters that use the iwlwifi or ipw drivers, they are supported by separate modules described below.
If this option is enabled, laptop mode tools will set the wireless power saving mode settings based on the power state.
These settings define the power saving modes on AC and on battery. The allowed values are 0 (to disable power saving mode) and 1 (to enable power saving mode).
The wireless-ipw-power module allows you to alter the power management settings for Intel PRO/Wireless 3945, 2100 and 2200 wireless network adapters. This module is intended for use with the ipw3945, ipw2100, ipw2200 drivers, not with the iwlwifi drivers.
If this option is enabled, laptop mode tools will set the wireless power management settings based on the power state.
These settings define the power management levels for the ipw3945 driver. The defaults are 6 for AC, and 7 for battery mode. The allowed values are 1 (highest power) to 5 (lowest power), 6 (AC mode, full power) and 7 (battery mode, lowest power).
These settings define the power management levels for the ipw2100 driver. The defaults are 0 for AC mode and 5 for battery mode.
The wireless-iwl-power module allows you to alter the power management settings for Intel PRO/Wireless 3945 and Intel WiFi Link 4965 wireless network adapters. This module is intended for use with the iwlwifi drivers, not with the old ipw drivers.
If this option is enabled, laptop mode tools will set the wireless power management settings based on the power state.
These settings define the power management levels on AC and on battery. The defaults are 0 for AC, and 3 for battery mode. The allowed values are 0 (highest power) to 5 (lowest power), 6 (AC mode, full power) and 7 (battery mode, lowest power).
There can be many odd machines and many power savings settings, that laptop-mode-tools currently does not cover. If you run into a similar power saving problem, where you do not have a laptop-mode-tools module for it, you can use the exec-commands module to trigger the command during power state changes. Please do contribute back the power saving item as a module to the upstream developers.
Set this to 0 to disable execution of custom commands during power state changes. Default is auto.
Here you can specify your custom command that will need to be executed. The numbers can grow upto 9. The command needs to be specified in double quotes
The usb-autosuspend module allows you to automatically enable the Linux kernel's USB autosuspend feature for all USB devices.
If this option is enabled, laptop mode tools will automatically enable the USB autosuspend feature for all devices. The USB autosuspend feature will always be enabled, not only on battery power.
Here, you can specify the list of USB IDs that should not use autosuspend. Use lsusb to find out the IDs of your USB devices. Example: AUTOSUSPEND_USBID_BLACKLIST="046d:c025 0123:abcd"
The eee-superhe module allows you to control the CPU frequency scalling on the EEE PC. It requires the eeepc_laptop kernel module to be loaded.
It this option is enabled, laptop mode tools will automatically control the FSB speed on the EEE PC.
These settings define the power management levels on AC and on battery. The defaults are 0 for LM_AC and NOLM_AC, and 2 for battery mode.
The hal-polling module allows you to control the polling of CD/DVD drives by HAL. The polling is needed for some drives to detect inserted CDs, but it uses a considerable amount of power. Enable this module to disable the polling, but only if our drive doesn't need it, or if you are willing to mount CDs manually in exchange for the power saving.
If this option is enabled, laptop mode tools will control the HAL polling behaviour.
These settings define the polling behaviour on AC and on battery. To disable polling, set the options to 1, to enable, set them to 0.
This setting defines for which devices the polling behaviour will be altered. It should contain a space separated list of devices.
The bluetooth module allows you to enable/disable bluetooth depending on the power state.
If this option is enabled, laptop mode tools will enable/disable bluetooth when the power state changes.
These settings define whether bluetooth is enabled on AC and on battery. To disable bluetooth, set the options to 0, to enable, set them to 1.
This setting defines the interfaces the bluetooth module will control. It should contain a space separated list of interfaces. (Note that you probably have only one bluetooth interface, and it will probably be named "hci0".)
The intel-sata-powermgmt module allows you to enable the power saving mode for Intel AHCI compliant SATA controllers. This power saving mode is also known as Aggressive Link Power Management (ALPM).
If this option is enabled, laptop mode tools will automatically enable the Intel SATA controller power saving settings. The power saving settings are always enabled, not only on battery power.
These settings control the behavior of the SATA devices under AC and battery power states
The sched-mc-power-savings module allows you to tune the Linux kernel process scheduler to optimize for power usage on multi-core and multi-processor computers.
If this option is enabled, laptop mode tools will automatically configure the kernel process scheduler to optimize for power usage on multi-core and multi-processor computers. The optimizations will only be enabled in battery mode.
The video-out module allows you to selectively disable video outputs depending on the power status. This works only for video hardware that supports xrandr.
If this option is enabled, laptop mode tools will automatically disable the configured video outputs.
These settings define which video outputs are to be disabled in which power state. The format is a space-separated list of outputs. The allowed names of the outputs depend on what the video hardware supports, they can be found by running the "xrandr" command.
This manual page was written by Bart Samwel ([email protected]). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.