Linux HP WMI Sensors Driver¶
- Copyright:
© 2023 James Seo <james@equiv.tech>
Description¶
Hewlett-Packard (and some HP Compaq) business-class computers report hardware
monitoring information via Windows Management Instrumentation (WMI).
This driver exposes that information to the Linux hwmon subsystem, allowing
userspace utilities like sensors
to gather numeric sensor readings.
sysfs interface¶
When the driver is loaded, it discovers the sensors available on the
system and creates the following sysfs attributes as necessary within
/sys/class/hwmon/hwmon[X]
:
([X]
is some number that depends on other system components.)
Name |
Perm |
Description |
---|---|---|
|
RO |
Current in milliamperes (mA). |
|
RO |
Current sensor label. |
|
RO |
Fan speed in RPM. |
|
RO |
Fan sensor label. |
|
RO |
Fan sensor fault indicator. |
|
RO |
Fan sensor alarm indicator. |
|
RO |
Voltage in millivolts (mV). |
|
RO |
Voltage sensor label. |
|
RO |
Temperature in millidegrees Celsius (m°C). |
|
RO |
Temperature sensor label. |
|
RO |
Temperature sensor fault indicator. |
|
RO |
Temperature sensor alarm indicator. |
|
RW |
Chassis intrusion alarm indicator. |
fault
attributesReading
1
instead of0
as thefault
attribute for a sensor indicates that it has encountered some issue during operation such that measurements from it should not be trusted. If a sensor with the fault condition recovers later, reading this attribute will return0
again.alarm
attributesReading
1
instead of0
as thealarm
attribute for a sensor indicates that one of the following has occurred, depending on its type:fan
: The fan has stalled or has been disconnected while running.temp
: The sensor reading has reached a critical threshold. The exact threshold is system-dependent.intrusion
: The system’s chassis has been opened.
After
1
is read from analarm
attribute, the attribute resets itself and returns0
on subsequent reads. As an exception, anintrusion[X]_alarm
can only be manually reset by writing0
to it.
debugfs interface¶
Warning
The debugfs interface is subject to change without notice
and is only available when the kernel is compiled with
CONFIG_DEBUG_FS
defined.
The standard hwmon interface in sysfs exposes sensors of several common types
that are connected as of driver initialization. However, there are usually
other sensors in WMI that do not meet these criteria. In addition, a number of
system-dependent “platform events objects” used for alarm
attributes may
be present. A debugfs interface is therefore provided for read-only access to
all available HP WMI sensors and platform events objects.
/sys/kernel/debug/hp-wmi-sensors-[X]/sensor
contains one numbered entry per sensor with the following attributes:
Name |
Example |
---|---|
|
|
|
|
|
|
|
(an empty string) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If platform events objects are available,
/sys/kernel/debug/hp-wmi-sensors-[X]/platform_events
contains one numbered entry per object with the following attributes:
Name |
Example |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These represent the properties of the underlying HPBIOS_BIOSNumericSensor
and HPBIOS_PlatformEvents
WMI objects, which vary between systems.
See [1] for more details and Managed Object Format (MOF) definitions.
Known issues and limitations¶
If the existing hp-wmi driver for non-business-class HP systems is already loaded,
alarm
attributes will be unavailable even on systems that support them. This is because the same WMI event GUID used by this driver foralarm
attributes is used on those systems for e.g. laptop hotkeys.Dubious sensor hardware and inconsistent BIOS WMI implementations have been observed to cause inaccurate readings and peculiar behavior, such as alarms failing to occur or occurring only once per boot.
Only temperature, fan speed, and intrusion sensor types have been seen in the wild so far. Support for voltage and current sensors is therefore provisional.
Although HP WMI sensors may claim to be of any type, any oddball sensor types unknown to hwmon will not be supported.