.\" $NetBSD: acpilid.4,v 1.8 2017/07/03 21:30:58 wiz Exp $ .\" .\" Copyright (c) 2002, 2004 The NetBSD Foundation, Inc. .\" 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. .\" .Dd January 9, 2011 .Dt ACPILID 4 .Os .Sh NAME .Nm acpilid .Nd ACPI Lid Switch .Sh SYNOPSIS .Cd "acpilid* at acpi?" .Sh DESCRIPTION The .Nm driver supports .Tn ACPI .Dq lid switches . The .Xr powerd 8 daemon can be used to control actions against the events of opening or closing the lid. The script used 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 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. # if /sbin/sysctl hw.acpi.sleep.state >/dev/null 2>&1; then /sbin/sysctl -w hw.acpi.sleep.state=3 fi # Waking up. # /etc/rc.d/wpa_supplicant start /etc/rc.d/network start /etc/rc.d/dhcpcd start \&... .Ed .Sh SEE ALSO .Xr acpi 4 , .Xr powerd 8 , .Xr sysmon_pswitch 9 .Sh HISTORY The .Nm driver appeared in .Nx 1.6 . |