The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.\" Copyright (c) 1999 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
|
|
|
|
.\" Copyright (c) 1999 KOIE Hidetaka <koie@suri.co.jp>
|
2010-11-07 07:16:35 +00:00
|
|
|
.\" Copyright (c) 1999 Yoshihiko SARUMARU <mistral@imasy.or.jp>
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.\" Copyright (c) 1999 Norihiro Kumagai <kuma@nk.rim.or.jp>
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" @(#)apmd.8 1.1 (FreeBSD) 6/28/99
|
1999-08-28 01:35:59 +00:00
|
|
|
.\" $FreeBSD$
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.\"
|
|
|
|
.Dd June 28, 1999
|
2004-01-21 13:38:17 +00:00
|
|
|
.Dt APMD 8 i386
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm apmd
|
|
|
|
.Nd Advanced Power Management monitor daemon
|
|
|
|
.Sh SYNOPSIS
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.Op Fl d
|
|
|
|
.Op Fl f file
|
2003-06-22 05:34:45 +00:00
|
|
|
.Op Fl s
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.Op Fl v
|
|
|
|
.Sh DESCRIPTION
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
monitors the occurrence of the specified Advanced Power Management
|
2001-08-07 15:48:51 +00:00
|
|
|
.Pq Tn APM
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
events and, if one of the events occurs, it executes the sequence of
|
2004-07-02 23:13:00 +00:00
|
|
|
commands corresponding to the event.
|
|
|
|
Only the events specified in the
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
configuration file are notified to
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm ;
|
2004-07-02 23:13:00 +00:00
|
|
|
all other events are ignored.
|
|
|
|
For each event posted by the APM BIOS,
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
invokes the sequence of commands specified in the configuration file.
|
|
|
|
When
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2001-07-15 08:06:20 +00:00
|
|
|
is running with monitoring suspend/standby requests,
|
|
|
|
the kernel will not process those requests.
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
Therefore, if you wish action to be taken when these events
|
2001-07-15 08:06:20 +00:00
|
|
|
occur, you need to explicitly configure the appropriate commands or
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
built-in functions in the configuration file.
|
|
|
|
.Pp
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility recognizes the following runtime options:
|
2012-03-26 21:22:53 +00:00
|
|
|
.Bl -tag -width f_file
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.It Fl d
|
2004-07-02 23:13:00 +00:00
|
|
|
Starts in debug mode.
|
|
|
|
This causes
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
to execute in the foreground instead of in daemon mode.
|
|
|
|
.It Fl f Ar file
|
|
|
|
Specifies a different configuration file
|
|
|
|
.Ar file
|
|
|
|
to be used in place of the default
|
|
|
|
.Pa /etc/apmd.conf .
|
2003-06-22 05:34:45 +00:00
|
|
|
.It Fl s
|
|
|
|
Causes
|
|
|
|
.Nm
|
|
|
|
to simulate a POWERSTATECHANGE event when a power state change is detected
|
2005-02-13 22:25:33 +00:00
|
|
|
(AC_POWER_STATE) but the bios of the laptop does not report it.
|
2003-06-22 05:34:45 +00:00
|
|
|
This enables you to do things like dimming the LCD backlight when you unplug
|
|
|
|
the power cord.
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.It Fl v
|
|
|
|
Verbose mode.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
When
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
starts, it reads the configuration file
|
2001-08-07 15:48:51 +00:00
|
|
|
.Pa ( /etc/apmd.conf
|
|
|
|
as default)
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
and notifies the set of events to be monitored to the APM device driver.
|
|
|
|
When it terminates, the APM device driver automatically cancels
|
|
|
|
monitored events.
|
|
|
|
.Pp
|
2001-07-15 08:06:20 +00:00
|
|
|
If the
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2010-05-14 14:26:56 +00:00
|
|
|
process receives a
|
|
|
|
.Dv SIGHUP ,
|
|
|
|
it will reread its configuration file and
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
notify the APM device driver of any changes to its configuration.
|
|
|
|
.Pp
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility uses the device
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.Pa /dev/apmctl
|
|
|
|
to issue
|
|
|
|
.Xr ioctl 2
|
|
|
|
requests for monitoring events and for controlling the APM system.
|
|
|
|
This device file is opened exclusively, so only a single
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
process can be running at any time.
|
|
|
|
.Pp
|
2001-07-15 08:06:20 +00:00
|
|
|
When
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
receives an APM event, it forks a child process to execute the
|
|
|
|
commands specified in the configuration file and then continues
|
2004-07-02 23:13:00 +00:00
|
|
|
listening for more events.
|
|
|
|
The child process executes the commands
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
specified, one at a time and in the order that they are listed.
|
|
|
|
.Pp
|
2001-07-15 08:06:20 +00:00
|
|
|
While
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
is processing the command list for SUSPEND/STANDBY requests, the APM kernel
|
|
|
|
device driver issues notifications to APM BIOS once per second so that the
|
|
|
|
BIOS knows that there are still some commands pending, and that it should not
|
|
|
|
complete the request just yet.
|
|
|
|
.Pp
|
|
|
|
The
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility creates the file
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.Pa /var/run/apmd.pid ,
|
|
|
|
and stores its process
|
|
|
|
id there.
|
|
|
|
This can be used to kill or reconfigure
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm .
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.Sh CONFIGURATION FILE
|
|
|
|
The structure of the
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2004-07-02 23:13:00 +00:00
|
|
|
configuration file is quite simple.
|
|
|
|
For example:
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.Bd -literal
|
|
|
|
apm_event SUSPENDREQ {
|
|
|
|
exec "sync && sync && sync";
|
|
|
|
exec "sleep 1";
|
|
|
|
exec "zzz";
|
|
|
|
}
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
will cause
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
1999-10-30 19:42:31 +00:00
|
|
|
to receive the APM event
|
2001-07-15 08:06:20 +00:00
|
|
|
.Ql SUSPENDREQ
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
(which may be posted by an LCD close), run the
|
|
|
|
.Ql sync
|
|
|
|
command 3 times and wait for a while, then execute
|
1999-10-30 19:42:31 +00:00
|
|
|
.Nm zzz ( Ns Nm apm Fl z )
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
to put the system in the suspend state.
|
|
|
|
.Bl -bullet
|
|
|
|
.It
|
2004-07-03 18:35:53 +00:00
|
|
|
The apm_event keyword
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.Bd -ragged -offset indent
|
|
|
|
.Ql apm_event
|
|
|
|
is the keyword which indicates the start of configuration for
|
2010-05-14 14:26:56 +00:00
|
|
|
each event.
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.Ed
|
|
|
|
.It
|
|
|
|
APM events
|
|
|
|
.Bd -ragged -offset indent
|
|
|
|
If you wish to execute the same commands for different events, the
|
2004-07-02 23:13:00 +00:00
|
|
|
event names should be delimited by a comma.
|
|
|
|
The following are
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
valid event names:
|
|
|
|
.Bl -item
|
|
|
|
.It
|
|
|
|
- Events ignored by the kernel if
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
is running:
|
|
|
|
.Pp
|
2000-12-27 15:30:30 +00:00
|
|
|
.Bl -tag -width USERSUSPENDREQ -compact -offset indent
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.It STANDBYREQ
|
1999-09-11 16:00:28 +00:00
|
|
|
.It USERSTANDBYREQ
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.It SUSPENDREQ
|
|
|
|
should include sync in the command list,
|
|
|
|
.It USERSUSPENDREQ
|
|
|
|
should include sync in the command list,
|
|
|
|
.It BATTERYLOW
|
|
|
|
only zzz should be specified in the command list.
|
|
|
|
.El
|
|
|
|
.It
|
|
|
|
- Events passed to
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
after kernel handling:
|
|
|
|
.Pp
|
2000-12-27 15:30:30 +00:00
|
|
|
.Bl -tag -width USERSUSPENDREQ -compact -offset indent
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.It NORMRESUME
|
|
|
|
.It CRITRESUME
|
|
|
|
.It STANDBYRESUME
|
|
|
|
.It POWERSTATECHANGE
|
|
|
|
.It UPDATETIME
|
1999-09-11 16:00:28 +00:00
|
|
|
.It CAPABILITIESCHANGE
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
2001-07-15 08:06:20 +00:00
|
|
|
Other events will not be sent to
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm .
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.El
|
|
|
|
.Ed
|
|
|
|
.It
|
|
|
|
command line syntax
|
|
|
|
.Bd -ragged -offset indent
|
2002-12-27 12:15:40 +00:00
|
|
|
In the example above, the three lines beginning with
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.Ql exec
|
|
|
|
are commands for the event.
|
2001-07-15 08:06:20 +00:00
|
|
|
Each line should be terminated with a semicolon.
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
The command list for the event should be enclosed by
|
|
|
|
.Ql {
|
|
|
|
and
|
|
|
|
.Ql } .
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility uses
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.Pa /bin/sh
|
|
|
|
for double-quotation enclosed command execution, just as with
|
|
|
|
.Xr system 3 .
|
|
|
|
Each command is executed in order until the end of
|
2001-07-15 08:06:20 +00:00
|
|
|
the list is reached or a command finishes with a non-zero status code.
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility will report any failed command's status code via
|
2001-07-15 08:06:20 +00:00
|
|
|
.Xr syslog 3
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
and will then reject the request event posted by the APM BIOS.
|
|
|
|
.Ed
|
|
|
|
.It
|
|
|
|
Built-in functions
|
|
|
|
.Bd -ragged -offset indent
|
|
|
|
You can also specify
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
built-in functions instead of command lines.
|
|
|
|
A built-in function name should be terminated with a semicolon,
|
|
|
|
just as with a command line.
|
|
|
|
The following built-in functions are currently supported:
|
|
|
|
.Bl -item
|
|
|
|
.It
|
2012-06-13 18:57:27 +00:00
|
|
|
.Bl -tag -width ".It - reject"
|
|
|
|
.It - reject
|
2004-07-02 23:13:00 +00:00
|
|
|
Reject last request posted by APM BIOS.
|
|
|
|
This can be used to reject
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
a SUSPEND request when the LCD is closed and put the system in a
|
|
|
|
STANDBY state instead.
|
2012-06-13 18:57:27 +00:00
|
|
|
.El
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.El
|
2001-01-18 17:23:15 +00:00
|
|
|
.Ed
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.El
|
2005-01-18 20:02:45 +00:00
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width /etc/apmd.conf -compact
|
|
|
|
.It Pa /etc/apmd.conf
|
|
|
|
.It Pa /dev/apmctl
|
|
|
|
.It Pa /var/run/apmd.pid
|
|
|
|
.El
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.Sh EXAMPLES
|
|
|
|
Sample configuration commands include:
|
|
|
|
.Bd -literal
|
|
|
|
apm_event SUSPENDREQ {
|
2003-12-30 17:40:28 +00:00
|
|
|
exec "/etc/rc.suspend apm suspend";
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
apm_event USERSUSPENDREQ {
|
|
|
|
exec "sync && sync && sync";
|
|
|
|
exec "sleep 1";
|
|
|
|
exec "apm -z";
|
|
|
|
}
|
|
|
|
|
2003-12-30 17:40:28 +00:00
|
|
|
apm_event NORMRESUME {
|
|
|
|
exec "/etc/rc.resume apm suspend";
|
|
|
|
}
|
|
|
|
|
|
|
|
apm_event STANDBYRESUME {
|
|
|
|
exec "/etc/rc.resume apm standby";
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# resume event configuration for serial mouse users by
|
|
|
|
# reinitializing a moused(8) connected to a serial port.
|
|
|
|
#
|
|
|
|
#apm_event NORMRESUME {
|
|
|
|
# exec "kill -HUP `cat /var/run/moused.pid`";
|
|
|
|
#}
|
|
|
|
#
|
|
|
|
# suspend request event configuration for ATA HDD users:
|
|
|
|
# execute standby instead of suspend.
|
|
|
|
#
|
|
|
|
#apm_event SUSPENDREQ {
|
|
|
|
# reject;
|
|
|
|
# exec "sync && sync && sync";
|
|
|
|
# exec "sleep 1";
|
|
|
|
# exec "apm -Z";
|
|
|
|
#}
|
|
|
|
.Ed
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr apm 4 ,
|
2000-01-23 13:30:44 +00:00
|
|
|
.Xr apm 8
|
2005-01-18 20:02:45 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility appeared in
|
|
|
|
.Fx 3.3 .
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.Sh AUTHORS
|
2014-06-20 09:57:27 +00:00
|
|
|
.An Mitsuru IWASAKI Aq Mt iwasaki@FreeBSD.org
|
|
|
|
.An KOIE Hidetaka Aq Mt koie@suri.co.jp
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
.Pp
|
2005-01-18 20:04:14 +00:00
|
|
|
.An -nosplit
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
Some contributions made by
|
2014-06-20 09:57:27 +00:00
|
|
|
.An Warner Losh Aq Mt imp@FreeBSD.org ,
|
|
|
|
.An Hiroshi Yamashita Aq Mt bluemoon@msj.biglobe.ne.jp ,
|
|
|
|
.An Yoshihiko SARUMARU Aq Mt mistral@imasy.or.jp ,
|
|
|
|
.An Norihiro Kumagai Aq Mt kuma@nk.rim.or.jp ,
|
|
|
|
.An NAKAGAWA Yoshihisa Aq Mt nakagawa@jp.FreeBSD.org ,
|
The apmd package provides a means of handling various APM events from
userland code. Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.
Have Fun!
Submitted by: iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by: -hackers, -mobile and bsd-nomads ML folks.
Contributed by: Warner Losh <imp@FreeBSD.org>,
Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
Yoshihiko SARUMARU <mistral@imasy.or.jp>,
Norihiro Kumagai <kuma@nk.rim.or.jp>,
NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00
|
|
|
and
|
2014-06-20 09:57:27 +00:00
|
|
|
.An Nick Hilliard Aq Mt nick@foobar.org .
|