xref: /openbsd/usr.sbin/apm/apm.8 (revision a6445c1d)
1.\"	$OpenBSD: apm.8,v 1.40 2014/10/17 01:56:48 tedu Exp $
2.\"
3.\" Copyright (c) 1996 John T. Kohl
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. The name of the author may not be used to endorse or promote products
15.\"    derived from this software without specific prior written permission.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
18.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20.\" DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
21.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
26.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27.\" POSSIBILITY OF SUCH DAMAGE.
28.\"
29.Dd $Mdocdate: October 17 2014 $
30.Dt APM 8
31.Os
32.Sh NAME
33.Nm apm ,
34.Nm zzz ,
35.Nm ZZZ
36.Nd Advanced Power Management control program
37.Sh SYNOPSIS
38.Nm apm
39.Op Fl AabHLlmPSvZz
40.Op Fl f Ar sockname
41.Nm zzz
42.Op Fl SZz
43.Op Fl f Ar sockname
44.Nm ZZZ
45.Op Fl SZz
46.Op Fl f Ar sockname
47.Sh DESCRIPTION
48.Nm
49communicates with the Advanced Power Management daemon,
50.Xr apmd 8 ,
51making requests of it for current power status or to place the system
52into a suspend or stand-by state.
53With no flags,
54.Nm
55displays the current power management state in verbose form.
56.Pp
57The options are as follows:
58.Bl -tag -width Ds
59.It Fl A
60Switch to automatic performance adjustment mode.
61.It Fl a
62Display the external charger (A/C status).
630 means disconnected, 1
64means connected, 2 means backup power source, and 255 means unknown.
65.It Fl b
66Display the battery status.
670 means high, 1 means low, 2 means
68critical, 3 means charging, 4 means absent, and 255 means unknown.
69.It Fl f Ar sockname
70Set the name of the socket via which to contact
71.Xr apmd 8
72to
73.Ar sockname .
74.It Fl H
75Set
76.Va hw.setperf
77to 100.
78.It Fl L
79Set
80.Va hw.setperf
81to 0.
82.It Fl l
83Display the estimated battery lifetime (in percent).
84.It Fl m
85Display the estimated battery lifetime (in minutes).
86.It Fl P
87Display the performance adjustment mode.
880 means manual mode, 1 means automatic mode, and 2 means cool running mode.
89.It Fl S
90Put the system into stand-by (light sleep) state.
91.It Fl v
92Request more verbose description of the displayed states.
93.It Fl Z
94Put the system into hibernation.
95System memory is saved to disk (swap space)
96and the machine is powered down.
97.It Fl z
98Put the system into suspend (deep sleep) state.
99.El
100.Pp
101The
102.Nm zzz
103and
104.Nm ZZZ
105commands are shortcuts for suspending and hibernating the system,
106respectively.
107With no arguments,
108they are placed into their respective states.
109The command line flags serve the same purpose as for
110.Nm .
111.Pp
112These commands do not wait for positive confirmation that the requested
113state has been entered; to do so would mean the command does not return
114until the system resumes from its sleep state.
115.Sh FILES
116.Bl -tag -width /var/run/apmdev -compact
117.It Pa /var/run/apmdev
118The
119default
120.Ux Ns -domain
121socket for communicating with
122.Xr apmd 8 .
123The
124.Fl f
125flag may be used to specify an alternate socket name.
126The protection modes on this socket govern which users may access the
127APM functions.
128.El
129.Sh SEE ALSO
130.Xr apm 4 ,
131.Xr apmd 8
132.Pp
133Advanced Power Management (APM) BIOS Interface Specification
134(revision 1.2),
135Intel Corporation and Microsoft Corporation
136.Sh HISTORY
137The
138.Nm
139command appeared in
140.Nx 1.3 ;
141.Ox
142support was added in
143.Ox 1.2 .
144