xref: /netbsd-src/usr.sbin/apm/apm.8 (revision 1ac719d1471d3ae0a3f0c66e42d0affa92669733)
1.\"	$NetBSD: apm.8,v 1.21 2012/04/08 22:00:40 wiz Exp $
2.\"
3.\" Copyright (c) 1996, 2010 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by John Kohl.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd March 20, 2010
31.Dt APM 8
32.Os
33.Sh NAME
34.Nm apm ,
35.Nm zzz
36.Nd Advanced Power Management control program
37.Sh SYNOPSIS
38.Nm
39.Op Fl abdlmSsvz
40.Op Fl f Ar sockname
41.Nm zzz
42.Op Fl Sz
43.Op Fl f Ar sockname
44.Sh DESCRIPTION
45The
46.Nm
47program communicates with the Advanced Power Management
48.Pq Tn APM
49daemon,
50.Xr apmd 8 ,
51making requests of the current power status or placing the system either
52into suspend or stand-by state.
53The
54.Nm
55tool is only installed on supported platforms.
56.Pp
57With no flags,
58.Nm
59displays the current power management state in verbose form.
60.Pp
61Available command-line flags are:
62.Bl -tag -width "-f sockname" -compact
63.It Fl a
64Display the external charger (A/C status):  0 means disconnected, 1
65means connected, 2 means backup power source, and 255 means unknown.
66.It Fl b
67Display the battery status:
680 means high, 1 means low, 2 means critical, 3 means charging,
694 means absent, and 255 means unknown.
70.It Fl d
71Do not communicate with the APM daemon; attempt instead to manipulate
72the APM control device directly.
73.It Fl f Ar sockname
74Set the name of the socket via which to contact
75.Xr apmd 8
76to
77.Pa sockname .
78.It Fl l
79Display the estimated battery lifetime in percent.
80.It Fl m
81Display the estimated battery lifetime in minutes.
82.It Fl S
83Put the system into stand-by (light sleep) mode.
84.It Fl s
85Display if power management is enabled.
86.It Fl v
87Request more verbose description of the displayed states.
88.It Fl z
89Put the system into suspend (deep sleep) mode.
90.El
91.Pp
92The
93.Nm zzz
94variant of this command is an alternative for suspending the system.
95With no arguments,
96.Nm zzz
97places the system into suspend mode.
98The command line flags serve the same purpose as for the
99.Nm
100variant of this command.
101.Pp
102This command does not wait for positive confirmation that the requested
103mode has been entered; to do so would mean the command does not return
104until the system resumes from its sleep state.
105.Sh FILES
106.Pa /var/run/apmdev
107is the default UNIX-domain socket used for communication with
108.Xr apmd 8 .
109The
110.Fl f
111flag may be used to specify an alternate socket name.
112The protection modes on this socket govern which users may access the
113APM functions.
114.Pp
115.Pa /dev/apmctl
116is the control device which is used when the
117.Fl d
118flag is specified; it must be writable for the
119.Fl d
120flag to work successfully.
121.Pa /dev/apm
122is the status device used when the socket is not accessible; it must be
123readable to provide current APM status.
124.Sh SEE ALSO
125.Xr acpi 4 ,
126.Xr apm 4 ,
127.Xr apmd 8
128.Rs
129.%A Intel Corporation
130.%A Microsoft Corporation
131.%T Advanced Power Management (APM) BIOS Interface Specification
132.%N Revision 1.2
133.%D February 1996
134.Re
135.Sh HISTORY
136The
137.Nm
138command appeared in
139.Nx 1.3 .
140.Pp
141The
142.Tn APM
143specification first appeared in 1992.
144The last update to the standard was made in 1996 -
145the same year when it was superceded by the
146.Tn ACPI 1.0
147standard.
148Thereafter power management on IBM-compatible personal computers has relied on
149.Tn ACPI ,
150implemented in
151.Nx
152by the
153.Xr acpi 4
154subsystem.
155The
156.Xr acpi 4
157provides an emulation layer for the legacy
158.Nm .
159