summaryrefslogtreecommitdiffstats
path: root/share/man/man4/acpi_hp.4
blob: 028d19a491c23b429e1aec5a01b39f56d6ca22cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
.\" Copyright (c) 2009 Michael Gmelin
.\" 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 AUTHOR 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 AUTHOR 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.
.\"
.\" $FreeBSD$
.\"
.Dd February 8, 2010
.Dt ACPI_HP 4
.Os
.Sh NAME
.Nm acpi_hp
.Nd "ACPI extras driver for HP laptops"
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following line in your
kernel configuration file:
.Bd -ragged -offset indent
.Cd "device acpi_hp"
.Ed
.Pp
Alternatively, to load the driver as a
module at boot time, place the following line in
.Xr loader.conf 5 :
.Bd -literal -offset indent
acpi_hp_load="YES"
.Ed
.Sh DESCRIPTION
The
.Nm
driver provides support for ACPI-controlled features found on HP laptops
that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p).
.Pp
The main purpose of this driver is to provide an interface,
accessible via
.Xr sysctl 8 ,
.Xr devd 8 and
.Xr devfs 8 ,
through which applications can determine and change the status of
various laptop components and BIOS settings.
.Pp
.Ss Xr devd 8 Ss Events
Devd events received by
.Xr devd 8
provide the following information:
.Pp
.Bl -tag -width "subsystem" -offset indent -compact
.It system
.Qq Li ACPI
.It subsystem
.Qq Li HP
.It type
The source of the event in the ACPI namespace.
The value depends on the model.
.It notify
Event code (see below).
.El
.Pp
Event codes:
.Pp
.Bl -tag -width "0xc0" -offset indent -compact
.It Li 0xc0
WLAN on air status changed to 0 (not on air)
.It Li 0xc1
WLAN on air status changed to 1 (on air)
.It Li 0xd0
Bluetooth on air status changed to 0 (not on air)
.It Li 0xd1
Bluetooth on air status changed to 1 (on air)
.It Li 0xe0
WWAN on air status changed to 0 (not on air)
.It Li 0xe1
WWAN on air status changed to 1 (on air)
.El
.Ss Xr devfs 8 Ss Device
You can read /dev/hpcmi to see your current BIOS settings.
The detail level can be adjusted by setting the sysctl
.Va cmi_detail
as described below.
.Sh SYSCTL VARIABLES
The following sysctls are currently implemented:
.Ss WLAN:
.Bl -tag -width indent
.It Va dev.acpi_hp.0.wlan_enabled
Toggle WLAN chip activity.
.It Va dev.acpi_hp.0.wlan_radio
(read-only)
WLAN radio status (controlled by hardware switch)
.It Va dev.acpi_hp.0.wlan_on_air
(read-only)
WLAN on air (chip enabled, hardware switch enabled + enabled in BIOS)
.It Va dev.acpi_hp.0.wlan_enabled_if_radio_on
If set to 1, the WLAN chip will be enabled if the radio is turned on
.It Va dev.acpi_hp.0.wlan_disable_if_radio_off
If set to 1, the WLAN chip will be disabled if the radio is turned off
.El
.Ss Bluetooth:
.Bl -tag -width indent
.It Va dev.acpi_hp.0.bt_enabled
Toggle Bluetooth chip activity.
.It Va dev.acpi_hp.0.bt_radio
(read-only)
Bluetooth radio status (controlled by hardware switch)
.It Va dev.acpi_hp.0.bt_on_air
(read-only)
Bluetooth on air (chip enabled, hardware switch enabled + enabled in BIOS)
.It Va dev.acpi_hp.0.bt_enabled_if_radio_on
If set to 1, the Bluetooth chip will be enabled if the radio is turned on
.It Va dev.acpi_hp.0.bt_disable_if_radio_off
If set to 1, the Bluetooth chip will be disabled if the radio is turned off
.El
.Ss WWAN:
.Bl -tag -width indent
.It Va dev.acpi_hp.0.wwan_enabled
Toggle WWAN chip activity.
.It Va dev.acpi_hp.0.wwan_radio
(read-only)
WWAN radio status (controlled by hardware switch)
.It Va dev.acpi_hp.0.wwan_on_air
(read-only)
WWAN on air (chip enabled, hardware switch enabled + enabled in BIOS)
.It Va dev.acpi_hp.0.wwan_enabled_if_radio_on
If set to 1, the WWAN chip will be enabled if the radio is turned on
.It Va dev.acpi_hp.0.wwan_disable_if_radio_off
If set to 1, the WWAN chip will be disabled if the radio is turned off
.El
.Ss Misc:
.Bl -tag -width indent
.It Va dev.acpi_hp.0.als_enabled
Toggle ambient light sensor (ALS)
.It Va dev.acpi_hp.0.display
(read-only)
Display status (bitmask)
.It Va dev.acpi_hp.0.hdd_temperature
(read-only)
HDD temperature
.It Va dev.acpi_hp.0.is_docked
(read-only)
Docking station status (1 if docked)
.It Va dev.acpi_hp.0.cmi_detail
Bitmask to control detail level in /dev/hpcmi output (values can be ORed).
.Bl -tag -width "0x01" -offset indent -compact
.It Li 0x01
Show path component of BIOS setting
.It Li 0x02
Show a list of valid options for the BIOS setting
.It Li 0x04
Show additional flags of BIOS setting (ReadOnly etc.)
.It Li 0x08
Query highest BIOS entry instance.
This is broken on many HP models and therefore disabled by default.
.El
.It Va dev.acpi_hp.0.verbose
(read-only)
Set verbosity level
.El
.Pp
Defaults for these sysctls can be set in
.Xr sysctl.conf 5 .
.Sh HARDWARE
The
.Nm
driver has been reported to support the following hardware:
.Pp
.Bl -bullet -compact
.It
HP Compaq 8510p
.It
HP Compaq nx7300
.El
.Pp
It should work on most HP laptops that feature a WMI enabled BIOS.
.Sh FILES
.Bl -tag -width ".Pa /dev/hpcmi"
.It Pa /dev/hpcmi
Interface to read BIOS settings
.El
.Sh EXAMPLES
The following can be added to
.Xr devd.conf 5
in order disable the LAN interface when WLAN on air and reenable if it's
not:
.Bd -literal -offset indent
notify 0 {
	match "system"          "ACPI";
	match "subsystem"       "HP";
	match "notify"          "0xc0";
	action                  "ifconfig em0 up";
};

notify 0 {
	match "system"          "ACPI";
	match "subsystem"       "HP";
	match "notify"          "0xc1";
	action                  "ifconfig em0 down";
};
.Ed
.Pp
Enable the ambient light sensor:
.Bd -literal -offset indent
sysctl dev.acpi_hp.0.als_enabled=1
.Ed
.Pp
Enable Bluetooth:
.Bd -literal -offset indent
sysctl dev.acpi_hp.0.bt_enabled=1
.Ed
.Pp
Get BIOS settings:
.Bd -literal -offset indent
cat /dev/hpcmi

Serial Port                                Disable
Infrared Port                              Enable
Parallel Port                              Disable
Flash Media Reader                         Disable
USB Ports including Express Card slot      Enable
1394 Port                                  Enable
Cardbus Slot                               Disable
Express Card Slot                          Disable
(...)
.Ed
.Pp
Set maximum detail level for /dev/hpcmi output:
.Bd -literal -offset indent
sysctl dev.acpi_hp.0.cmi_detail=7
.Ed
.Sh SEE ALSO
.Xr acpi 4 ,
.Xr acpi_wmi 4 ,
.Xr sysctl.conf 5 ,
.Xr devd 8 ,
.Xr devfs 8 ,
.Xr sysctl 8
.Sh HISTORY
The
.Nm
device driver first appeared in
.Fx 8.0 .
.Sh AUTHORS
.An -nosplit
The
.Nm
driver was written by
.An Michael Gmelin Aq freebsd@grem.de .
.Pp
It has been inspired by hp-wmi driver, which implements a subset of these
features (hotkeys) on Linux.
.Bl -tag -width indent
.It HP CMI whitepaper:
http://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf
.It wmi-hp for Linux:
http://www.kernel.org
.It WMI and ACPI:
http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx
.El
.Pp
This manual page was written by
.An Michael Gmelin Aq freebsd@grem.de .
.Sh BUGS
This driver is experimental and has only been tested on i386 on an
HP Compaq 8510p which featured all supported wireless devices (WWAN/BT/WLAN).
Expect undefined results when operating on different hardware.
.Pp
Loading the driver is slow. Reading from /dev/hpcmi is even slower.
.Pp
Additional features like HP specific sensor readings or writing BIOS
settings are not supported.
OpenPOWER on IntegriCloud