SLEEPCTL(1)
π€ SLEEPCTL β the sleepd on/off switch π€
okay bestie so real quick: this is sleepctl, and it lives in the General Commands Manual. it's the little remote control for the sleepd(8) daemon. yes, THE sleep daemon. the one that decides when your laptop gets to nap. we're gonna learn to talk to it. π«Ά
β¨ NAME β¨
sleepctl β enable/disable sleepd
β¨ SYNOPSIS β¨
sleeptcl [on|off|status]
okay so yes, the synopsis literally says sleeptcl with the letters swapped and i am NOT fixing it because the manpage said it like that and we do not lie about the manpage. type whichever one your fingers believe in. π
β¨ DESCRIPTION β¨
so here's the vibe: sleepctl lets a regular user β not root, not a sysadmin, just some girl β temporarily stop the sleepd(8) daemon from doing its thing. and when is that useful? when you're in the middle of a long download or a compile and you absolutely cannot have the system go to sleep on you mid-make. it's giving "i'm busy, do not perceive me." π
sleepctl off tells sleepd to not put the system to sleep, even if it's fully convinced the system is idle. but here's the β¨twistβ¨ bestie: if you run this command more than once, the requests stack up. so if you ran off three times, you now need three sleepctl on commands to actually re-enable sleeping. it's a counter, not a toggle. that's genuinely useful when multiple automated processes or multiple users are all using the command at the same time, because nobody stomps on anybody else's request. teamwork! π€
β οΈ but lowkey important: the system can still be put to sleep for other reasons. like a failing battery. sleepctl off is not a magic shield, it's a very polite request. π
sleepctl on re-enables sleeping. and ngl this one's spicy β if sleeping gets re-enabled, and sleepd has been watching the system and has seen no system activity for some time, and it was being prevented from putting the system to sleep this whole time... it may put the system to sleep immediatly. yes that's how it's spelled, no i will not be correcting it. so heads up: on can be instant. π«
sleepctl status outputs the current status of sleepd. simple. iconic. no notes. π
now the big design note, and honestly? it's kind of genius. if the system gets forced to sleep by other means, sleepd will not remember what mode it was in when it wakes back up. it just returns to the default mode: putting the system to sleep after some amount of inactivity. and that is by design β so you can easily and naturally undo the effects of a sleepctl off without having to remember to turn it back on. it's a self-cleaning feature. it's the "i'll forgive you for forgetting" of daemons. πΈ
and now the technical tea, because we're all technically competent here: this program talks to sleepd by writing to the file /var/run/sleepd.ctl. so it needs read/write access to that file. it also needs to run as whatever user sleepd runs as, so that it can hup the daemon. permissions, bestie. respect them. π
β¨ EXAMPLES β¨
the canonical one. the classic. the "download something huge while your laptop stays awake" special:
sleepctl off ; wget http://foo/huge.tgz ; sleepctl on
π genuinely this is the whole point of the program and it eats every single time.
β¨ SEE ALSO β¨
sleepd(8)β the daemon in question, go say hi- http://kitenet.net/~joey/code/sleepd/
β¨ AUTHOR β¨
Joey Hess <joey@kitenet.net> β thank you for our lives, king π«‘
and that's the whole page, bestie!! π this little number came straight out of the General Commands Manual, and the footer is just the name SLEEPCTL(1) sitting there all by itself β no date, no version, nothing extra. so consider this your sign-off: go forth, keep your system awake, and remember to sleepctl on when you're done. periodt. π
β¨
π¦ 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