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