ACPI_HP(4)
π» acpi_hp β the ACPI extras driver for HP laptops π
okay so real talk, this one's from the Kernel Interfaces Manual (ACPI_HP(4)), and it's basically the little driver that lets your HP laptop spill its BIOS tea to userspace. let's get into it π«Ά
β¨ NAME β¨
acpi_hp β the ACPI extras driver for HP laptops. that's it, that's the vibe π
πΈ SYNOPSIS πΈ
to compile this driver into the kernel (main character energy, no modules), drop this line into your kernel configuration file:
device acpi_hp
or, if you'd rather load it as a module at boot time (lowkey easier ngl), put this line in loader.conf(5):
acpi_hp_load="YES"
π¦ DESCRIPTION π¦
so the acpi_hp driver gives you support for all the ACPI-controlled features hanging out on HP laptops that use a WMI enabled BIOS β think HP Compaq 8510p and 6510p, those girlies.
the whole point of this driver is to hand you an interface β reachable via sysctl(8), devd(8) and devfs(8) β so your applications can find out and change the status of all kinds of laptop components and BIOS settings. iconic, honestly.
π devd(8) Events π
the devd events that devd(8) receives carry this info:
system "ACPI"
subsystem "HP"
type The source of the event in the ACPI namespace. The
value depends on the model.
notify Event code (see below).
and here are the event codes, no cap:
0xc0β WLAN on air status changed to 0 (not on air)0xc1β WLAN on air status changed to 1 (on air)0xd0β Bluetooth on air status changed to 0 (not on air)0xd1β Bluetooth on air status changed to 1 (on air)0xe0β WWAN on air status changed to 0 (not on air)0xe1β WWAN on air status changed to 1 (on air)
π devfs(8) Device π
you can literally just read /dev/hpcmi to see your current BIOS settings π the detail level is adjustable by setting the sysctl cmi_detail, as described down below.
β¨ SYSCTL VARIABLES β¨
these are the sysctls currently implemented, bestie:
πΆ WLAN:
dev.acpi_hp.0.wlan_enabledβ toggle WLAN chip activity.dev.acpi_hp.0.wlan_radioβ (read-only) WLAN radio status (controlled by the hardware switch).dev.acpi_hp.0.wlan_on_airβ (read-only) WLAN on air (chip enabled, hardware switch enabled + enabled in BIOS).dev.acpi_hp.0.wlan_enabled_if_radio_onβ if set to1, the WLAN chip will be enabled if the radio is turned on.dev.acpi_hp.0.wlan_disable_if_radio_offβ if set to1, the WLAN chip will be disabled if the radio is turned off.
π Bluetooth:
dev.acpi_hp.0.bt_enabledβ toggle Bluetooth chip activity.dev.acpi_hp.0.bt_radioβ (read-only) Bluetooth radio status (controlled by the hardware switch).dev.acpi_hp.0.bt_on_airβ (read-only) Bluetooth on air (chip enabled, hardware switch enabled + enabled in BIOS).dev.acpi_hp.0.bt_enabled_if_radio_onβ if set to1, the Bluetooth chip will be enabled if the radio is turned on.dev.acpi_hp.0.bt_disable_if_radio_offβ if set to1, the Bluetooth chip will be disabled if the radio is turned off.
π WWAN:
dev.acpi_hp.0.wwan_enabledβ toggle WWAN chip activity.dev.acpi_hp.0.wwan_radioβ (read-only) WWAN radio status (controlled by the hardware switch).dev.acpi_hp.0.wwan_on_airβ (read-only) WWAN on air (chip enabled, hardware switch enabled + enabled in BIOS).dev.acpi_hp.0.wwan_enabled_if_radio_onβ if set to1, the WWAN chip will be enabled if the radio is turned on.dev.acpi_hp.0.wwan_disable_if_radio_offβ if set to1, the WWAN chip will be disabled if the radio is turned off.
π Misc:
dev.acpi_hp.0.als_enabledβ toggle the ambient light sensor (ALS).dev.acpi_hp.0.displayβ (read-only) display status (bitmask).dev.acpi_hp.0.hdd_temperatureβ (read-only) HDD temperature.dev.acpi_hp.0.is_dockedβ (read-only) docking station status (1if docked).dev.acpi_hp.0.cmi_detailβ bitmask controlling the detail level in/dev/hpcmioutput (the values can be ORed, slay):0x01β show path component of BIOS setting0x02β show a list of valid options for the BIOS setting0x04β show additional flags of BIOS setting (ReadOnlyetc.)0x08β query highest BIOS entry instance. this one is broken on many HP models and is therefore disabled by default π
dev.acpi_hp.0.verboseβ (read-only) set verbosity level.
defaults for these sysctls can be set in sysctl.conf(5) π
π₯ HARDWARE π₯
the acpi_hp driver has been reported to support the following hardware:
- HP Compaq 8510p
- HP Compaq nx7300
it should work on most HP laptops that feature a WMI enabled BIOS. fingers crossed fr fr π€
π FILES π
/dev/hpcmiβ interface to read BIOS settings.
β EXAMPLES β
turning off LAN when WLAN is on air
you can add the following to devd.conf(5) in order disable the LAN interface when WLAN on air and reenable it if it is not:
notify 0 {
match "system" "ACPI";
match "subsystem" "HP";
match "notify" "0xc0";
action "ifconfig em0 up";
};
notify 0 {
match "system" "ACPI";
match "subsystem" "HP";
match "notify" "0xc1";
action "ifconfig em0 down";
};
enabling the ambient light sensor
sysctl dev.acpi_hp.0.als_enabled=1
enabling Bluetooth
sysctl dev.acpi_hp.0.bt_enabled=1
getting BIOS settings
cat /dev/hpcmi
and it's giving:
Serial Port Disable
Infrared Port Enable
Parallel Port Disable
Flash Media Reader Disable
USB Ports including Express Card slot Enable
1394 Port Enable
Cardbus Slot Disable
Express Card Slot Disable
(...)
maxing out the detail level for /dev/hpcmi output
sysctl dev.acpi_hp.0.cmi_detail=7
π SEE ALSO π
acpi(4), acpi_wmi(4), sysctl.conf(5), devd(8), devfs(8), sysctl(8)
π§ HISTORY π§
the acpi_hp device driver first appeared in FreeBSD 8.0. a whole era π«
π AUTHORS π
the acpi_hp driver was written by Michael Gmelin <freebsd@grem.de>.
it has been inspired by the hp-wmi driver, which implements a subset of these features (hotkeys) on Linux. cute crossover moment π§β¨
- HP CMI whitepaper:
https://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf wmi-hpfor Linux:https://www.kernel.org- WMI and ACPI:
http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx
this manual page was written by Michael Gmelin <freebsd@grem.de>.
π BUGS π
this driver is experimental and has only been tested oni386on anHP Compaq 8510pwhich featured all supported wireless devices (WWAN/BT/WLAN). expect undefined results when operating on different hardware. not me being the guinea pig π
- loading the driver is slow. reading from
/dev/hpcmiis even slower. ngl, bring a snack π - additional features like HP specific sensor readings or writing BIOS settings are not supported. sorry bestie, that's a no π
that's the whole page! brought to you by the Debian edition, dated June 19, 2015 β yeah she's an older icon but she still ate π π«Άβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2009 Michael Gmelin
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms