SLEEPD(8)
π€ NAME π€
sleepd β bestie, this daemon puts your laptop to sleep when you're being inactive, or when the battery gets scary low β¨
πΈ SYNOPSIS πΈ
sleepd [-s command] [-d command] [-u n] [-U n] [-I] [-i n] [-E] [-e
filename] [-a] [-l n] [-w] [-n] [-v] [-c n] [-b n] [-A] [-H] [-N
[device] [-r n] [-t n]]
π¦ DESCRIPTION π¦
okay so real talk: sleepd is a daemon that forces laptops to go to sleep after some period of inactivity π
it's giving "the friend who makes sure you actually go to bed." this is super useful if your laptop does not automatically go to sleep when you aren't using it, and β like the original author β if you, too, constantly forget to shut it off π. it can also suspend a laptop when its battery gets very low πͺ«
sleepd can detect activity in several ways, no cap. the default is to poll both event devices and interrupts to figure out when your laptop is in use because of keyboard or mouse activity π±οΈβ¨οΈ. it defaults to polling /dev/input/event*. you may specify a list of device files to poll instead, or use options to enable other means of checking for activity (network activity, utmp, or load average). after a configurable amount of time with no activity, sleepd runs a program to put the laptop to sleep π΄ periodt.
π OPTIONS π
-h,--helpβ shows you a lil summary of the options π«Ά-n,--nodaemonβ don't fork to background; run in forground (yes, the original spells it like that, we love her π)-v,--verboseβ outputs status messages, so you can see what's happening in real time π-u,--unusedβ number of seconds the laptop can remain idle before being put to sleep. defaults to600seconds (10 minutes). set it to0to disable any sleeping due to idleness π-U,--ac-unusedβ if set, this controls the number of seconds the laptop can remain idle before being put to sleep when running on AC power. if it's not set, the laptop will not sleep when it's on AC power π-e,--eventβ adds an event file to the list that is watched. using this switch disables polling all files in/dev/input/event*π-E,--no-eventsβ this switch disables event device polling π«-l,--loadβ if set, a load average higher than this number will prevent the computer from sleeping. if not set, the computer will ignore the load average π-wβ if set,sleepdwill also check idletime based on utmp. this will prevent the system from sleeping while remote connections are active. it uses the time limit from-uπ-i,--irqβ adds an irq to the list that is watched. using this switch disables automatic detection of keyboard and mouse irqs unless-ais specified as well β‘-I,--no-irqβ this switch disables interrupt polling π€-a,--autoβ automatically detect and watch mouse and keyboard irqs π±οΈβ¨οΈ-s,--sleep-commandβ the command to run to put the laptop to sleep. defaults to"apm -s"for systems with APM and"pm-suspend"for systems with ACPI π΄-b,--batteryβ if this option is specified, the daemon will put the laptop to sleep if the percentage of battery charge drops below the specified number and the system is off AC power. this is useful for some laptops which don't handle this themselves. it supports using APM, ACPI, and HAL for querying battery status πͺ«π-d,--hibernate-commandβ a command to run instead of the regular sleep command when the battery is low. this can be useful if you want the system to go to sleep when it's not active, but suspend to disk if the battery is low. if not set, the sleep command is used πΎ-N,--netdevβ monitor a network interface for activity based on packet count.eth0is the default. this option may be used more than once with different network interfaces π‘-t,--tx-minβ set a baseline transmit raffic rate in packets per second for network monitoring. requires-N(and yes, "raffic" β the typo is canon, we keep it fr fr π)-r,--rx-minβ set a baseline receive traffic rate in packets per second for network monitoring. requires-NπΆ-A,--andβ only go to sleep if all specified conditions are met. for example, only sleep if idle and if the battery is low π§-c,--check-periodβ number of seconds between checks on system status. defaults to10seconds, which should be fine generally β±οΈ-H,--force-upowerβ force UPower to be used instead of ACPI or other methods to query battery status π
π SEE ALSO π
π BUGS π
interrupt monitoring cannot always detect keyboard and mouse π. if the keyboard or mouse interrupt is shared (as is common with usb devices), other devices on the same interrupt can keep the system awake π. use event device polling instead β that's the move, trust π«Ά
no cap, this one will bite you if you've got shared usb interrupts. event device polling is the fix.
π§ AUTHOR π§
Joey Hess <joey@kitenet.net>
and that's the whole vibe check, bestie π this was SLEEPD(8) from the System Manager's Manual β section 8, system manager business, sleeping laptops only π€β¨ thanks for reading, go take a nap, you've earned it π«Άπ
π¦ where this page comes from
- debian bookworm: sleepd 2.11 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms