1 .\" $NetBSD: apmd.8,v 1.19 2008/04/30 13:11:01 martin Exp $
3 .\" Copyright (c) 1996 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
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.
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.
35 .Nd Advanced Power Management monitor daemon
49 .Op Fl o Ar sockowner:sockgroup
56 monitors the advanced power management (APM) pseudo-device, acting on
57 signaled events and upon user requests as sent by the
62 daemon is only installed on supported platforms.
64 For suspend and standby request events delivered by the BIOS, or via
67 runs the appropriate configuration program (if one exists),
68 syncs the buffer cache to disk and initiates the requested mode.
69 When resuming after suspend or standby,
71 runs the appropriate configuration utility (if one exists).
72 For power status change events,
74 fetches the current status and reports it via
80 announces the transition to standby mode with a single high tone on the
84 Suspends are announced with two high tones.
87 periodically polls the APM driver for the current power state.
88 If the battery charge level changes substantially or the external power
89 status changes, the new status is logged.
90 The polling rate defaults to
91 once per 10 minutes, but may be specified using the
96 supports the following options:
99 Any BIOS-initiated suspend or standby requests are
100 ignored if the system is connected to line current and not running from
101 batteries (user requests are still honored).
103 Enter debug mode, log to facility
105 and stay in the foreground on the controlling terminal.
107 Specify an alternate device file name.
109 A low-battery event causes a suspend request to occur.
116 .Pa /var/run/apmdev .
117 .It Fl o Ar sockowner:sockgroup
119 .Ar sockowner:sockgroup
122 for the owner/group of
123 .Pa /var/run/apmdev .
125 Do not announce suspend and standby requests on the speaker.
127 The current battery statistics are reported via
129 and exit without monitoring the APM status.
131 Specify an alternate socket name (used by
136 Change the polling rate from 600 seconds to
140 Periodically log the power status via
144 When a client requests a suspend or stand-by mode,
146 does not wait for positive confirmation that the requested
147 mode has been entered before replying to the client; to do so would mean
148 the client does not get a reply until the system resumes from its sleep state.
151 replies with the intended state to the client and then places the system
152 in the requested mode after running the configuration script and
153 flushing the buffer cache.
155 Actions can be configured for the five transitions:
162 The suspend and standby actions are run prior to
164 performing any other actions (such as disk syncs) and entering the new
166 The resume program is run after resuming from a stand-by or suspended state.
168 The line and battery actions are run after switching power sources to
169 AC (line) or battery, respectively.
170 The appropriate line or battery action
171 is also run upon the startup of apmd based on the current power source.
173 .Bl -tag -width /etc/apm/suspend -compact
174 .It Pa /etc/apm/suspend
175 .It Pa /etc/apm/standby
176 .It Pa /etc/apm/resume
178 .It Pa /etc/apm/battery
179 Contain the host's customized actions.
180 Each file must be an executable binary or shell script suitable
184 If you wish to have the same program or script control all transitions, it
185 may determine which transition is in progress by examining its
187 which is set to one of
195 .Pa /usr/share/examples/apm/script
196 for such an example script.
198 .It Pa /var/run/apmdev
199 The default UNIX-domain socket used for communication with
201 The socket is protected by default to mode 0660, UID 0, GID 0.
204 The default device used to control the APM kernel driver.
214 Advanced Power Management (APM) BIOS Interface Specification (revision
215 1.1), Intel Corporation and Microsoft Corporation.