File: sleepd.8

package info (click to toggle)
sleepd 1.2.12
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 120 kB
  • ctags: 97
  • sloc: ansic: 709; makefile: 63; sh: 58
file content (76 lines) | stat: -rw-r--r-- 2,927 bytes parent folder | download
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
.TH SLEEPD 8
.SH NAME
sleepd \- puts a laptop to sleep during inactivity
.SH SYNOPSIS
.B sleepd
.I "[-s command] [-u n] [-U n] [-i n [-i n ..]] [-a] [-n] [-c n] [-b n]"
.SH DESCRIPTION
.BR sleepd
is a daemon to force laptops to enter apm 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, no distinction
made between being on AC power or not. Set to 0 to disable any sleeping
while the laptop is 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". If your
laptop uses ACPI, you may need to get software suspend working in your
kernel, and write a command to use that.
.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 \-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, especially with 2.5 kernels.
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>