Merge commit 'crater/vendor/OPENPAM'
[dragonfly.git] / usr.sbin / apm / apm.8
1 .\" LP (Laptop Package)
2 .\"
3 .\" Copyright (c) 1994 by Tatsumi Hosokawa <hosokawa@jp.FreeBSD.org>
4 .\"
5 .\" This software may be used, modified, copied, and distributed, in
6 .\" both source and binary form provided that the above copyright and
7 .\" these terms are retained. Under no circumstances is the author
8 .\" responsible for the proper functioning of this software, nor does
9 .\" the author assume any responsibility for damages incurred with its
10 .\"
11 .\" $FreeBSD: src/usr.sbin/apm/apm.8,v 1.16.2.7 2003/05/07 17:42:02 tobez Exp $
12 .\" $DragonFly: src/usr.sbin/apm/apm.8,v 1.5 2006/02/17 19:40:10 swildner Exp $
13 .\"
14 .\" use.
15 .Dd November 1, 1994
16 .Dt APM 8
17 .Os
18 .Sh NAME
19 .Nm apm ,
20 .Nm zzz
21 .Nd control the APM BIOS and display its information
22 .Sh SYNOPSIS
23 .Nm
24 .Op Fl ablstzZ
25 .Op Fl d Ar enable
26 .Op Fl e Ar enable
27 .Op Fl h Ar enable
28 .Op Fl r Ar delta
29 .Pp
30 .Nm zzz
31 .Sh DESCRIPTION
32 The
33 .Nm
34 utility
35 controls the Intel / Microsoft APM (Advanced Power Management) BIOS and
36 displays the current status of APM on laptop PCs.
37 The
38 .Nm zzz
39 utility suspends the system by controlling APM.
40 .Pp
41 The following options are available for
42 .Nm
43 (no options are available for
44 .Nm zzz ) .
45 If no options are specified,
46 .Nm
47 displays information and current status of APM in verbose mode.
48 If multiple display options are given, the values are displayed one
49 per line in the order given here.
50 .Bl -tag -width indent
51 .It Fl a
52 Display the current AC-line status as an integer value.  The values
53 0, 1 and 2 correspond to the
54 .Dq off-line
55 state,
56 .Dq on-line
57 state or
58 .Dq backup power
59 state, respectively.
60 .It Fl b
61 Display an integer value reflecting the current battery status.
62 The values 0, 1, 2, 3, correspond to the
63 .Dq high
64 status,
65 .Dq low
66 status,
67 .Dq critical
68 status,
69 .Dq charging
70 status respectively.
71 .It Fl d Ar enable
72 Disable/enable suspending of the display separately from a normal suspend
73 using the boolean value for
74 .Ar enable .
75 This feature seems to not work on many different laptops,
76 including the Libretto 30CT and 50CT.
77 .It Fl e Ar enable
78 Enable or disable APM functions of the computer,
79 depending on the boolean
80 .Ar enable
81 argument.
82 .It Fl h Ar enable
83 Depending on the boolean value of
84 .Ar enable ,
85 enable or disable the HLT instruction in the kernel context switch routine.
86 These options are not necessary for almost all APM implementations,
87 but for some implementations whose
88 .Dq Pa Idle CPU
89 call executes both CPU clock slowdown and HLT instruction,
90 .Fl h Ar false
91 is necessary to prevent the system from reducing its peak performance.
92 See
93 .Xr apm 4
94 for details.
95 .It Fl l
96 Display the remaining battery percentage.  If your laptop does not
97 support this function, 255 is displayed.
98 .It Fl r Ar delta
99 Enable the resume wakeup timer, if the laptop supports it.  This
100 doesn't actually suspend the laptop, but if the laptop is suspended,
101 and it supports resume from suspend, then it will be resumed after
102 .Ar delta
103 seconds (from when you run this command, not from when you suspend).
104 .It Fl s
105 Display the status of the APM support as an integer value.  The values
106 0 and 1 correspond to the
107 .Dq disabled
108 state or
109 .Dq enabled
110 state respectively.
111 .It Fl t
112 Display the estimated remaining battery lifetime in seconds.  If
113 it is unknown, -1 is displayed.
114 .It Fl Z
115 Transition the system into standby mode.  This mode uses less power than
116 full power mode, but more than suspend mode.  Some laptops support
117 resuming from this state on timer or Ring Indicator events.  The
118 output of
119 .Nm
120 tells what your laptop claims to support.
121 .It Fl z
122 Suspend the system.
123 It is equivalent to
124 .Nm zzz .
125 .El
126 .Sh NOTES
127 .Xr apmconf 8
128 has been merged in
129 .Nm
130 and thus
131 .Nm
132 replaces all of its functionality.
133 .Sh SEE ALSO
134 .Xr apm 4
135 .Sh AUTHORS
136 .An Tatsumi Hosokawa Aq hosokawa@jp.FreeBSD.org
137 .Sh BUGS
138 Some APM implementations do not support parameters needed by
139 .Nm .
140 On such systems,
141 .Nm
142 displays them as unknown.
143 .Pp
144 Some APM implementations cannot handle events such as pushing the
145 power button or closing the cover.  On such implementations, the system
146 .Ar must
147 be suspended
148 .Ar only
149 by using
150 .Nm
151 or
152 .Nm zzz .