xref: /freebsd/share/man/man4/acpi_hp.4 (revision 9e760f2578249fbdffff2bc90b86f16b2f6b8f69)
1df849145SRui Paulo.\" Copyright (c) 2009 Michael Gmelin
2df849145SRui Paulo.\" All rights reserved.
3df849145SRui Paulo.\"
4df849145SRui Paulo.\" Redistribution and use in source and binary forms, with or without
5df849145SRui Paulo.\" modification, are permitted provided that the following conditions
6df849145SRui Paulo.\" are met:
7df849145SRui Paulo.\" 1. Redistributions of source code must retain the above copyright
8df849145SRui Paulo.\"    notice, this list of conditions and the following disclaimer.
9df849145SRui Paulo.\" 2. Redistributions in binary form must reproduce the above copyright
10df849145SRui Paulo.\"    notice, this list of conditions and the following disclaimer in the
11df849145SRui Paulo.\"    documentation and/or other materials provided with the distribution.
12df849145SRui Paulo.\"
13df849145SRui Paulo.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14df849145SRui Paulo.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15df849145SRui Paulo.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16df849145SRui Paulo.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17df849145SRui Paulo.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18df849145SRui Paulo.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19df849145SRui Paulo.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20df849145SRui Paulo.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21df849145SRui Paulo.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22df849145SRui Paulo.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23df849145SRui Paulo.\" SUCH DAMAGE.
24df849145SRui Paulo.\"
25df849145SRui Paulo.\" $FreeBSD$
26df849145SRui Paulo.\"
279e760f25SRui Paulo.Dd June 30, 2009
28df849145SRui Paulo.Dt ACPI_HP 4 i386
29df849145SRui Paulo.Os
30df849145SRui Paulo.Sh NAME
31df849145SRui Paulo.Nm acpi_hp
32df849145SRui Paulo.Nd "ACPI extras driver for HP laptops"
33df849145SRui Paulo.Sh SYNOPSIS
34df849145SRui PauloTo compile this driver into the kernel,
35df849145SRui Pauloplace the following line in your
36df849145SRui Paulokernel configuration file:
37df849145SRui Paulo.Bd -ragged -offset indent
38df849145SRui Paulo.Cd "device acpi_hp"
39df849145SRui Paulo.Ed
40df849145SRui Paulo.Pp
41df849145SRui PauloAlternatively, to load the driver as a
42df849145SRui Paulomodule at boot time, place the following line in
43df849145SRui Paulo.Xr loader.conf 5 :
44df849145SRui Paulo.Bd -literal -offset indent
45df849145SRui Pauloacpi_hp_load="YES"
46df849145SRui Paulo.Ed
47df849145SRui Paulo.Sh DESCRIPTION
48df849145SRui PauloThe
49df849145SRui Paulo.Nm
50df849145SRui Paulodriver provides support for ACPI-controlled features found on HP laptops
51df849145SRui Paulothat use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p).
52df849145SRui Paulo.Pp
53df849145SRui PauloThe main purpose of this driver is to provide an interface,
54df849145SRui Pauloaccessible via
55df849145SRui Paulo.Xr sysctl 8 ,
56df849145SRui Paulo.Xr devd 8 and
57df849145SRui Paulo.Xr devfs 8 ,
58df849145SRui Paulothrough which applications can determine and change the status of
59df849145SRui Paulovarious laptop components and BIOS settings.
60df849145SRui Paulo.Pp
61df849145SRui Paulo.Ss Xr devd 8 Ss Events
62df849145SRui PauloDevd events received by
63df849145SRui Paulo.Xr devd 8
64df849145SRui Pauloprovide the following information:
65df849145SRui Paulo.Pp
66df849145SRui Paulo.Bl -tag -width "subsystem" -offset indent -compact
67df849145SRui Paulo.It system
68df849145SRui Paulo.Qq Li ACPI
69df849145SRui Paulo.It subsystem
70df849145SRui Paulo.Qq Li HP
71df849145SRui Paulo.It type
72df849145SRui PauloThe source of the event in the ACPI namespace.
73df849145SRui PauloThe value depends on the model.
74df849145SRui Paulo.It notify
75df849145SRui PauloEvent code (see below).
76df849145SRui Paulo.El
77df849145SRui Paulo.Pp
78df849145SRui PauloEvent codes:
79df849145SRui Paulo.Pp
80df849145SRui Paulo.Bl -tag -width "0xc0" -offset indent -compact
81df849145SRui Paulo.It Li 0xc0
82df849145SRui PauloWLAN on air status changed to 0 (not on air)
83df849145SRui Paulo.It Li 0xc1
84df849145SRui PauloWLAN on air status changed to 1 (on air)
85df849145SRui Paulo.It Li 0xd0
86df849145SRui PauloBluetooth on air status changed to 0 (not on air)
87df849145SRui Paulo.It Li 0xd1
88df849145SRui PauloBluetooth on air status changed to 1 (on air)
89df849145SRui Paulo.It Li 0xe0
90df849145SRui PauloWWAN on air status changed to 0 (not on air)
91df849145SRui Paulo.It Li 0xe1
92df849145SRui PauloWWAN on air status changed to 1 (on air)
93df849145SRui Paulo.El
94df849145SRui Paulo.Ss Xr devfs 8 Ss Device
959e760f25SRui PauloYou can read /dev/hpcmi to see your current BIOS settings.
969e760f25SRui PauloThe detail level can be adjusted by setting the sysctl
97df849145SRui Paulo.Va cmi_detail
98df849145SRui Pauloas described below.
99df849145SRui Paulo.Sh SYSCTL VARIABLES
100df849145SRui PauloThe following sysctls are currently implemented:
101df849145SRui Paulo.Ss WLAN:
102df849145SRui Paulo.Bl -tag -width indent
103df849145SRui Paulo.It Va dev.acpi_hp.0.wlan_enabled
104df849145SRui PauloToggle WLAN chip activity.
105df849145SRui Paulo.It Va dev.acpi_hp.0.wlan_radio
106df849145SRui Paulo(read-only)
107df849145SRui PauloWLAN radio status (controlled by hardware switch)
108df849145SRui Paulo.It Va dev.acpi_hp.0.wlan_on_air
109df849145SRui Paulo(read-only)
110df849145SRui PauloWLAN on air (chip enabled, hardware switch enabled + enabled in BIOS)
111df849145SRui Paulo.It Va dev.acpi_hp.0.wlan_enabled_if_radio_on
112df849145SRui PauloIf set to 1, the WLAN chip will be enabled if the radio is turned on
113df849145SRui Paulo.It Va dev.acpi_hp.0.wlan_disable_if_radio_off
114df849145SRui PauloIf set to 1, the WLAN chip will be disabled if the radio is turned off
115df849145SRui Paulo.El
116df849145SRui Paulo.Ss Bluetooth:
117df849145SRui Paulo.Bl -tag -width indent
118df849145SRui Paulo.It Va dev.acpi_hp.0.bt_enabled
119df849145SRui PauloToggle Bluetooth chip activity.
120df849145SRui Paulo.It Va dev.acpi_hp.0.bt_radio
121df849145SRui Paulo(read-only)
122df849145SRui PauloBluetooth radio status (controlled by hardware switch)
123df849145SRui Paulo.It Va dev.acpi_hp.0.bt_on_air
124df849145SRui Paulo(read-only)
125df849145SRui PauloBluetooth on air (chip enabled, hardware switch enabled + enabled in BIOS)
126df849145SRui Paulo.It Va dev.acpi_hp.0.bt_enabled_if_radio_on
127df849145SRui PauloIf set to 1, the Bluetooth chip will be enabled if the radio is turned on
128df849145SRui Paulo.It Va dev.acpi_hp.0.bt_disable_if_radio_off
129df849145SRui PauloIf set to 1, the Bluetooth chip will be disabled if the radio is turned off
130df849145SRui Paulo.El
131df849145SRui Paulo.Ss WWAN:
132df849145SRui Paulo.Bl -tag -width indent
133df849145SRui Paulo.It Va dev.acpi_hp.0.wwan_enabled
134df849145SRui PauloToggle WWAN chip activity.
135df849145SRui Paulo.It Va dev.acpi_hp.0.wwan_radio
136df849145SRui Paulo(read-only)
137df849145SRui PauloWWAN radio status (controlled by hardware switch)
138df849145SRui Paulo.It Va dev.acpi_hp.0.wwan_on_air
139df849145SRui Paulo(read-only)
140df849145SRui PauloWWAN on air (chip enabled, hardware switch enabled + enabled in BIOS)
141df849145SRui Paulo.It Va dev.acpi_hp.0.wwan_enabled_if_radio_on
142df849145SRui PauloIf set to 1, the WWAN chip will be enabled if the radio is turned on
143df849145SRui Paulo.It Va dev.acpi_hp.0.wwan_disable_if_radio_off
144df849145SRui PauloIf set to 1, the WWAN chip will be disabled if the radio is turned off
145df849145SRui Paulo.El
146df849145SRui Paulo.Ss Misc:
147df849145SRui Paulo.Bl -tag -width indent
148df849145SRui Paulo.It Va dev.acpi_hp.0.als_enabled
149df849145SRui PauloToggle ambient light sensor (ALS)
150df849145SRui Paulo.It Va dev.acpi_hp.0.display
151df849145SRui Paulo(read-only)
152df849145SRui PauloDisplay status (bitmask)
153df849145SRui Paulo.It Va dev.acpi_hp.0.hdd_temperature
154df849145SRui Paulo(read-only)
155df849145SRui PauloHDD temperature
156df849145SRui Paulo.It Va dev.acpi_hp.0.is_docked
157df849145SRui Paulo(read-only)
158df849145SRui PauloDocking station status (1 if docked)
159df849145SRui Paulo.It Va dev.acpi_hp.0.cmi_detail
160df849145SRui PauloBitmask to control detail level in /dev/hpcmi output (values can be ORed).
161df849145SRui Paulo.Bl -tag -width "0x01" -offset indent -compact
162df849145SRui Paulo.It Li 0x01
163df849145SRui PauloShow path component of BIOS setting
164df849145SRui Paulo.It Li 0x02
165df849145SRui PauloShow a list of valid options for the BIOS setting
166df849145SRui Paulo.It Li 0x04
167df849145SRui PauloShow additional flags of BIOS setting (ReadOnly etc.)
1680f73b657SRui Paulo.It Li 0x08
1699e760f25SRui PauloQuery highest BIOS entry instance.
1709e760f25SRui PauloThis is broken on many HP models and therefore disabled by default.
171df849145SRui Paulo.El
1729e760f25SRui Paulo.It Va dev.acpi_hp.0.verbose
1739e760f25SRui Paulo(read-only)
1749e760f25SRui PauloSet verbosity level
175df849145SRui Paulo.El
176df849145SRui Paulo.Pp
177df849145SRui PauloDefaults for these sysctls can be set in
178df849145SRui Paulo.Xr sysctl.conf 5 .
1799e760f25SRui Paulo.Sh HARDWARE
1809e760f25SRui PauloThe
1819e760f25SRui Paulo.Nm
1829e760f25SRui Paulodriver has been reported to support the following hardware:
1839e760f25SRui Paulo.Pp
1849e760f25SRui Paulo.Bl -bullet -compact
1859e760f25SRui Paulo.It
1869e760f25SRui PauloHP Compaq 8510p
1879e760f25SRui Paulo.It
1889e760f25SRui PauloHP Compaq nx7300
1899e760f25SRui Paulo.El
1909e760f25SRui Paulo.Pp
1919e760f25SRui PauloIt should work on most HP laptops that feature a WMI enabled BIOS.
192df849145SRui Paulo.Sh FILES
193df849145SRui Paulo.Bl -tag -width ".Pa /dev/hpcmi"
194df849145SRui Paulo.It Pa /dev/hpcmi
195df849145SRui PauloInterface to read BIOS settings
196df849145SRui Paulo.El
197df849145SRui Paulo.Sh EXAMPLES
198df849145SRui PauloThe following can be added to
199df849145SRui Paulo.Xr devd.conf 5
200df849145SRui Pauloin order disable the LAN interface when WLAN on air and reenable if it's
201df849145SRui Paulonot:
202df849145SRui Paulo.Bd -literal -offset indent
203df849145SRui Paulonotify 0 {
204df849145SRui Paulo	match "system"          "ACPI";
205df849145SRui Paulo	match "subsystem"       "HP";
206df849145SRui Paulo	match "notify"          "0xc0";
207df849145SRui Paulo	action                  "ifconfig em0 up";
208df849145SRui Paulo};
209df849145SRui Paulo
210df849145SRui Paulonotify 0 {
211df849145SRui Paulo	match "system"          "ACPI";
212df849145SRui Paulo	match "subsystem"       "HP";
213df849145SRui Paulo	match "notify"          "0xc1";
214df849145SRui Paulo	action                  "ifconfig em0 down";
215df849145SRui Paulo};
216df849145SRui Paulo.Ed
217df849145SRui Paulo.Pp
218df849145SRui PauloEnable the ambient light sensor:
219df849145SRui Paulo.Bd -literal -offset indent
220df849145SRui Paulosysctl dev.acpi_hp.0.als_enabled=1
221df849145SRui Paulo.Ed
222df849145SRui Paulo.Pp
223df849145SRui PauloEnable Bluetooth:
224df849145SRui Paulo.Bd -literal -offset indent
225df849145SRui Paulosysctl dev.acpi_hp.0.bt_enabled=1
226df849145SRui Paulo.Ed
227df849145SRui Paulo.Pp
228df849145SRui PauloGet BIOS settings:
229df849145SRui Paulo.Bd -literal -offset indent
230df849145SRui Paulocat /dev/hpcmi
231df849145SRui Paulo
232df849145SRui PauloSerial Port                                Disable
233df849145SRui PauloInfrared Port                              Enable
234df849145SRui PauloParallel Port                              Disable
235df849145SRui PauloFlash Media Reader                         Disable
236df849145SRui PauloUSB Ports including Express Card slot      Enable
237df849145SRui Paulo1394 Port                                  Enable
238df849145SRui PauloCardbus Slot                               Disable
239df849145SRui PauloExpress Card Slot                          Disable
240df849145SRui Paulo(...)
241df849145SRui Paulo.Ed
242df849145SRui Paulo.Pp
243df849145SRui PauloSet maximum detail level for /dev/hpcmi output:
244df849145SRui Paulo.Bd -literal -offset indent
245df849145SRui Paulosysctl dev.acpi_hp.0.cmi_detail=7
246df849145SRui Paulo.Ed
247df849145SRui Paulo.Pp
248df849145SRui Paulo.Sh SEE ALSO
249df849145SRui Paulo.Xr acpi 4 ,
250df849145SRui Paulo.Xr acpi_wmi 4 ,
251df849145SRui Paulo.Xr sysctl.conf 5 ,
252df849145SRui Paulo.Xr devd 8 ,
253df849145SRui Paulo.Xr devfs 8 ,
254df849145SRui Paulo.Xr sysctl 8
255df849145SRui Paulo.Sh HISTORY
256df849145SRui PauloThe
257df849145SRui Paulo.Nm
258df849145SRui Paulodevice driver first appeared in
259df849145SRui Paulo.Fx CURRENT .
260df849145SRui Paulo.Sh AUTHORS
261df849145SRui Paulo.An -nosplit
262df849145SRui PauloThe
263df849145SRui Paulo.Nm
264df849145SRui Paulodriver was written by
265df849145SRui Paulo.An Michael Gmelin Aq freebsd@grem.de
266df849145SRui Paulo.Pp
267df849145SRui PauloIt has been inspired by hp-wmi driver, which implements a subset of these
268df849145SRui Paulofeatures (hotkeys) on Linux.
269df849145SRui Paulo.Pp
270df849145SRui Paulo.Bl -tag -width indent
271df849145SRui Paulo.It HP CMI whitepaper:
272df849145SRui Paulohttp://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf
273df849145SRui Paulo.It wmi-hp for Linux:
274df849145SRui Paulohttp://www.kernel.org
275df849145SRui Paulo.It WMI and ACPI:
276df849145SRui Paulohttp://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx
277df849145SRui Paulo.El
278df849145SRui Paulo.Pp
279df849145SRui PauloThis manual page was written by
280df849145SRui Paulo.An Michael Gmelin Aq freebsd@grem.de
281df849145SRui Paulo.Sh BUGS
282df849145SRui PauloThis driver is experimental and has only been tested on CURRENT i386 on an
283df849145SRui PauloHP Compaq 8510p which featured all supported wireless devices (WWAN/BT/WLAN).
284df849145SRui PauloExpect undefined results when operating on different hardware.
285df849145SRui Paulo.Pp
286df849145SRui PauloLoading the driver is slow. Reading from /dev/hpcmi is even slower.
287df849145SRui Paulo.Pp
288df849145SRui PauloAdditional features like HP specific sensor readings or writing BIOS
289df849145SRui Paulosettings are not supported.
290