OpenBSD patch set and source snapshot for HP Compaq nx6310 ACPI fan staging and thermal-zone false-critical handling.
The target is OpenBSD 7.9/amd64 on HP Compaq nx6310-class hardware where ACPI exposes four PNP0C0B fan devices under \_TZ_.
On the HP Compaq nx6310, the useful fan controls are not simple PWM or RPM controls. They are four ACPI fan devices backed by four ACPI power resources.
Without hardware-specific handling, OpenBSD does not provide a stable operator-facing way to map those resources into usable fan levels.
The same machine can also report a known false-critical acpitz3 thermal event. That event can look like an impossible temperature spike and can trigger an unwanted shutdown path.
The unpatched system can still boot and expose normal OpenBSD thermal sensors, but these nx6310-specific functions are missing or unreliable:
- No
acpifanattachment for the four nx6310 PNP0C0B fan stages. - No validated mapping from fan nodes
\_TZ_.C325through\_TZ_.C328to power resources\_TZ_.C321through\_TZ_.C324. - No
hw.acpifan.levelcontrol. - No
hw.acpifan.default_levelcontrol. - No simple
0,1,2,3fan-level interface. - No default level
3fan hold at driver attachment time. - No userland
sysctlnames for ACPI fan level control. - No nx6310-specific suppression for the known
TZ3_false-critical shutdown pattern. - No added debounce guard for implausible
_TMPreadings above 200C.
In practice, this means the laptop has thermal sensor visibility but lacks a reliable OpenBSD-native way to force and inspect the four nx6310 fan stages.
With the patched kernel and matching sbin/sysctl, the system gains:
acpifanattachment for the nx6310 fan devices.- Hardware-specific detection by AML node name and
_UID. - Power-resource hold control for the four fan stages.
hw.acpifan.levelfor runtime fan level changes.hw.acpifan.default_levelfor the attach-time default level.- Default level
3on detected nx6310 hardware. sysctl(8)name support for the newhw.acpifannode.- Guarded handling of implausible ACPI
_TMPreadings. - Suppression of the known HP Compaq nx6310
TZ3_false-critical shutdown path.
The result is a practical four-level fan control interface for the nx6310.
hw.acpifan.level and hw.acpifan.default_level accept integer values from 0 through 3.
| Level | Mode | Held nx6310 stages | Effect |
|---|---|---|---|
0 |
Off | none | Releases all fan-stage power holds |
1 |
Quiet | stage 3 | Holds only the lightest stage |
2 |
Balanced | stages 2 and 3 | Holds two higher stages |
3 |
Performance | stages 0, 1, 2, and 3 | Holds every detected stage |
These values are ACPI power-resource hold levels. They are not direct PWM percentages and not RPM targets.
The driver treats the machine as nx6310-specific only when the fan node and _UID layout matches the expected hardware pattern.
| Fan node | _UID |
Stage | Expected power resource |
|---|---|---|---|
\_TZ_.C325 |
0 |
0 | \_TZ_.C321 |
\_TZ_.C326 |
1 |
1 | \_TZ_.C322 |
\_TZ_.C327 |
2 |
2 | \_TZ_.C323 |
\_TZ_.C328 |
3 |
3 | \_TZ_.C324 |
Unexpected mappings are reported and are not held as nx6310 fan stages.
Read docs/APPLY.md before applying the patch to a real system.
If the unpatched kernel shuts down from an acpitz false-critical event before installation, boot once with acpitz disabled from UKC:
boot> boot -c
UKC> disable acpitz
UKC> quit
This is a temporary boot-time workaround. Use that boot only to apply the patch, build the patched kernel, install the matching sbin/sysctl, and reboot into the patched kernel.
cd /usr/src
patch -p1 < /path/to/openbsd-nx6310-acpi/patches/0001-openbsd-nx6310-acpi-combined.diffAdd the driver attachment line from config/GENERIC.MP.NX6310.fragment to a custom amd64 kernel config:
acpifan* at acpi? flags 0x2Rebuild and install the kernel, rebuild and install sbin/sysctl, reboot, then verify:
sysctl hw.acpifan.level
sysctl hw.acpifan.default_level
dmesg | grep acpifanA working installation should expose:
hw.acpifan.level
hw.acpifan.default_level
On detected nx6310 hardware, the default level should be:
hw.acpifan.default_level=3
The fan stages should appear in dmesg as four acpifan devices with nx6310 stage numbers and matching pr0 power resources.
For a fuller checklist, use docs/TESTING.md.
patches/0001-openbsd-nx6310-acpi-combined.diffis the canonical apply patch.src/contains the current source snapshot for every modified OpenBSD source file.config/GENERIC.MP.NX6310.fragmentcontains the required kernel config line.docs/APPLY.mddescribes installation.docs/TESTING.mddescribes runtime checks.docs/ROLLBACK.mddescribes recovery and rollback.docs/DESIGN.mdexplains the driver design.tools/check-nx6310-acpi.shperforms read-only status checks and can optionally cycle levels.
This is an HP Compaq nx6310 patch set. It intentionally validates the nx6310 ACPI namespace before treating devices as fan stages.
Do not apply it blindly to unrelated laptops.
The acpitz guard suppresses only clearly implausible readings and the known nx6310 TZ3_ false-critical pattern. It is not a replacement for real thermal monitoring.
The patch requires a custom kernel and a matching sbin/sysctl binary.
Repository-specific material is distributed under the ISC license.
Credit: itinfra7 from GitHub.
Modified OpenBSD source files retain their upstream copyright and license notices.