1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
.TH SLEEPD 8
.SH NAME
sleepd \- puts a laptop to sleep during inactivity
.SH SYNOPSIS
.B sleepd
.I "[-s command] [-d command] [-u n] [-U n] [-i n [-i n ..]] [-a] [-n] [-c n] [-b n] [-A]"
.SH DESCRIPTION
.BR sleepd
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
low.
.P
.BR sleepd
monitors interrupts to detect when your laptop is in use. It defaults to
automatically figuring out what interupts are used by your keyboard and
mouse, by looking for lines containing things like "keyboard" and "mouse"
in /proc/interrupts. This may not detect all keyboards and mice, so
other interrupts can be specified. After a configurable amount of time with
no activity on these interrupts, it asks
.BR apm (1)
or some user-defined program to put the laptop to sleep.
.SH OPTIONS
.TP
.B \-h, \-\-help
Show summary of options.
.TP
.B \-n, \-\-nodaemon
Don't fork to background; run in forground.
.TP
.B \-u, \-\-unused
Number of seconds the laptop can remain idle before being put to sleep.
Defaults to 600 secods (10 minutes). Set to 0 to disable any sleeping due
to idleness.
.TP
.B \-U, \-\-ac-unused
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.
.TP
.B \-i, \-\-irq
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
well.
.TP
.B \-a, \-\-auto
Automatically detect and watch mouse and keyboard irqs. This is the
default, but specifying irqs manually with -i disables the autoprobe. This
turns it back on.
.TP
.B \-s, \-\-sleep-command
Command to run to put the laptop to sleep. Defaults to "apm -s" for systems
with apm and "hibernate --force" for systems with ACPI.
.TP
.B \-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 both APM and ACPI for querying battery status.
.TP
.B \-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 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.
.TP
.B \-A, \-\-and
Only go to sleep if all specified conditions are met. For example, only
sleep if idle and if the battery is low.
.TP
.B \-c, \-\-check-period
Number of seconds between check on system status. Defaults to 10
seconds, which should be fine generally.
.SH "SEE ALSO"
.BR sleepctl (1), apm (1)
.P
.B http://kitenet.net/programs/sleepd/
.SH BUGS
It 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.
.SH AUTHOR
Joey Hess <joey@kitenet.net>
|