is a daemon to force laptops to go to sleep after some period of
inactivity. This is useful if your laptop does not automatically go to
sleep when you aren't using it, and, like me, you often forget to shut it
off. It is also capable of suspending a laptop when its battery gets very
can detect activity in several ways. The default is to poll both event devices
and interrupts to detect when your laptop is in use due to 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
Show summary of options.
Don't fork to background; run in forground.
Output status messages.
Number of seconds the laptop can remain idle before being put to sleep.
Defaults to 600 seconds (10 minutes). Set to 0 to disable any sleeping due
If set, controls the number of seconds the laptop can remain idle before
being put to sleep when running on AC power. If not set, the laptop will
not sleep when it's on AC power.
Adds an event file to the list that is watched. Using this switch disables
polling all files in /dev/input/event*.
This switch disables event device polling.
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.
If set, sleepd will 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.
Adds an irq to the list that is watched. Using this switch disables
automatic detection of keyboard and mouse irqs unless -a is specified as
This switch disables interrupt polling.
Automatically detect and watch mouse and keyboard irqs.
Command to run to put the laptop to sleep. Defaults to "apm -s" for systems
with APM and "pm-suspend" for systems with ACPI.
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.
A command to run instead of the regular sleep command when the battery is
low. This can be useful if you want to make the system 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.
Monitor a network interface for activity based on packet count. eth0 is the
default. This option may be used more than once with different network
Set a baseline transmit raffic rate in packets per second for network
monitoring. Requires -N.
Set a baseline receive traffic rate in packets per second for network
monitoring. Requires -N.
Only go to sleep if all specified conditions are met. For example, only
sleep if idle and if the battery is low.
Number of seconds between check on system status. Defaults to 10
seconds, which should be fine generally.
Force HAL to be used instead of ACPI or other methods to query battery status.
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.