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