1

Trying to get hwmon working more fully on a system with an ASRock Z370M Pro4. The coretemp and drivetemp drivers seem to be fine. However, this board also has a Nuvoton NCT6683 chip for the usual voltage, fan speed, and temperature monitoring. This is what sensors-detect comes up with, and when the module loads, it looks (sort of) successful:

[    3.520633] nct6683: Forcibly enabling EC access. Data may be unusable.
[    3.521769] nct6683: Found NCT6683D or compatible chip at 0x2e:0xa10

However, it's not appearing as a sensor device, and the reason seems to be that it doesn't get registered in hwmon:

$ ls -l /sys/class/hwmon
total 0
lrwxrwxrwx 1 root root 0 Jul 12 07:19 hwmon0 -> ../../devices/platform/coretemp.0/hwmon/hwmon0
lrwxrwxrwx 1 root root 0 Jul 12 07:19 hwmon1 -> ../../devices/pci0000:00/0000:00:17.0/ata1/host0/target0:0:0/0:0:0:0/hwmon/hwmon1
lrwxrwxrwx 1 root root 0 Jul 12 07:19 hwmon2 -> ../../devices/pci0000:00/0000:00:17.0/ata2/host1/target1:0:0/1:0:0:0/hwmon/hwmon2
lrwxrwxrwx 1 root root 0 Jul 12 07:19 hwmon3 -> ../../devices/pci0000:00/0000:00:17.0/ata3/host2/target2:0:0/2:0:0:0/hwmon/hwmon3
lrwxrwxrwx 1 root root 0 Jul 12 07:19 hwmon4 -> ../../devices/pci0000:00/0000:00:17.0/ata4/host3/target3:0:0/3:0:0:0/hwmon/hwmon4

But why? Could I have misconfigured the kernel somewhere? If I need to debug the hwmon registration, how would I do that?

Note that firmware setup is able to get the sensor readings just fine, so I know the hardware works.

EDIT:

Distro is Gentoo, with Linux version 5.13.2, with custom config. Here is the current config.

2 Answers 2

1

It looks like the NCT6683 chip includes a "customer ID" for different OEMs, and ASRock has been assigned its own ID somewhat recently.

This patch submitted in January 2021 might be necessary. It seems to be included in current 5.12.x and newer kernels from Linus, but not in 5.10.50, which is the latest long-term-supported kernel version at the time of this writing.

If the actual chip version turns out to be NCT6686D, another even more recent patch is also needed: this was developed in early March 2021. A NCT6686D has the same set of sensors and is apparently accessed exactly the same as a NCT6683D, but has a different chip ID.

Unless you use a distribution that uses extremely new kernel versions, it is likely that the nct6683 driver in your current kernel is too old to have these patches included in it.

1
  • Ah, interesting. But the thing is, the Z370M Pro4 board is a few years old, so I don't know if this would be the problem. Also, I'm using Gentoo and update the kernel once every week (when a new version is available). Nevertheless, I checked. The system in question is running version 5.13.1 (soon to be 5.13.2), which appears to already have both of those patches incorporated.
    – ddawson
    Jul 19, 2021 at 8:32
0

Well, it turns out all I had to do was load the module with force=1. I dismissed the possibility because it's supposed to be for "unknown vendors" and ASRock is one of the known vendors. Plus, it appeared to recognize the chip. But reading the source code, I have to conclude this one doesn't have ASRock's customer ID that it knows.

In case anyone knows anything about this (though perhaps talking to the kernel people would be better at this point), there is now an additional line in the kernel log:

[406090.428581] nct6683 nct6683.2576: NCT6683D EC firmware version 1.0 build 07/18/16

I also found out the customer ID is 0xe1b (had to tweak the code to write it in the log). Not far off from the one recognized as ASRock's (0xe2c), but maybe it's just coincidence.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .