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