1*1ac719d1Swiz.\" $NetBSD: apm.8,v 1.21 2012/04/08 22:00:40 wiz Exp $ 2e1cfddbdSjtc.\" 37e4def2eSjruoho.\" Copyright (c) 1996, 2010 The NetBSD Foundation, Inc. 4b86b6952Sjtk.\" All rights reserved. 5b86b6952Sjtk.\" 6e1cfddbdSjtc.\" This code is derived from software contributed to The NetBSD Foundation 7e1cfddbdSjtc.\" by John Kohl. 8e1cfddbdSjtc.\" 9b86b6952Sjtk.\" Redistribution and use in source and binary forms, with or without 10b86b6952Sjtk.\" modification, are permitted provided that the following conditions 11b86b6952Sjtk.\" are met: 12b86b6952Sjtk.\" 1. Redistributions of source code must retain the above copyright 13b86b6952Sjtk.\" notice, this list of conditions and the following disclaimer. 14b86b6952Sjtk.\" 2. Redistributions in binary form must reproduce the above copyright 15b86b6952Sjtk.\" notice, this list of conditions and the following disclaimer in the 16b86b6952Sjtk.\" documentation and/or other materials provided with the distribution. 17b86b6952Sjtk.\" 18e1cfddbdSjtc.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19e1cfddbdSjtc.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20e1cfddbdSjtc.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2187f4ccd4Sjtc.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2287f4ccd4Sjtc.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23e1cfddbdSjtc.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24e1cfddbdSjtc.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25e1cfddbdSjtc.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26e1cfddbdSjtc.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27e1cfddbdSjtc.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28b86b6952Sjtk.\" POSSIBILITY OF SUCH DAMAGE. 29b86b6952Sjtk.\" 307e4def2eSjruoho.Dd March 20, 2010 31f9502382Swiz.Dt APM 8 32d1407362Sgarbled.Os 33b86b6952Sjtk.Sh NAME 34dc05f41dSmrg.Nm apm , 35dc05f41dSmrg.Nm zzz 36b86b6952Sjtk.Nd Advanced Power Management control program 37b86b6952Sjtk.Sh SYNOPSIS 38990562bfSwiz.Nm 39*1ac719d1Swiz.Op Fl abdlmSsvz 40b86b6952Sjtk.Op Fl f Ar sockname 41d77575d3Smycroft.Nm zzz 42d77575d3Smycroft.Op Fl Sz 43d77575d3Smycroft.Op Fl f Ar sockname 44b86b6952Sjtk.Sh DESCRIPTION 457e4def2eSjruohoThe 46b86b6952Sjtk.Nm 477e4def2eSjruohoprogram communicates with the Advanced Power Management 487e4def2eSjruoho.Pq Tn APM 497e4def2eSjruohodaemon, 50b86b6952Sjtk.Xr apmd 8 , 517e4def2eSjruohomaking requests of the current power status or placing the system either 527e4def2eSjruohointo suspend or stand-by state. 53221899b8SreedThe 54221899b8Sreed.Nm 55221899b8Sreedtool is only installed on supported platforms. 56221899b8Sreed.Pp 57b86b6952SjtkWith no flags, 58b86b6952Sjtk.Nm 59b86b6952Sjtkdisplays the current power management state in verbose form. 60b86b6952Sjtk.Pp 61b86b6952SjtkAvailable command-line flags are: 627e4def2eSjruoho.Bl -tag -width "-f sockname" -compact 63*1ac719d1Swiz.It Fl a 64*1ac719d1SwizDisplay the external charger (A/C status): 0 means disconnected, 1 65*1ac719d1Swizmeans connected, 2 means backup power source, and 255 means unknown. 66b86b6952Sjtk.It Fl b 677e4def2eSjruohoDisplay the battery status: 687e4def2eSjruoho0 means high, 1 means low, 2 means critical, 3 means charging, 697e4def2eSjruoho4 means absent, and 255 means unknown. 70*1ac719d1Swiz.It Fl d 71*1ac719d1SwizDo not communicate with the APM daemon; attempt instead to manipulate 72*1ac719d1Swizthe APM control device directly. 73b86b6952Sjtk.It Fl f Ar sockname 74b86b6952SjtkSet the name of the socket via which to contact 75b86b6952Sjtk.Xr apmd 8 76b86b6952Sjtkto 77b86b6952Sjtk.Pa sockname . 78*1ac719d1Swiz.It Fl l 79*1ac719d1SwizDisplay the estimated battery lifetime in percent. 80*1ac719d1Swiz.It Fl m 81*1ac719d1SwizDisplay the estimated battery lifetime in minutes. 82*1ac719d1Swiz.It Fl S 83*1ac719d1SwizPut the system into stand-by (light sleep) mode. 84*1ac719d1Swiz.It Fl s 85*1ac719d1SwizDisplay if power management is enabled. 86*1ac719d1Swiz.It Fl v 87*1ac719d1SwizRequest more verbose description of the displayed states. 88*1ac719d1Swiz.It Fl z 89*1ac719d1SwizPut the system into suspend (deep sleep) mode. 90b86b6952Sjtk.El 91b86b6952Sjtk.Pp 92b86b6952SjtkThe 93b86b6952Sjtk.Nm zzz 94cdc053b0Smikelvariant of this command is an alternative for suspending the system. 95b86b6952SjtkWith no arguments, 96cdc053b0Smikel.Nm zzz 97b86b6952Sjtkplaces the system into suspend mode. 98b86b6952SjtkThe command line flags serve the same purpose as for the 99955c39c7Slukem.Nm 100b86b6952Sjtkvariant of this command. 101b86b6952Sjtk.Pp 102b86b6952SjtkThis command does not wait for positive confirmation that the requested 103b86b6952Sjtkmode has been entered; to do so would mean the command does not return 104b86b6952Sjtkuntil the system resumes from its sleep state. 105b86b6952Sjtk.Sh FILES 106b86b6952Sjtk.Pa /var/run/apmdev 107b86b6952Sjtkis the default UNIX-domain socket used for communication with 108cdc053b0Smikel.Xr apmd 8 . 109b86b6952SjtkThe 110b86b6952Sjtk.Fl f 111b86b6952Sjtkflag may be used to specify an alternate socket name. 112b86b6952SjtkThe protection modes on this socket govern which users may access the 113b86b6952SjtkAPM functions. 114b86b6952Sjtk.Pp 115b86b6952Sjtk.Pa /dev/apmctl 116b86b6952Sjtkis the control device which is used when the 117b86b6952Sjtk.Fl d 118b86b6952Sjtkflag is specified; it must be writable for the 119b86b6952Sjtk.Fl d 120b86b6952Sjtkflag to work successfully. 121b86b6952Sjtk.Pa /dev/apm 122b86b6952Sjtkis the status device used when the socket is not accessible; it must be 123b86b6952Sjtkreadable to provide current APM status. 124b86b6952Sjtk.Sh SEE ALSO 1257e4def2eSjruoho.Xr acpi 4 , 126f06175c4Smikel.Xr apm 4 , 127f0b2202dSenami.Xr apmd 8 1287e4def2eSjruoho.Rs 1297e4def2eSjruoho.%A Intel Corporation 1307e4def2eSjruoho.%A Microsoft Corporation 1317e4def2eSjruoho.%T Advanced Power Management (APM) BIOS Interface Specification 1327e4def2eSjruoho.%N Revision 1.2 1337e4def2eSjruoho.%D February 1996 1347e4def2eSjruoho.Re 135b86b6952Sjtk.Sh HISTORY 136b86b6952SjtkThe 137cdc053b0Smikel.Nm 138f06175c4Smikelcommand appeared in 139f06175c4Smikel.Nx 1.3 . 1407e4def2eSjruoho.Pp 1417e4def2eSjruohoThe 1427e4def2eSjruoho.Tn APM 1437e4def2eSjruohospecification first appeared in 1992. 1447e4def2eSjruohoThe last update to the standard was made in 1996 - 1457e4def2eSjruohothe same year when it was superceded by the 1467e4def2eSjruoho.Tn ACPI 1.0 1477e4def2eSjruohostandard. 1487e4def2eSjruohoThereafter power management on IBM-compatible personal computers has relied on 1497e4def2eSjruoho.Tn ACPI , 1507e4def2eSjruohoimplemented in 1517e4def2eSjruoho.Nx 1527e4def2eSjruohoby the 1537e4def2eSjruoho.Xr acpi 4 1547e4def2eSjruohosubsystem. 1557e4def2eSjruohoThe 1567e4def2eSjruoho.Xr acpi 4 1577e4def2eSjruohoprovides an emulation layer for the legacy 1587e4def2eSjruoho.Nm . 159