[Bug 204807] Hardware monitoring sensor nct6798d doesn't work unless acpi_enforce_resources=lax is enabled

bugzilla-daemon
2026-03-14T12:57:42Z

Theunis Scheepers (ptscheepers@gmail.com) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |ptscheepers@gmail.com

--- Comment #351 from Theunis Scheepers (ptscheepers@gmail.com) ---
Requesting addition of ROG STRIX X870E-E GAMING WIFI to the nct6775-platform.c
ASUS WMI board allowlist for stable fan PWM control under Linux.

BACKGROUND
----------
The asus-ec-sensors driver already supports this board for temperature readings
(CPU, CPU Package, Motherboard, VRM) and the CPU_Opt fan tachometer. However,
persistent fan speed control via PWM is not possible because the board is
missing from the nct6775 WMI platform allowlist.

The nct6799 Super-I/O chip (NCT6796D-S/NCT6799D-R) is detected at 0x2e:0x290
and exposes pwm1-pwm7 via direct ISA access through the nct6775 driver. Writing
PWM values via ISA succeeds momentarily, but the ASUS EC/ACPI firmware does not
cooperate with direct ISA writes and overrides the control mode within seconds.
The board needs the WMI cooperative path for stable fan control.

PWM OVERRIDE TEST (ISA writes don't persist)
---------------------------------------------
I tested writing to pwm2 (which controls fan2, the only case fan currently
connected to the nct6799 channels):

Before: fan2=473 RPM, pwm2_enable=5, pwm2=82
(set pwm2_enable=1, pwm2=255)
After 1s: fan2=474 RPM, pwm2_enable=0, pwm2=255
After 6s: fan2=1433 RPM, pwm2_enable=0, pwm2=255
After 11s: fan2=1470 RPM, pwm2_enable=0, pwm2=255
Restored pwm2_enable to 5 (BIOS Q-Fan)

The firmware immediately changed pwm2_enable from 1 (manual) to 0 (full speed)
rather than respecting the manual control mode. The fan did ramp up because the
PWM duty was set to 255, but the control mode was overridden. This confirms the
hardware supports PWM control but requires the WMI path to cooperate with the
ASUS firmware rather than fighting it via direct ISA writes.

All seven PWM channels default to pwm_enable=5 (SmartFan/BIOS-controlled):

fan1: 0 RPM, pwm1_enable: 5, pwm1: 255
fan2: 473 RPM, pwm2_enable: 5, pwm2: 82
fan3: 0 RPM, pwm3_enable: 5, pwm3: 255
fan4: 0 RPM, pwm4_enable: 5, pwm4: 255
fan5: 543 RPM, pwm5_enable: 5, pwm5: 86
fan6: 0 RPM, pwm6_enable: 5, pwm6: 255
fan7: 0 RPM, pwm7_enable: 5, pwm7: 210

RELATION TO X870E-H
-------------------
The closely related ROG STRIX X870E-H GAMING WIFI7 was recently added to the
allowlist. The patch description notes it "has a similar sensor configuration
as the ROG STRIX X870E-E GAMING WIFI", so adding the X870E-E variant should be
straightforward.

DSDT WMI METHODS
----------------
The decompiled DSDT confirms the WMI interface is present:

WMBD (WMI method dispatch) at line 8377
BREC (read EC) at line 9261
BWEC (write EC) at line 9267
\_SB.PCI0.SBRG.SIO1 (Super-I/O device) referenced throughout

SYSTEM INFO
-----------
Board: ASUSTeK COMPUTER INC. ROG STRIX X870E-E GAMING WIFI (Rev 1.xx)
BIOS: 2004
Kernel: 6.19.6-2-cachyos (x86_64, CachyOS/Arch)
Super-I/O: NCT6796D-S/NCT6799D-R at 0x2e:0x290
CPU: AMD Ryzen 7 9800X3D

Loaded hwmon-related modules:
asus_ec_sensors - provides CPU, CPU Package, Motherboard, VRM temps and
CPU_Opt fan
asus_wmi (via eeepc_wmi)
nct6775 + nct6775_core - ISA access to nct6799, detects fans and PWM but no
stable write path
k10temp - CPU thermal
amdgpu - GPU thermal

No ACPI resource conflicts were found in dmesg.

COLLECTED DATA
--------------
A full data tarball (DSDT binary + decompiled, sensors-detect, dmesg, PWM
override test, hwmon drivers list) is attached to:
https://github.com/zeule/asus-ec-sensors/issues/100

USE CASE
--------
I want to run GPU-temperature-driven case fan curves via CoolerControl, which
requires stable writable PWM interfaces. The nct6799 PWM channels are the only
path to the motherboard fan headers, and they need the WMI allowlist entry to
work reliably without firmware conflict.

Happy to test patches. Thanks.