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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
|
.TH SLEEPD 8
.SH NAME
sleepd \- puts a laptop to sleep during inactivity or on low battery
.SH SYNOPSIS
.B sleepd
.I "[-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]]"
.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
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
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 \-v, \-\-verbose
Output status messages.
.TP
.B \-u, \-\-unused
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
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 \-e, \-\-event
Adds an event file to the list that is watched. Using this switch disables
polling all files in /dev/input/event*.
.TP
.B \-E, \-\-no-events
This switch disables event device polling.
.TP
.B \-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.
.TP
.B \-w
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.
.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 \-I, \-\-no-irq
This switch disables interrupt polling.
.TP
.B \-a, \-\-auto
Automatically detect and watch mouse and keyboard irqs.
.TP
.B \-s, \-\-sleep-command
Command to run to put the laptop to sleep. Defaults to "apm -s" for systems
with APM and "pm-suspend" 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 using APM, ACPI, and HAL 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 \-N, \-\-netdev
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
interfaces.
.TP
.B \-t, \-\-tx\-min
Set a baseline transmit raffic rate in packets per second for network
monitoring. Requires \-N.
.TP
.B \-r, \-\-rx\-min
Set a baseline receive traffic rate in packets per second for network
monitoring. Requires \-N.
.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.
.TP
.B \-H, \-\-force-upower
Force UPower to be used instead of ACPI or other methods to query battery status.
.SH "SEE ALSO"
.BR sleepctl (1)
.P
.B http://kitenet.net/~joey/code/sleepd/
.SH 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.
.SH AUTHOR
Joey Hess <joey@kitenet.net>
|