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 enabled
  • NOLM_ β€” the exact opposite, used when laptop mode is not enabled
  • AC_ β€” used only when the system is running on AC power
  • BATT_ β€” 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 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.
  • VERBOSE_OUTPUT β€” 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.
  • LOG_TO_SYSLOG β€” 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.
  • DEBUG β€” 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).
  • ENABLE_AUTO_MODULES β€” 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. In case you need to fine-control the behavior of individual modules, you can modify them accordingly. Default is 1.
  • 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 service laptop-mode is 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 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.
  • 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 that MINIMUM_BATTERY_MINUTES has 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 the HD option.
  • 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 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.) πŸ’€ 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 the USE_RELATIME option.
  • USE_RELATIME β€” 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.
  • 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 value 0 to 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 the hdparm(8) manual page, in the documentation of the -B option.
  • 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.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. πŸͺ¦

πŸ‘‘ 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/sdX device as a SATA device that should be poked at with hdparm. If your /dev/sdX drives 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 break CONTROL_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_RATIO
  • NOLM_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_RATIO
  • NOLM_DIRTY_BACKGROUND_RATIO β€” this one says what percentage of system memory is allowed to hold unwritten modified data after the DIRTY_RATIO barrier has been crossed. The vibe here: once more than DIRTY_RATIO percent of memory holds modified data, the system will synchronously write back data until only DIRTY_BACKGROUND_RATIO percent of memory holds modified data.
  • DEF_UPDATE
  • DEF_XFS_AGE_BUFFER
  • DEF_XFS_SYNC_INTERVAL
  • DEF_XFS_BUFD_INTERVAL
  • DEF_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 variable HZ. 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 is 100. It's only useful for 2.4 kernels that have a HZ value that isn't 100. In the 2.6 kernel series, the XFS interfaces were modified to always use USER_HZ (which is currently always 100), so on those kernels you don't need to modify this value at all. Also, on 2.4 kernels HZ is 100 for 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=1
  • LM_AC_THROTTLE_ETHERNET=0
  • NOLM_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, like 1000. To find out the exact speed of your ethernet device, you can use the ethtool tool. πŸ”₯
  • 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 is 1. Set it to 0 to enable the WOL feature. permanently means permanently, bestie
  • ETHERNET_DEVICES β€” specify the list of ethernet devices to control. Defaults to eth0.
  • DISABLE_ETHERNET_ON_BATTERY β€” set this to 1 if 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 is 0. πŸ“

/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_MAXFREQ
  • BATT_CPU_INFREQ
  • BATT_CPU_GOVERNOR
  • BATT_CPU_IGNORE_NICE_LOAD
  • LM_AC_CPU_MAXFREQ
  • LM_AC_CPU_MINFREQ
  • LM_AC_CPU_GOVERNOR
  • LM_AC_CPU_IGNORE_NICE_LOAD
  • NOLM_AC_CPU_MAXFREQ
  • NOLM_AC_CPU_MINFREQ
  • NOLM_AC_CPU_GOVERNOR
  • NOLM_AC_CPU_IGNORE_NICE_LOAD β€” these options specify the CPU frequency bounds and scaling governor in the various power states. You can change the MAXFREQ and MINFREQ values to anything listed in /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies. On top of that, you can use "fastest" and "slowest". The GOVERNOR option 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". The IGNORE_NICE_LOAD option controls a setting that's available for the "conservative" and "ondemand" governors. Set this option to 1 if 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_THROTTLING
  • LM_AC_CPU_THROTTLING
  • NOLM_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 to 1 to 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_STANDBY
  • LM_AC_DPMS_STANDBY
  • NOLM_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_MINUTES
  • LM_AC_TERMINAL_BLANK_MINUTES
  • NOLM_AC_TERMINAL_BLANK_MINUTES
  • BATT_TERMINAL_POWERDOWN_MINUTES
  • LM_AC_TERMINAL_POWERDOWN_MINUTES
  • NOLM_AC_TERMINAL_POWERDOWN_MINUTES β€” 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. 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_COMMAND
  • LM_AC_BRIGHTNESS_COMMAND
  • NOLM_AC_BRIGHTNESS_COMMAND β€” bestie this one rolls with the other two brightness commands, same vibe, different power mode.
  • BRIGHTNESS_OUTPUT β€” okay so the BRIGHTNESS_COMMAND settings are literally the commands that get run to set your LCD brightness, and BRIGHTNESS_OUTPUT is where the output of that command goes. πŸ’… Example time: if your LCD brightness gets changed by writing the number 3 into 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 the KBDLIGHT_COMMAND settings are the commands that get executed to set your keyboard backlight brightness, and KBD_BRIGHTNESS_OUTPUT says where the output of that command gets written. For instance: if your keyboard's backlight brightness is adjusted by writing a numeric value 3 to 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 the vgaswitcheroo interface to disable the unused hybrid graphics card. For this module to work you need to make sure you have debugfs enabled/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. And VGASWITCHEROO_FILE specifies 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 the pcie_aspm=force kernel 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. Use lsusb to 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's uevent file. 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=0 means AUTOSUSPEND_*_BLACKLIST will be used. AUTOSUSPEND_USE_WHITELIST=1 means AUTOSUSPEND_*_WHITELIST will 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 if CONTROL_SYSLOG_CONF is set in laptop-mode.conf. to start using it, yeet the CONTROL_SYSLOG_CONF section out of laptop-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 the SIGHUP signal 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_SAVING
  • WIRELESS_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_POWER
  • IPW3945_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_POWER
  • IPW2100_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_POWER
  • IWL_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 to 0 to disable execution of custom commands during power state changes. default is auto.
  • 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_SUPERHE
  • LM_AC_SUPERHE
  • NOLM_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_POLLING
  • AC_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_BLUETOOTH
  • AC_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=1
  • LM_AC_ACTIVATE_SATA_POWER=0
  • NOLM_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 πŸ’…βœ¨