1.\" $NetBSD: apm.8,v 1.20 2010/03/20 07:59:44 jruoho 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.Bk -words 41.Op Fl f Ar sockname 42.Ek 43.Nm zzz 44.Op Fl Sz 45.Bk -words 46.Op Fl f Ar sockname 47.Ek 48.Sh DESCRIPTION 49The 50.Nm 51program communicates with the Advanced Power Management 52.Pq Tn APM 53daemon, 54.Xr apmd 8 , 55making requests of the current power status or placing the system either 56into suspend or stand-by state. 57The 58.Nm 59tool is only installed on supported platforms. 60.Pp 61With no flags, 62.Nm 63displays the current power management state in verbose form. 64.Pp 65Available command-line flags are: 66.Bl -tag -width "-f sockname" -compact 67.It Fl z 68Put the system into suspend (deep sleep) mode. 69.It Fl S 70Put the system into stand-by (light sleep) mode. 71.It Fl l 72Display the estimated battery lifetime in percent. 73.It Fl m 74Display the estimated battery lifetime in minutes. 75.It Fl b 76Display the battery status: 770 means high, 1 means low, 2 means critical, 3 means charging, 784 means absent, and 255 means unknown. 79.It Fl a 80Display the external charger (A/C status): 0 means disconnected, 1 81means connected, 2 means backup power source, and 255 means unknown. 82.It Fl s 83Display if power management is enabled. 84.It Fl v 85Request more verbose description of the displayed states. 86.It Fl f Ar sockname 87Set the name of the socket via which to contact 88.Xr apmd 8 89to 90.Pa sockname . 91.It Fl d 92Do not communicate with the APM daemon; attempt instead to manipulate 93the APM control device directly. 94.El 95.Pp 96The 97.Nm zzz 98variant of this command is an alternative for suspending the system. 99With no arguments, 100.Nm zzz 101places the system into suspend mode. 102The command line flags serve the same purpose as for the 103.Nm 104variant of this command. 105.Pp 106This command does not wait for positive confirmation that the requested 107mode has been entered; to do so would mean the command does not return 108until the system resumes from its sleep state. 109.Sh FILES 110.Pa /var/run/apmdev 111is the default UNIX-domain socket used for communication with 112.Xr apmd 8 . 113The 114.Fl f 115flag may be used to specify an alternate socket name. 116The protection modes on this socket govern which users may access the 117APM functions. 118.Pp 119.Pa /dev/apmctl 120is the control device which is used when the 121.Fl d 122flag is specified; it must be writable for the 123.Fl d 124flag to work successfully. 125.Pa /dev/apm 126is the status device used when the socket is not accessible; it must be 127readable to provide current APM status. 128.Sh SEE ALSO 129.Xr acpi 4 , 130.Xr apm 4 , 131.Xr apmd 8 132.Rs 133.%A Intel Corporation 134.%A Microsoft Corporation 135.%T Advanced Power Management (APM) BIOS Interface Specification 136.%N Revision 1.2 137.%D February 1996 138.Re 139.Sh HISTORY 140The 141.Nm 142command appeared in 143.Nx 1.3 . 144.Pp 145The 146.Tn APM 147specification first appeared in 1992. 148The last update to the standard was made in 1996 - 149the same year when it was superceded by the 150.Tn ACPI 1.0 151standard. 152Thereafter power management on IBM-compatible personal computers has relied on 153.Tn ACPI , 154implemented in 155.Nx 156by the 157.Xr acpi 4 158subsystem. 159The 160.Xr acpi 4 161provides an emulation layer for the legacy 162.Nm . 163