Merge branch 'vendor/DIALOG'
[dragonfly.git] / share / man / man4 / acpi_hp.4
1 .\" Copyright (c) 2009 Michael Gmelin
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD: src/share/man/man4/acpi_hp.4,v 1.7 2010/10/08 12:40:16 uqs Exp $
26 .\"
27 .Dd April 10, 2012
28 .Dt ACPI_HP 4
29 .Os
30 .Sh NAME
31 .Nm acpi_hp
32 .Nd "ACPI extras driver for HP laptops"
33 .Sh SYNOPSIS
34 To compile this driver into the kernel,
35 place the following line in your
36 kernel configuration file:
37 .Bd -ragged -offset indent
38 .Cd "device acpi_hp"
39 .Ed
40 .Pp
41 Alternatively, to load the driver as a
42 module at boot time, place the following line in
43 .Xr loader.conf 5 :
44 .Bd -literal -offset indent
45 acpi_hp_load="YES"
46 .Ed
47 .Sh DESCRIPTION
48 The
49 .Nm
50 driver provides support for ACPI-controlled features found on HP laptops
51 that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p).
52 .Pp
53 The main purpose of this driver is to provide an interface,
54 accessible via
55 .Xr sysctl 8 ,
56 .Xr devd 8
57 and
58 .Xr devfs 5 ,
59 through which applications can determine and change the status of
60 various laptop components and BIOS settings.
61 .Ss Eo
62 .Xr devd 8
63 Events
64 .Ec
65 Devd events received by
66 .Xr devd 8
67 provide the following information:
68 .Pp
69 .Bl -tag -width "subsystem" -offset indent -compact
70 .It system
71 .Qq Li ACPI
72 .It subsystem
73 .Qq Li HP
74 .It type
75 The source of the event in the ACPI namespace.
76 The value depends on the model.
77 .It notify
78 Event code (see below).
79 .El
80 .Pp
81 Event codes:
82 .Pp
83 .Bl -tag -width "0xc0" -offset indent -compact
84 .It Li 0xc0
85 WLAN on air status changed to 0 (not on air)
86 .It Li 0xc1
87 WLAN on air status changed to 1 (on air)
88 .It Li 0xd0
89 Bluetooth on air status changed to 0 (not on air)
90 .It Li 0xd1
91 Bluetooth on air status changed to 1 (on air)
92 .It Li 0xe0
93 WWAN on air status changed to 0 (not on air)
94 .It Li 0xe1
95 WWAN on air status changed to 1 (on air)
96 .El
97 .Ss Eo
98 .Xr devfs 5
99 Device
100 .Ec
101 You can read /dev/hpcmi to see your current BIOS settings.
102 The detail level can be adjusted by setting the sysctl
103 .Va cmi_detail
104 as described below.
105 .Sh SYSCTL VARIABLES
106 The following sysctls are currently implemented:
107 .Ss WLAN:
108 .Bl -tag -width indent
109 .It Va hw.acpi.hp.wlan_enabled
110 Toggle WLAN chip activity.
111 .It Va hw.acpi.hp.wlan_radio
112 (read-only)
113 WLAN radio status (controlled by hardware switch)
114 .It Va hw.acpi.hp.wlan_on_air
115 (read-only)
116 WLAN on air (chip enabled, hardware switch enabled + enabled in BIOS)
117 .It Va hw.acpi.hp.wlan_enabled_if_radio_on
118 If set to 1, the WLAN chip will be enabled if the radio is turned on
119 .It Va hw.acpi.hp.wlan_disable_if_radio_off
120 If set to 1, the WLAN chip will be disabled if the radio is turned off
121 .El
122 .Ss Bluetooth:
123 .Bl -tag -width indent
124 .It Va hw.acpi.hp.bt_enabled
125 Toggle Bluetooth chip activity.
126 .It Va hw.acpi.hp.bt_radio
127 (read-only)
128 Bluetooth radio status (controlled by hardware switch)
129 .It Va hw.acpi.hp.bt_on_air
130 (read-only)
131 Bluetooth on air (chip enabled, hardware switch enabled + enabled in BIOS)
132 .It Va hw.acpi.hp.bt_enabled_if_radio_on
133 If set to 1, the Bluetooth chip will be enabled if the radio is turned on
134 .It Va hw.acpi.hp.bt_disable_if_radio_off
135 If set to 1, the Bluetooth chip will be disabled if the radio is turned off
136 .El
137 .Ss WWAN:
138 .Bl -tag -width indent
139 .It Va hw.acpi.hp.wwan_enabled
140 Toggle WWAN chip activity.
141 .It Va hw.acpi.hp.wwan_radio
142 (read-only)
143 WWAN radio status (controlled by hardware switch)
144 .It Va hw.acpi.hp.wwan_on_air
145 (read-only)
146 WWAN on air (chip enabled, hardware switch enabled + enabled in BIOS)
147 .It Va hw.acpi.hp.wwan_enabled_if_radio_on
148 If set to 1, the WWAN chip will be enabled if the radio is turned on
149 .It Va hw.acpi.hp.wwan_disable_if_radio_off
150 If set to 1, the WWAN chip will be disabled if the radio is turned off
151 .El
152 .Ss Misc:
153 .Bl -tag -width indent
154 .It Va hw.acpi.hp.als_enabled
155 Toggle ambient light sensor (ALS)
156 .It Va hw.acpi.hp.display
157 (read-only)
158 Display status (bitmask)
159 .It Va hw.acpi.hp.hdd_temperature
160 (read-only)
161 HDD temperature
162 .It Va hw.acpi.hp.is_docked
163 (read-only)
164 Docking station status (1 if docked)
165 .It Va hw.acpi.hp.cmi_detail
166 Bitmask to control detail level in /dev/hpcmi output (values can be ORed).
167 .Bl -tag -width "0x01" -offset indent -compact
168 .It Li 0x01
169 Show path component of BIOS setting
170 .It Li 0x02
171 Show a list of valid options for the BIOS setting
172 .It Li 0x04
173 Show additional flags of BIOS setting (ReadOnly etc.)
174 .It Li 0x08
175 Query highest BIOS entry instance.
176 This is broken on many HP models and therefore disabled by default.
177 .El
178 .It Va hw.acpi.hp.verbose
179 (read-only)
180 Set verbosity level
181 .El
182 .Pp
183 Defaults for these sysctls can be set in
184 .Xr sysctl.conf 5 .
185 .Sh HARDWARE
186 The
187 .Nm
188 driver has been reported to support the following hardware:
189 .Pp
190 .Bl -bullet -compact
191 .It
192 HP Compaq 8510p
193 .It
194 HP Compaq nx7300
195 .El
196 .Pp
197 It should work on most HP laptops that feature a WMI enabled BIOS.
198 .Sh FILES
199 .Bl -tag -width ".Pa /dev/hpcmi"
200 .It Pa /dev/hpcmi
201 Interface to read BIOS settings
202 .El
203 .Sh EXAMPLES
204 The following can be added to
205 .Xr devd.conf 5
206 in order disable the LAN interface when WLAN on air and reenable if it's
207 not:
208 .Bd -literal -offset indent
209 notify 0 {
210         match "system"          "ACPI";
211         match "subsystem"       "HP";
212         match "notify"          "0xc0";
213         action                  "ifconfig em0 up";
214 };
215
216 notify 0 {
217         match "system"          "ACPI";
218         match "subsystem"       "HP";
219         match "notify"          "0xc1";
220         action                  "ifconfig em0 down";
221 };
222 .Ed
223 .Pp
224 Enable the ambient light sensor:
225 .Bd -literal -offset indent
226 sysctl hw.acpi.hp.als_enabled=1
227 .Ed
228 .Pp
229 Enable Bluetooth:
230 .Bd -literal -offset indent
231 sysctl hw.acpi.hp.bt_enabled=1
232 .Ed
233 .Pp
234 Get BIOS settings:
235 .Bd -literal -offset indent
236 cat /dev/hpcmi
237
238 Serial Port                                Disable
239 Infrared Port                              Enable
240 Parallel Port                              Disable
241 Flash Media Reader                         Disable
242 USB Ports including Express Card slot      Enable
243 1394 Port                                  Enable
244 Cardbus Slot                               Disable
245 Express Card Slot                          Disable
246 (...)
247 .Ed
248 .Pp
249 Set maximum detail level for /dev/hpcmi output:
250 .Bd -literal -offset indent
251 sysctl hw.acpi.hp.cmi_detail=7
252 .Ed
253 .Sh SEE ALSO
254 .Xr acpi 4 ,
255 .Xr acpi_wmi 4 ,
256 .Xr devfs 5 ,
257 .Xr sysctl.conf 5 ,
258 .Xr devd 8 ,
259 .Xr sysctl 8
260 .Sh HISTORY
261 The
262 .Nm
263 device driver was ported from
264 .Fx
265 to
266 .Dx 2.5 .
267 .Sh AUTHORS
268 .An -nosplit
269 The
270 .Nm
271 driver was written by
272 .An Michael Gmelin Aq Mt freebsd@grem.de .
273 .Pp
274 It has been inspired by hp-wmi driver, which implements a subset of these
275 features (hotkeys) on Linux.
276 .Bl -tag -width indent
277 .It HP CMI whitepaper:
278 http://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf
279 .It wmi-hp for Linux:
280 http://www.kernel.org
281 .It WMI and ACPI:
282 http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx
283 .El
284 .Pp
285 This manual page was written by
286 .An Michael Gmelin Aq Mt freebsd@grem.de .
287 .Sh BUGS
288 This driver is experimental and has only been tested on an
289 .Tn HP Compaq 8510p
290 (i386) and an
291 .Tn HP Compaq nc6320
292 (x86_64) which featured all supported wireless devices (WWAN/BT/WLAN).
293 Expect undefined results when operating on different hardware.
294 .Pp
295 Loading the driver is slow. Reading from /dev/hpcmi is even slower.
296 .Pp
297 Additional features like HP specific sensor readings or writing BIOS
298 settings are not supported.