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

bugzilla-daemon
2021-10-06T11:08:11Z

--- Comment #138 from Kamil Pietrzak (kpietrzak@disroot.org) ---
(In reply to Kamil Pietrzak from comment #137)
> With regard to current voltage scaling factors for nct6798d chip, they are
> most likely not correct and probably will require future changes. For
> example I can't see +12V and +5V is sensors output when using current
> voltage scalling factors.

Partially responding to my own comment here.

Due to the lack of publicly available documentation for NCT6798D chip I checked
docs for similar chips (NCT6791D, NCT6791D).

Looks like voltages like +12V and +5V can be connected to any one of general
purpose voltage inputs on the SuperIO chip. So on one motherboard +12V can be
connected to pin VIN0, but on another one with same SuperIO chip it can
possibly be connected to other general purpose voltage pin like VIN1, VIN2,
VIN3 etc. In that case it will not be possible to properly scale these voltages
without hardcoding motherboard models in module code, so scaling should take
place in userspace apps like lm_sensors. The only voltages that can be safely
scaled in module code are Vcore, AVSB, 3VCC, 3VSB, VBAT. Pins to which they are
connected should not change between different motherboards. So it looks like
current voltage scaling factors are as accurate as it can be without hardcoding
motherboards models.

However, I am still curious about Vcore voltage readings on my TUF Z490 board
in BIOS and Asus software. According to docs Vcore should be calculated with
formula

Detected Voltage = Reading * 0.008 V

but Asus in BIOS and in their software on Windows calculate it probably with
some additional scaling factor, most likely something like

Detected Voltage = Reading * 0.008 V * 1.11

The only reason that comes to my mind for calculating Vcore in that way is that
they (Asus) wanted BIOS/software Vcore readings to be more accurate in relation
to voltage readings using for example multimeter near the CPU socket.