Install a driver for sensor chip nct6799 - redux

In a previous post (here) I lamented the lack of new hardware being recognized in LEAP 15.6 (linux 6.4…). The solution was to update to at least linux 6.5 where the appropriate driver would be available.

I finally migrated to LEAP 16.0. I am dismayed to see no new list of sensor entries.

$ sensors -f
spd5118-i2c-4-51
Adapter: SMBus PIIX4 adapter port 0 at 0b00
temp1:        +98.2°F  (low  = +32.0°F, high = +131.0°F)
                       (crit low = +32.0°F, crit = +185.0°F)

amdgpu-pci-0100
Adapter: PCI adapter
vddgfx:      687.00 mV 
fan1:        1383 RPM  (min =    0 RPM, max = 6900 RPM)
edge:         +91.4°F  (crit = +206.6°F, hyst = -459.7°F)
PPT:           3.07 W  (cap =  42.00 W)
pwm1:             38%
sclk:         214 MHz 
mclk:         300 MHz 

k10temp-pci-00c3
Adapter: PCI adapter
Tctl:        +124.2°F  

$ modprobe nct6799
modprobe: FATAL: Module nct6799 not found in directory /usr/lib/modules/6.12.0-160000.32-default
$

I would recommend using a more recent stable kernel

@jimbobrae It’s there and part of the nct6775 modules… If you run sensors-detect --auto it should show the chip address, if you modprobe the module, does it work else you may need to add a force_id=0x????

Oh, you might want to update to the newer kernel…6.12.0-160000.33-default

linux v6.12.0-160000.32-default x86_64
ID="opensuse-leap"
VERSION_ID="16.0"

I thought that LEAP is supposed to be THE stable branch of OpenSUSE.

“Stable” in Leap refers to the distribution release model, not to tracking the latest upstream stable kernel. A distribution can be very stable while intentionally shipping an older kernel version. The stable kernel repository exists for users who need newer hardware support than the distribution kernel provides.

This is the only YES response:

Some Super I/O chips contain embedded sensors. 
Probing for Super-I/O at 0x2e/0x2f
...
Trying family `VIA/Winbond/Nuvoton/Fintek'...               Yes
Found unknown chip with ID 0xd806
    (logical device B has address 0x290, could be sensors)
...
$ modprobe nct6799 force_id=0xd806
modprobe: FATAL: Module nct6799 not found in directory /usr/lib/modules/6.12.0-160000.32-default
$ modprobe force_id=0xd806
modprobe: FATAL: Module force_id=0xd806 not found in directory /usr/lib/modules/6.12.0-160000.32-default
$

@jimbobrae Wrong module… modprobe nct6775 or modprobe nct6775 force_id=0xd806

Ah! That worked. The chip is recognized now.
Still an issue though. The min/max values are not being applied; they are all set to zero.

Here is a typical entry in nct6799.conf:

 # VIN1 = +5VDC
 label in1 "+5V"
 set in1_max 5.25
 set in1_min 4.75

Here is what sensors has to say.

$ sensors
nct6799-isa-0290
Adapter: ISA adapter
VCORE:        856.00 mV (min =  +0.00 V, max =  +1.74 V)
+5V:          1000.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
AVSB:           3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
+3.3V:          3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
+12V:          12.29 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
CHIPSET:        1.04 V  (min =  +0.00 V, max =  +0.00 V)
APU_VDDIO:      1.01 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
+3.3VSB:        3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
VBAT:           3.26 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
PLL VTT:        3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
DRAM:           2.24 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
VDDCR_SOC:      2.21 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
PLL:          1000.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in15:         784.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in16:           1.84 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in17:           1.03 V  (min =  +0.00 V, max =  +0.00 V)
CHA_FAN1:      611 RPM  (min =    0 RPM)
CPU_FAN:      1146 RPM  (min =    0 RPM)
CHA_FAN2:        0 RPM  (min =    0 RPM)
CHA_FAN3:        0 RPM  (min =    0 RPM)
CPU_OPT:         0 RPM  (min =    0 RPM)
fan6:            0 RPM  (min =    0 RPM)
AIO_PUMP:        0 RPM  (min =    0 RPM)
MOTHERBOARD:  +101.3°F  (high = +176.0°F, hyst = +167.0°F)
                        (crit = +257.0°F)  sensor = thermistor
CPU DIODE:     +75.2°F  (high = +176.0°F, hyst = +167.0°F)
                        (crit = +212.0°F)
CPU PKG:       +32.0°F  
PCH_CPU_TEMP:  +32.0°F  
TSI0_TEMP:    +123.6°F  
pwm1:              84%  (mode = pwm)
pwm2:              42%  (mode = pwm)
pwm3:              84%  (mode = pwm)
pwm4:              84%  (mode = pwm)
pwm6:              84%  (mode = pwm)
pwm7:             128%  (mode = pwm)

@jimbobrae I suspect some manual configuration is required… sensors -u nct6799-isa-*

Okay. That set the min/max values. The system is still ignoring the presence of nct6799. I have “ignore” statements for inputs the have useless, incorrect, invalid values. Does it need a reboot?

@jimbobrae It will always, the chip information was incorporated into nct6775, so you could add a file /etc/modules-load.d/01-nct6799.conf containing nct6775

Do you mean that nct6775 is the only content of the file?

Just write the nct6775 inside the file and save and it will survive the reboot or (it will be loaded at boot).

1 Like

That is my question: Do I write “nct6775” as the sole content of the load file? Or do I copy the contents of the nct6799.conf file into the load file?

@jimbobrae yes the sole content is just the module you want to load. You could also likley create a dracut conf file to add as well…

What does that look like?

After a boot I still needed these two commands. I added them to the root crontab with the @reboot time.

# modprobe nct6775
# sensors -s nct6799-isa-*
#

Not sure why the module isn’t automatically loaded (upon device detection) already. You don’t actually need dracut at all. It’s only required for drivers needed during early boot (for example, storage, filesystems, or unlocking an encrypted root filesystem).

For nct6775, just create /etc/modules-load.d/nct6775.conf and add nct6775. This tells systemd to load the module during boot.

However, if you really do want to use dracut, then create a config file eg /etc/dracut.conf.d/nct6775.conf with add_drivers+=" nct6775 ", then rebuild the initrd with sudo dracut -f.

BTW, I assume that you already have the relevant service active?

systemctl status lm_sensors

# systemctl status lm_sensors.service 
× lm_sensors.service - Initialize hardware monitoring sensors
     Loaded: loaded (/usr/lib/systemd/system/lm_sensors.service; enabled; preset: disabled)
     Active: failed (Result: resources)
 Invocation: 33e3d5c2ca3449dbaa065d9733718124
        CPU: 0

Jun 06 17:25:54 sma-server3.sma.com systemd[1]: lm_sensors.service: Failed to load environment files: No such file or >
Jun 06 17:25:54 sma-server3.sma.com systemd[1]: lm_sensors.service: Failed to spawn 'start' task: No such file or dire>
Jun 06 17:25:54 sma-server3.sma.com systemd[1]: lm_sensors.service: Failed with result 'resources'.
Jun 06 17:25:54 sma-server3.sma.com systemd[1]: Failed to start Initialize hardware monitoring sensors.
#

I … don’t know. It would seem not. The sum of information is “a lack of unspecified resources.”
lm_sensors is not in the repos.

@jimbobrae as root user did you run sensors-detect and save the config?

You can also edit /etc/sysconfig/lm_sensors and add the module there.

Yes. the results was:

Sorry, no sensors were detected.

Even though:

Trying family `VIA/Winbond/Nuvoton/Fintek'...               Yes
Found unknown chip with ID 0xd806
    (logical device B has address 0x290, could be sensors)

No option to save anything.
And this:

$ ll /etc/sysconfig/lm_sensor*
ls: cannot access '/etc/sysconfig/lm_sensor*': No such file or directory
$