LAPTOP-MODE.CONF(8)
β¨ NAME β¨
/etc/laptop-mode/laptop-mode.conf β the configuration file for laptop-mode-tools. Yep, that's the whole manual page: laptop-mode.conf(8), and it's entirely about one config file and all its lil' knobs. π
πΈ DESCRIPTION πΈ
Okay bestie, so this page documents every single option you can set in the /etc/laptop-mode/laptop-mode.conf configuration file and in the modular configuration files that live in the /etc/laptop-mode/conf.d directory.
And if you're like "wait, what does laptop mode even do?" β that's a different page, go read laptop_mode(8). π¦
π SETTINGS π
The syntax of options is OPTION=value. Simple. Clean. No cap.
Now here's the part that's giving β¨layeredβ¨: some groups of options specify values depending on power state and whether laptop mode is enabled. They use prefixes, and the prefixes are literally telling you when the value applies:
LM_β this value is used only when laptop mode is enabledNOLM_β the exact opposite, used when laptop mode is not enabledAC_β used only when the system is running on AC powerBATT_β used only when the system is running on batteries
Settings get prefixed with a combination of an optional LM_/NOLM_ prefix and an optional AC_/BATT_ prefix. So for instance, the combination LM_AC_ means "when the system is in laptop mode and on AC power". (And psst β 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. Mix and match, it's giving build-your-own-adventure.
Options that start with CONTROL_ are boolean settings that determine whether laptop mode tools is allowed to control a certain aspect of your system. And boolean settings always expect "0" to indicate the false (negative/no/disabled) value, and "1" to indicate the true (positive/yes/enabled) value. Zero is no, one is yes. That's it, that's the whole vibe check. β
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. π (legacy upgrade problems, we've all been there)
π§ /etc/laptop-mode/conf.d/board-specific/ π§
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. Your rules, your house. π
π /etc/laptop-mode/laptop-mode.conf π
This is the main configuration file, the main character fr. It contains the settings for enabling and disabling, plus the core features: the Linux kernel laptop mode feature and related settings.
ENABLE_LAPTOP_MODE_TOOLSβ This module determines iflaptop-mode-toolsshould be run or not. Default is1. Set it to0if you would like to completely disablelaptop-mode-tools.VERBOSE_OUTPUTβ Set this to1if you want to see a lot of output when you start/stop laptop mode, and to0if you don't want this. Useful for debugging purposes.LOG_TO_SYSLOGβ Set this to1if you want to log messages to syslog when you start/stop laptop mode, and to0if you don't want this. Useful for debugging purposes.DEBUGβ Set this to1if 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).ENABLE_AUTO_MODULESβ Set this to1to 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. In case you need to fine-control the behavior of individual modules, you can modify them accordingly. Default is1.ENABLE_LAPTOP_MODE_ON_BATTERY,ENABLE_LAPTOP_MODE_ON_ACβ 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 servicelaptop-modeis not started, then laptop mode will never be started, even if this option is enabled.
The ENABLE_LAPTOP_MODE_ON_AC setting is useful when you want to run on a headless machine, in low-power mode, for eg. a Jukebox. π΅
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSEDβ 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 servicelaptop-modeis not started, then laptop mode will never be started, even if this option is enabled. This feature is only supported on ACPI.MINIMUM_BATTERY_CHARGE_PERCENTβ 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 thatMINIMUM_BATTERY_MINUTEShas no effect for these batteries. These options are only supported on ACPI.DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVELβ 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.DISABLE_BATTERY_ALARM_CHECKβ 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. π¨ (gaslighting battery, respectfully)HDβ 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".PARTITIONSβ 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 theHDoption.LM_BATT_MAX_LOST_WORK_SECONDS,LM_AC_MAX_LOST_WORK_SECONDSβ 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 theNOLMvalue 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.) π yeah. don't.CONTROL_READAHEADβ When this option is enabled, laptop mode tools controls the readahead on the filesystems it works upon.LM_READAHEAD,NOLM_READAHEADβ 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! β οΈCONTROL_NOATIMEβ 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 theUSE_RELATIMEoption.USE_RELATIMEβ When this option is enabled together with theCONTROL_NOATIMEoption, laptop mode tools will use therelatimeoption instead of thenoatimeoption. 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 before2.6.23.CONTROL_HD_IDLE_TIMEOUTβ When this option is enabled, laptop mode tools adjusts your hard drives' idle timeouts, i.e., the time of inactivity before they spin down.LM_AC_HD_IDLE_TIMEOUT_SECONDS,LM_BATT_HD_IDLE_TIMEOUT_SECONDS,NOLM_HD_IDLE_TIMEOUT_SECONDSβ 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 value0to disable idle timeout.CONTROL_HD_POWERMGMTβ When this option is enabled, laptop mode tools adjusts your hard drives' power management settings.BATT_HD_POWERMGMT,LM_AC_HD_POWERMGMT,NOLM_AC_HD_POWERMGMTβ These values specify the power management level for your hard drives. The legal values for these options can be found in thehdparm(8)manual page, in the documentation of the-Boption.CONTROL_HD_WRITECACHEβ When this option is enabled, laptop mode tools controls your hard drives' write cache settings.NOLM_AC_HD_WRITECACHE,NOLM_BATT_HD_WRITECACHE,LM_HD_WRITECACHEβ These options specify whether the write caches should be enabled for your hard drives.CONTROL_SYSLOG_CONF(deprecated) β When this option is enabled, laptop mode tools controls/etc/syslog.confas 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.confmodule configuration file. πͺ¦
π Advanced laptop-mode.conf options π
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. π₯ (genuinely, bestie, don't touch)
ASSUME_SCSI_IS_SATAβ on by default, bestie. It tells laptop mode tools to treat any/dev/sdXdevice as a SATA device that should be poked at withhdparm. If your/dev/sdXdrives are actually SCSI drives, turn this off.ACPI_WITHOUT_AC_EVENTSβ turn this on if your laptop's ACPI implementation is buggy and never sends out AC adapter events (rude of it tbh). With this enabled, laptop mode checks the AC adapter state every time the battery state changes, which gets you basically the same result as actually responding to AC adapter events. workaround queen πCONTROL_MOUNT_OPTIONSβ when this is enabled, laptop mode tools is allowed to control the mount options for your filesystems. Disabling it will breakCONTROL_NOATIME, but honestly it will most probably break laptop mode itself too, because changing the mount options is crucial for getting your hard drives spun down. do not touch unless you know what you're doing πLM_DIRTY_RATIONOLM_DIRTY_RATIOβ this option says what percentage of system memory is allowed to hold unwritten modified data while laptop mode is active.LM_DIRTY_BACKGROUND_RATIONOLM_DIRTY_BACKGROUND_RATIOβ this one says what percentage of system memory is allowed to hold unwritten modified data after theDIRTY_RATIObarrier has been crossed. The vibe here: once more thanDIRTY_RATIOpercent of memory holds modified data, the system will synchronously write back data until onlyDIRTY_BACKGROUND_RATIOpercent of memory holds modified data.DEF_UPDATEDEF_XFS_AGE_BUFFERDEF_XFS_SYNC_INTERVALDEF_XFS_BUFD_INTERVALDEF_MAX_AGEβ these options hold the default (non-laptop-mode) values for some kernel options that get modified when laptop mode is active. You don't normally need to change these, they're just the normal kernel defaults. leave them alone, they're doing fine β¨XFS_HZβ this option says how many units in a second are used by a 2.4 kernel. If you're running a 2.4 kernel with an XFS filesystem on non-Intel hardware, you need to change this to match the kernel's "ticks per second" value, which is the kernel variableHZ. Unfortunately that value isn't exposed anywhere, so you'll have to type it in manually. iykyk πLM_SECONDS_BEFORE_SYNCβ how many seconds laptop mode waits after the disk goes idle before it kicks off a full sync. This should always be less than your hard disk idle timeout, because otherwise you get a sync directly after your drive spins down. Two seconds is usually a good value here. βXFS_HZβ this option expresses the unit of the XFS tuning parameters. The default is100. It's only useful for 2.4 kernels that have aHZvalue that isn't100. In the 2.6 kernel series, the XFS interfaces were modified to always useUSER_HZ(which is currently always100), so on those kernels you don't need to modify this value at all. Also, on 2.4 kernelsHZis100for the most common architectures, so you only need to change this if you're on a less common architecture.
/etc/laptop-mode/conf.d/ethernet.conf π
The ethernet module lets you control the behavior of your ethernet devices during AC and battery states. networking but make it energy-conscious
CONTROL_ETHERNETβ enable this to control various aspects of power savings in the ethernet devices.BATT_THROTTLE_ETHERNET=1LM_AC_THROTTLE_ETHERNET=0NOLM_AC_THROTTLE_ETHERNET=0β these options specify the power states in which you'd like to control the ethernet device.THROTTLE_SPEEDβ 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, like1000. To find out the exact speed of your ethernet device, you can use theethtooltool. π₯DISABLE_WAKEUP_ON_LANβ 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 is1. Set it to0to enable the WOL feature. permanently means permanently, bestieETHERNET_DEVICESβ specify the list of ethernet devices to control. Defaults toeth0.DISABLE_ETHERNET_ON_BATTERYβ set this to1if you want to completely disable your ethernet device when running on battery, and when no carrier is detected on the interface (e.g., no active cable is plugged in). Default is0. π
/etc/laptop-mode/conf.d/cpuhotplug.conf π
The cpuhotplug module lets you switch off the CPU cores when running on battery. goodbye cores, hello battery life
CONTROL_CPU_HOTPLUGβ when this option is enabled, Laptop Mode Tools can hotplug your CPU, switching it offline and conserving some power. NOTE: This module is NOT enabled by default. π
/etc/laptop-mode/conf.d/cpufreq.conf π
The cpufreq module lets you control the Linux kernel's CPU frequency scaling settings.
CONTROL_CPU_FREQUENCYβ 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.BATT_CPU_MAXFREQBATT_CPU_INFREQBATT_CPU_GOVERNORBATT_CPU_IGNORE_NICE_LOADLM_AC_CPU_MAXFREQLM_AC_CPU_MINFREQLM_AC_CPU_GOVERNORLM_AC_CPU_IGNORE_NICE_LOADNOLM_AC_CPU_MAXFREQNOLM_AC_CPU_MINFREQNOLM_AC_CPU_GOVERNORNOLM_AC_CPU_IGNORE_NICE_LOADβ these options specify the CPU frequency bounds and scaling governor in the various power states. You can change theMAXFREQandMINFREQvalues to anything listed in/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies. On top of that, you can use"fastest"and"slowest". TheGOVERNORoption controls the setting for/sys/devices/system/cpu/cpufreq/scaling_governor. Which options are available depends on the kernel you have installed β the most common ones are"conservative","performance"and"ondemand". TheIGNORE_NICE_LOADoption controls a setting that's available for the"conservative"and"ondemand"governors. Set this option to1if you want the frequency scaling governor to not raise the CPU frequency for the sake of low-priority ("nice") background processes. πCONTROL_CPU_THROTTLINGβ when this option is enabled, laptop mode tools controls your CPU's throttling level. It's only useful if your CPU doesn't support frequency scaling. This option is only supported on some ACPI hardware.BATT_CPU_THROTTLINGLM_AC_CPU_THROTTLINGNOLM_AC_CPU_THROTTLINGβ 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!). On top of that you can use"maximum"(which is the slowest option),"minimum"(full speed) and"medium"(about halfway). πΈ
/etc/laptop-mode/conf.d/sched-smt-power-savings.conf π
The sched-smt-power-savings module controls the behavior of the process scheduler on SMT boxes, when running in battery mode.
CONTROL_SCHED_SMT_POWER_SAVINGSβ set this to1to enable power savings in the process scheduler for SMT processors. β¨
/etc/laptop-mode/conf.d/dpms-standby.conf π
The dpms-standby module lets you control the DPMS standby timeouts for X displays.
CONTROL_DPMS_STANDBYβ 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. Short version: this lets laptop mode control the time after which your screen gets blanked. π
There's one limitation to this feature: the settings are not automatically applied to new X logons. You can fix that 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.
BATT_DPMS_STANDBYLM_AC_DPMS_STANDBYNOLM_AC_DPMS_STANDBYβ these options specify the display standby timeouts for the X displays, in seconds. π¦
/etc/laptop-mode/conf.d/terminal-blanking.conf π
The terminal-blanking module lets you control the terminal blanking timeouts for the Linux text console.
CONTROL_TERMINALβ when this option is enabled, laptop mode will control the terminal blanking settings for Linux's virtual consoles.TERMINALSβ this option should hold 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. πBATT_TERMINAL_BLANK_MINUTESLM_AC_TERMINAL_BLANK_MINUTESNOLM_AC_TERMINAL_BLANK_MINUTESBATT_TERMINAL_POWERDOWN_MINUTESLM_AC_TERMINAL_POWERDOWN_MINUTESNOLM_AC_TERMINAL_POWERDOWN_MINUTESβ these options specify the terminal blanking and powerdown timeouts, in minutes. The allowed ranges are1-60minutes, or0to 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. math but make it sleepy π΄
/etc/laptop-mode/conf.d/lcd-brightness.conf π
The lcd-brightness module lets you control the brightness of your LCD screen. the glow-up module β¨
CONTROL_BRIGHTNESSβ 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.BATT_BRIGHTNESS_COMMANDLM_AC_BRIGHTNESS_COMMANDNOLM_AC_BRIGHTNESS_COMMANDβ bestie this one rolls with the other two brightness commands, same vibe, different power mode.BRIGHTNESS_OUTPUTβ okay so theBRIGHTNESS_COMMANDsettings are literally the commands that get run to set your LCD brightness, andBRIGHTNESS_OUTPUTis where the output of that command goes. π Example time: if your LCD brightness gets changed by writing the number3into a file called/proc/brightness, then your command should be"echo 3"and your output file should be"/proc/brightness". And if your LCD is handled by a utility like"toshset", then you drop the entire toshset command line in as the command and point the output file at"/dev/null". Easy. β¨
π /etc/laptop-mode/conf.d/kbd-backlight.conf π
The kbd-backlight module lets you control the brightness of your LCD screen. (Yes, it says LCD. We're quoting the original, don't come for me. π«Ά)
CONTROL_KBDLIGHTβ when this is enabled, laptop mode will adjust your keyboard backlight brightness settings, if possible. But lowkey you have to configure the settings below for it to actually work. No cap.BATT_KBDLIGHT_COMMANDβ yep, one of the command settings.LM_AC_KBDLIGHT_COMMANDβ another one.NOLM_AC_KBDLIGHT_COMMANDβ and the third.KBD_BRIGHTNESS_OUTPUTβ so theKBDLIGHT_COMMANDsettings are the commands that get executed to set your keyboard backlight brightness, andKBD_BRIGHTNESS_OUTPUTsays where the output of that command gets written. For instance: if your keyboard's backlight brightness is adjusted by writing a numeric value3to a file called/proc/brightness, 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", include the entire toshset command line as the command and set the output file to"/dev/null". πCONTROL_VGASWITCHEROOβ enable this and laptop mode will use thevgaswitcheroointerface to disable the unused hybrid graphics card. For this module to work you need to make sure you havedebugfsenabled/mounted. Fr fr, don't skip that part. π₯BATT_ENABLE_VGASWITCHEROOβ mode setting, see below.LM_AC_ENABLE_VGASWITCHEROOβ mode setting, see below.NOLM_AC_ENABLE_VGASWITCHEROOβ mode setting, see below.VGASWITCHEROO_FILEβ the settings right above this one specify under what modes the vgaswitcheroo interface should be used to enable/disable hybrid graphics. AndVGASWITCHEROO_FILEspecifies the vgaswitcheroo interface to talk to the Linux kernel for hybrid graphics power savings. π
π¦ /etc/laptop-mode/conf.d/auto-hibernate.conf π¦
The auto-hibernate module lets you automatically hibernate your computer when the battery goes critical, or when the battery level drops below a certain threshold. Iconic behaviour honestly.
ENABLE_AUTO_HIBERNATIONβ when enabled, laptop mode will automatically hibernate your computer once the battery level hits a certain configurable threshold. Heads up though: this feature is only available when ACPI is enabled.HIBERNATE_COMMANDβ this specifies the command laptop mode should run when auto-hibernation is triggered. Normally it's set to something like"/usr/sbin/hibernate".AUTO_HIBERNATION_BATTERY_CHARGE_PERCENTβ the battery level threshold for auto-hibernation, expressed as a percentage of total battery design capacity.AUTO_HIBERNATION_ON_CRITICAL_BATTERY_LEVELβ when this is enabled, auto-hibernation kicks in when the battery reports its state as"critical". π¨
πΈ /etc/laptop-mode/conf.d/battery-level-polling.conf πΈ
Some battery hardware just does not send out proper level change events, or sends them way too infrequently. π For that hardware, laptop mode tools won't detect that the battery has reached a critical level. The battery-level-polling module lets you use the auto-hibernate module and all the other battery-level-dependent features of laptop mode tools anyway, even when your battery doesn't send out frequent ACPI to indicate a change in level.
CONTROL_BATTERY_LEVEL_POLLINGβ when 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. She's nosy and we love that. π
π§ /etc/laptop-mode/conf.d/start-stop-programs.conf π§
The start-stop-programs module lets you start or stop programs when the computer switches to a different power state.
CONTROL_START_STOPβ if enabled, laptop mode tools will automatically start and stop daemons or other programs for you. The actual configuration of which daemons get stopped/started happens by placing links to the daemons' init scripts in these directories:
/etc/laptop-mode/batt-start
/etc/laptop-mode/batt-stop
/etc/laptop-mode/lm-ac-start
/etc/laptop-mode/lm-ac-stop
/etc/laptop-mode/nolm-ac-start
/etc/laptop-mode/nolm-ac-stop
As you've probably already guessed, the directories of the form "X-stop-daemons" should contain init scripts of daemons you want stopped in mode X, while the directories of the form "X-start-daemons" should contain init scripts of daemons you want started in mode X. And of course you can put in your own handling of modes too β the only requirement on the scripts in these directories is that they handle the "start" and "stop" commands, like init scripts usually do. β¨
The ordering of the script handling goes like this. When a mode is entered, the actions of the previous mode are undone, in reverse order. So 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 there's 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. So dramatic. π
BATT_STOPβ mode-based service list, see below.BATT_STARTβ mode-based service list, see below.LM_AC_STOPβ mode-based service list, see below.LM_AC_STARTβ mode-based service list, see below.NOLM_AC_STOPβ mode-based service list, see below.NOLM_AC_STARTβ these options let you stop services (through their init scripts) in certain power states. Just specify a space-separated list of service names in these options. These services get started/stopped together with the files from the directories mentioned above. π«Ά
π /etc/laptop-mode/conf.d/ac97-powersave.conf π
The ac97-powersave module lets you enable the Intel AC97 integrated audio power saving mode.
CONTROL_AC97_POWERβ if 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's been reported that the AC97 power savings triggers an annoying click sound during power state transitions. You've been warned bestie.
β /etc/laptop-mode/conf.d/nmi-watchdog.conf β
The nmi-watchdog module lets you enable the NMI Watchdog timer power savings. Enabling this module lowers down one hw-pmu counter.
CONTROL_NMI_WATCHDOGβ if enabled, laptop mode tools will automatically disable the NMI Watchdog timer when on battery. This module is part of auto modules, so enabling the auto modules setting will activate this module automatically. π
π /etc/laptop-mode/conf.d/nouveau.conf π
The nouveau module lets you enable power savings for nvidia cards with the nouveau device driver. Enabling this module should lower down power consumption. Slay.
CONTROL_NOUVEAUβ if enabled, laptop mode tools will automatically apply the power savings values when on battery. This module is part of auto modules, so enabling the auto modules setting will activate this module automatically.
Please make sure that your nvidia card's power saving functionality is actually available through the nouveau driver. Also make sure to set the correct path for your device in "/sys/kernel/debug/dri/N/pstate" where N is the number enumerated for the device. π―
π /etc/laptop-mode/conf.d/pci-aspm.conf π
The pcie-aspm module lets you enable the PCI Express (PCIe) Active State Power Management (ASPM).
CONTROL_PCI_ASPMβ if enabled, laptop mode tools will enable PCI ASPM powersave mode when on battery. This module is part of auto modules, so enabling the auto modules setting will activate this module automatically. Heads up: PCIe ASPM may require that thepcie_aspm=forcekernel option is enabled.
π /etc/laptop-mode/conf.d/usb-autosuspend.conf π
This option has been superseded by the new runtime-pm.conf settings. It's giving legacy, honestly. π
π₯ /etc/laptop-mode/conf.d/runtime-pm.conf π₯
The runtime-pm module lets you enable the Runtime Power Management framework for the Linux kernel.
CONTROL_RUNTIME_AUTOSUSPENDβ if 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.AUTOSUSPEND_RUNTIME_DEVID_BLACKLISTβ here you can specify the list of USB IDs that should not use autosuspend. Uselsusbto find out the IDs of your USB devices. Example:
AUTOSUSPEND_RUNTIME_DEVID_BLACKLIST="046d:c025 0123:abcd"
AUTOSUSPEND_RUNTIME_DEVTYPE_BLACKLISTβ here you can specify the list of device drivers that should not use autosuspend. The driver type is given by"DRIVER=..."in a device'sueventfile. Example:
AUTOSUSPEND_RUNTIME_DEVTYPE_BLACKLIST="usbhid usb-storage usbmouse"
AUTOSUSPEND_USE_WHITELISTβ set this to use opt-in/whitelist instead of opt-out/blacklist for deciding which devices should be autosuspended.AUTOSUSPEND_USE_WHITELIST=0meansAUTOSUSPEND_*_BLACKLISTwill be used.AUTOSUSPEND_USE_WHITELIST=1meansAUTOSUSPEND_*_WHITELISTwill be used. Pick your fighter. πAUTOSUSPEND_RUNTIME_DEVID_WHITELISTβ the guest list of Device IDs that get to use autosuspend π dig up your device IDs with system commands or go peek in sysfs, they're in there somewhere. Example:AUTOSUSPEND_DEVID_WHITELIST="046d:c025 0123:abcd"AUTOSUSPEND_RUNTIME_DEVTYPE_WHITELISTβ same energy but for device driver types that should use autosuspend. You'll find the driver type chilling as"DRIVER=..."inside a device's uevent file. Example:AUTOSUSPEND_DEVTYPE_WHITELIST="usbhid usb-storage usbmouse"
/etc/laptop-mode/conf.d/intel-hda-powersave.conf π§
the intel-hda-powersave module is the one that lets you turn on the Intel HDA integrated audio power saving mode. headphones girlies, this one's for you π
CONTROL_INTEL_HDA_POWERβ turn this on and laptop mode tools will handle enabling the Intel HDA power saving settings for you, automatically. and heads up: these power saving settings are always enabled, not just when you're on battery. no cap.
/etc/laptop-mode/conf.d/configuration-file-control.conf ποΈβ¨
the configuration-file-control module is the vibe-shifter: it lets you swap between different configuration files depending on what power state the computer is in. iconic behavior honestly.
the big main character use for this is controlling syslog daemon config files. syslog daemons love to sync their log files every time an entry gets written, which spins the disks up, which is. not the vibe when you're trying to save power π. so you can tweak the syslog.conf config file so syslogd won't sync a given file β you do it by putting a dash in front of the log file name, like this:
mail.* -/var/log/mail/mail.log
Note: this feature will NOT work ifCONTROL_SYSLOG_CONFis set inlaptop-mode.conf. to start using it, yeet theCONTROL_SYSLOG_CONFsection out oflaptop-mode.conf, then restart the laptop-mode-tools service. also: the new config files have different names than the old ones, and settings are NOT migrated. you're doing that part manually bestie, sorry π
CONTROL_CONFIG_FILESβ flip this on and laptop mode tools will use the options below to switch config files based on the power state.CONFIG_FILESβ space-separated list of config files that should get swapped around depending on the power state.
for each config file, the specific state-based config files get named like this:
<conffile>-nolm-ac
<conffile>-lm-ac
<conffile>-batt
file one gets used when the system is on AC power and laptop mode is not active. file two gets used when the system is on AC power and laptop mode is active. file three gets used when the system is on battery power. three moods, three files, main character energy π
when the laptop mode tools service is enabled, it replaces the configuration files with a symlink pointing at one of those three state-based files. your original config file gets saved as <config file>.lmbackup, and it gets restored when the laptop mode tools service is disabled. cute, it remembers π«Ά
when you add files to this list, make sure you also add the matching programs and services to the configuration settings below. don't forget, fr fr.
you can absolutely create the alternate config files yourself. if you don't, laptop mode tools will create them the next time it restarts. and if you want to force them into existence, run the laptop-mode service init script with the "restart" parameter.
CONFIG_FILE_SIGNAL_PROGRAMSβ space-separated list of programs that should get signalled after the config files have been switched around. β οΈ this only works for programs that respond to theSIGHUPsignal by reloading their configuration files. if it doesn't do that, it's just gonna sit there.CONFIG_FILE_RELOAD_SERVICESβ space-separated list of services that should be reloaded after the config files have been switched around.
/etc/laptop-mode/conf.d/wireless-power.conf πΆπ
the wireless-power module lets you mess with the power management settings for wireless network adapters that support the iwconfig "power" option. quick disclaimer though: this module is not usable for Intel network adapters using the iwlwifi or ipw drivers β those get their own separate modules, described below. know your driver, bestie π
CONTROL_WIRELESS_POWER_SAVINGβ enable this and laptop mode tools will set the wireless power saving mode settings based on the power state.WIRELESS_AC_POWER_SAVINGWIRELESS_BATT_POWER_SAVING
okay so these two define the power saving modes on AC and on battery. the allowed values are 0 (disable power saving mode) and 1 (enable power saving mode). that's it. two numbers. slay.
/etc/laptop-mode/conf.d/wireless-ipw-power.conf π‘
the wireless-ipw-power module lets you alter the power management settings for Intel PRO/Wireless 3945, 2100 and 2200 wireless network adapters. this one is intended for use with the ipw3945, ipw2100, ipw2200 drivers β not with the iwlwifi drivers. right driver only please π
CONTROL_IPW_POWERβ turn this on and laptop mode tools will set the wireless power management settings based on the power state.IPW3945_AC_POWERIPW3945_BATT_POWER
these two set the power management levels for the ipw3945 driver. defaults are 6 for AC and 7 for battery mode. allowed values go 1 (highest power) to 5 (lowest power), plus 6 (AC mode, full power) and 7 (battery mode, lowest power). yes the scale is a little cursed, that's just how it is π
IPW2100_AC_POWERIPW2100_BATT_POWER
these set the power management levels for the ipw2100 driver. defaults are 0 for AC mode and 5 for battery mode.
/etc/laptop-mode/conf.d/wireless-iwl-power.conf π°οΈβ¨
the wireless-iwl-power module lets you alter the power management settings for Intel PRO/Wireless 3945 and Intel WiFi Link 4965 wireless network adapters. this module is intended for the iwlwifi drivers, not the old ipw drivers. (yeah, the naming is giving chaos, we move π
)
CONTROL_IWL_POWERβ enable it and laptop mode tools will set the wireless power management settings based on the power state.IWL_AC_POWERIWL_BATT_POWER
these define the power management levels on AC and on battery. defaults are 0 for AC and 3 for battery mode. allowed values are 0 (highest power) to 5 (lowest power), 6 (AC mode, full power) and 7 (battery mode, lowest power).
/etc/laptop-mode/conf.d/exec-commands.conf π οΈπ₯
okay so there are a LOT of odd machines out there and a LOT of power saving settings, and laptop-mode-tools just does not cover all of them. if you hit a power saving problem and there's no laptop-mode-tools module for it, the exec-commands module is your girl β it triggers a command during power state changes. and please, pretty please, contribute that power saving item back upstream as a module for the devs π«ΆπΈ
CONTROL_EXEC_COMMANDSβ set this to0to disable execution of custom commands during power state changes. default isauto.BATT_EXEC_COMMAND_0=BATT_EXEC_COMMAND_1=LM_AC_EXEC_COMMAND_0=LM_AC_EXEC_COMMAND_1=NOLM_AC_EXEC_COMMAND_0=NOLM_AC_EXEC_COMMAND_1=
here's where you drop in your custom command that needs to get executed. the numbers can grow up to 9, so you've got room. and the command needs to be specified in double quotes, okay? don't skip that part π
/etc/laptop-mode/conf.d/eee-superhe.conf π»β‘
the eee-superhe module lets you control the CPU frequency scalling on the EEE PC. it requires the eeepc_laptop kernel module to be loaded β no module, no vibes.
CONTROL_SUPERHEβ if this option is enabled, laptop mode tools will automatically control the FSB speed on the EEE PC.BATT_SUPERHELM_AC_SUPERHENOLM_AC_SUPERHE
these set the power management levels on AC and on battery. the defaults are 0 for LM_AC and NOLM_AC, and 2 for battery mode.
/etc/laptop-mode/conf.d/hal-polling.conf πΏπ€
the hal-polling module lets you control the polling of CD/DVD drives by HAL. now, the polling is genuinely needed for some drives to detect inserted CDs, but it also eats a considerable amount of power. so enable this module to disable the polling β but only if your drive doesn't need it, or if you're willing to mount CDs manually in exchange for that sweet power saving. your call, bestie π
CONTROL_HAL_POLLINGβ if this option is enabled, laptop mode tools will control the HAL polling behaviour.BATT_DISABLE_HAL_POLLINGAC_DISABLE_HAL_POLLING
these define the polling behaviour on AC and on battery. to disable polling, set the options to 1; to enable, set them to 0. (yes, backwards from what your brain wants. write it down π)
HAL_POLLING_DEVICESβ this setting defines which devices get their polling behaviour altered. it should contain a space separated list of devices.
/etc/laptop-mode/conf.d/bluetooth.conf π¦πΆ
the bluetooth module lets you enable/disable bluetooth depending on the power state. bye-bye bluetooth on battery, if you want β¨
CONTROL_BLUETOOTHβ enable this and laptop mode tools will enable/disable bluetooth when the power state changes.BATT_ENABLE_BLUETOOTHAC_ENABLE_BLUETOOTH
these define whether bluetooth is enabled on AC and on battery. to disable bluetooth, set the options to 0; to enable, set them to 1.
BLUETOOTH_INTERFACESβ this defines the interfaces the bluetooth module will control. it should contain a space separated list of interfaces. (note: you probably have exactly one bluetooth interface, and it will probably be named"hci0". that's just the law πΈ)
/etc/laptop-mode/conf.d/intel-sata-powermgmt.conf πΎπ
the intel-sata-powermgmt module lets you enable the power saving mode for Intel AHCI compliant SATA controllers. this power saving mode also goes by the name Aggressive Link Power Management (ALPM) β aggressive, iconic, on brand π
CONTROL_INTEL_SATA_POWERβ enable this and laptop mode tools will automatically enable the Intel SATA controller power saving settings. and again, these power saving settings are always enabled, not only on battery power.BATT_ACTIVATE_SATA_POWER=1LM_AC_ACTIVATE_SATA_POWER=0NOLM_AC_ACTIVATE_SATA_POWER=0
these settings control the behavior of the SATA devices under AC and battery power states π₯
πΈ /etc/laptop-mode/conf.d/sched-mc-power-savings.conf
okay bestie, the sched-mc-power-savings module lets you tune the Linux kernel process scheduler so itβs optimized for power usage on multi-core and multi-processor computers. slay β¨
CONTROL_SCHED_MC_POWER_SAVINGSβ 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. π
π¦ /etc/laptop-mode/conf.d/video-out.conf
the video-out module lets you selectively disable video outputs depending on the power status. Heads up: this works only for video hardware that supports xrandr. no cap π
CONTROL_VIDEO_OUTPUTSβ if this option is enabled, laptop mode tools will automatically disable the configured video outputs.BATT_DISABLE_VIDEO_OUTPUTSβ one of the three settings that define which video outputs are to be disabled in which power state.LM_AC_DISABLE_VIDEO_OUTPUTSβ one of the three settings that define which video outputs are to be disabled in which power state.NOLM_AC_DISABLE_VIDEO_OUTPUTSβ one of the three settings that define which video outputs are to be disabled in which power state.
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. π
β¨ SEE ALSO β¨
π AUTHOR π
This manual page was written by Bart Samwel (bart@samwel.tk). 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. π
and thatβs the whole thing, bestie β signed off from the LAPTOP-MODE.CONF(8) page, with no extra date/version info tucked into this footer, so go forth and configure π
β¨
π¦ where this page comes from
- debian bookworm: laptop-mode-tools 1.74-1.2 Β· GPL
- debian trixie: laptop-mode-tools 1.74-1.4 Β· GPL
- ubuntu jammy: laptop-mode-tools 1.74-1.1 Β· GPL
- ubuntu noble: laptop-mode-tools 1.74-1.3 Β· GPL
- ubuntu questing: laptop-mode-tools 1.74-1.4
- ubuntu resolute: laptop-mode-tools 1.74-2.1 Β· GPL
- ubuntu stonking: laptop-mode-tools 1.74-2.1 Β· GPL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms