Update this too. As the page was so laconic, and as there is little to write

about the driver, add an example on howto put the system into sleep when the
lid is closed.
This commit is contained in:
jruoho 2010-04-25 06:24:38 +00:00
parent 60723a5539
commit 45fcbf70be
1 changed files with 48 additions and 7 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: acpilid.4,v 1.3 2008/04/30 13:10:53 martin Exp $
.\" $NetBSD: acpilid.4,v 1.4 2010/04/25 06:24:38 jruoho Exp $
.\"
.\" Copyright (c) 2002, 2004 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -24,7 +24,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd April 25, 2004
.Dd April 25, 2010
.Dt ACPILID 4
.Os
.Sh NAME
@ -35,14 +35,55 @@
.Sh DESCRIPTION
The
.Nm
driver supports ACPI Lid switches.
Actions against lid open/close events can be configured using the
driver supports
.Tn ACPI
.Dq lid switches .
The
.Xr powerd 8
daemon.
daemon can be used to control actions against
the events of opening or closing the lid.
The used script is
.Pa /etc/powerd/scripts/lid_switch ,
and the events are either
.Em pressed
(the lid was closed)
or
.Em released
(the lid was opened).
.Sh SEE ALSO
.Xr acpi 4 ,
.\" .Xr sysmon 4 ,
.Xr powerd 8
.Xr powerd 8 ,
.Xr sysmon_pswitch 9
.Sh EXAMPLES
The following example modifies the mentioned script in order to put the
system into
.Pq Tn S3
sleep when the lid is closed:
.Bd -literal -offset indent
\&...
case "${2}" in
pressed)
logger -p info "${0}: suspending..."
# As in sleep_button, kill some daemons.
#
/etc/rc.d/dhcpcd stop
/etc/rc.d/network stop
/etc/rc.d/wpa_supplicant stop
# Suspend.
#
/sbin/sysctl -w machdep.sleep_state=3
# Waking up.
#
/etc/rc.d/wpa_supplicant start
/etc/rc.d/network start
/etc/rc.d/dhcpcd start
\&...
.Ed
.Sh HISTORY
The
.Nm