xref: /openbsd-src/share/man/man4/acpibtn.4 (revision e96bd7fd3509f01e35b4bb2b69084954afeff387)
1.\"	$OpenBSD: acpibtn.4,v 1.6 2021/09/03 12:11:15 kn Exp $
2.\"
3.\" Copyright (c) 2006 Michael Knudsen <mk@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: September 3 2021 $
18.Dt ACPIBTN 4
19.Os
20.Sh NAME
21.Nm acpibtn
22.Nd ACPI button
23.Sh SYNOPSIS
24.Cd "acpibtn* at acpi?"
25.Sh DESCRIPTION
26The
27.Nm
28driver handles events triggered by ACPI buttons.
29Currently, only power button, sleep button and lid status events are supported.
30.Pp
31The power button event is handled according to the
32.Va machdep.pwraction
33.Xr sysctl 8 .
34Valid values are:
35.Pp
36.Bl -tag -width 3n -offset indent -compact
37.It 0
38Do nothing.
39.It 1
40Perform a regular system shutdown and power off the machine if the
41.Va hw.allowpowerdown
42sysctl is set to 1.
43.It 2
44Put the system into suspend (deep sleep) state.
45.El
46.Pp
47The sleep button event puts the system into suspend (deep sleep) state.
48.Pp
49The lid status event is handled according to the
50.Va machdep.lidaction
51sysctl.
52Valid values are:
53.Pp
54.Bl -tag -width 3n -offset indent -compact
55.It 0
56Do nothing.
57.It 1
58Put the system into suspend (deep sleep) state.
59.It 2
60Put the system into hibernation.
61System memory is saved to disk (swap space)
62and the machine is powered down.
63For machines supporting the
64.Xr acpi 4
65style hibernate functionality, on resume a full kernel
66boot will occur, followed by the reading of the saved
67memory image.
68The image will then be unpacked and the system resumed
69at the point immediately after the hibernation request.
70.El
71.Pp
72The lid status is set up as a sensor and can be monitored using
73.Xr sysctl 8
74or
75.Xr sensorsd 8 .
76.Sh SEE ALSO
77.Xr acpi 4 ,
78.Xr intro 4 ,
79.Xr sensorsd 8 ,
80.Xr sysctl 8
81.Sh HISTORY
82The
83.Nm
84driver first appeared in
85.Ox 3.9 .
86.Sh AUTHORS
87.An -nosplit
88The
89.Nm
90driver was written by
91.An Marco Peereboom Aq Mt marco@openbsd.org .
92