LAPTOP_MODE(8)

πŸ’» LAPTOP_MODE(8) β€” the system manager's manual, bestie edition

okay so welcome to the manual page for /usr/sbin/laptop_mode from the System Manager's Manual, section 8 πŸŽ€ (that's the "admin commands" shelf, iykyk). Sit down, grab a snack, we're learning how to make a laptop's hard drive chill tf out.


✨ NAME ✨

/usr/sbin/laptop_mode β€” apply laptop mode settings πŸ¦‹


✨ SYNOPSIS ✨

/usr/sbin/laptop_mode [ cmd ] [ force ]

✨ DESCRIPTION ✨

This manual page documents, briefly, the /usr/sbin/laptop_mode command. πŸ’…

laptop_mode is a program that applies the settings given in the /etc/laptop-mode/laptop-mode.conf configuration file. That's the whole job. It reads your config, it applies your config, it moves on with its life.

The primary use is to control the laptop mode feature included in Linux kernels with versions 2.6.6 and higher, and 2.4.23 and higher. And what does that feature do? It increases battery life by letting your hard drive spin down. πŸ”‹βœ¨

The way it pulls that off: disk write activity gets grouped into "chunks" that are spaced at larger intervals than they normally would be. So instead of your drive waking up every two seconds like it's got FOMO, it wakes up less often, does a whole little batch of work, and goes back to sleep. main character energy, honestly.

On top of supporting the Linux kernel's laptop mode feature, /usr/sbin/laptop_mode also supports various power saving modules which are configured through configuration files in the /etc/laptop-mode/conf.d directory. 🌈

🚨 okay important one, listen up: it is not recommended to call /usr/sbin/laptop_mode directly to start or stop laptop mode, except in hardware event handlers. I know, I know, the command is right there and it's tempting. Resist.

To apply new configuration settings from laptop-mode.conf, call the laptop-mode service init script with the reload parameter instead. That's the move. 🫢


✨ COMMANDS ✨

Specify force as the second parameter to force laptop_mode to re-apply a state even if the computer is already in that state. Like, "bestie I know you think nothing changed, do it anyway." 😀

These are the values that are allowed for cmd:

  • auto β€” Enable or disable laptop mode based on the current power state. ⚑ Note that this will not do anything if the laptop-mode service has not been started! (yes, really. it'll just sit there. iconic but unhelpful.)
  • status β€” Display a status report about everything that laptop_mode affects. This is the "what's going on in there" button and honestly it's so satisfying. πŸ“‹

✨ SEE ALSO ✨


✨ AUTHOR ✨

This manual page was written by Bart Samwel (bart@samwel.tk) for the Debian system (but may be used by others). 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. πŸ“œ

On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. πŸ—‚οΈ


aaaand that's the whole page, bestie!! πŸ’– this one's LAPTOP_MODE(8) from the System Manager's Manual, section 8, and we're out β€” mwah, go spin down that hard drive responsibly πŸŒΈπŸ’…πŸ¦‹