bergware / dynamix

52 stars 38 forks source link

Compatibility issue with nct7904 sensors #18

Open Xaero252 opened 6 years ago

Xaero252 commented 6 years ago

So, I have a system running coretemp for CPU temperatures and an nct7904 chipset for system monitoring over i2c.

After using the webui to populate things by first detecting and then loading the drivers, the dropdowns populate correctly; the output of "sensors" from a command line can be seen below:

root@redacted:~# sensors
nct7904-i2c-0-2e
Adapter: SMBus I801 adapter at 0580
in1:          +1.04 V
in2:          +1.04 V
in3:          +1.49 V
in4:          +1.24 V
in5:          +1.23 V
in6:          +0.65 V
in7:          +1.84 V
in8:          +0.60 V
in9:          +1.79 V
in10:         +1.79 V
in11:         +1.21 V
in12:         +1.21 V
in13:         +1.21 V
in14:         +1.21 V
in15:         +3.31 V
in16:         +3.17 V
in20:         +3.32 V
fan1:        4623 RPM
fan2:        1788 RPM
fan3:           0 RPM
fan4:           0 RPM
fan5:        2428 RPM
fan6:        2385 RPM
fan8:           0 RPM
temp1:        +39.9°C
temp2:        +57.2°C
temp3:        +56.0°C

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +57.0°C  (high = +83.0°C, crit = +93.0°C)
Core 0:        +51.0°C  (high = +83.0°C, crit = +93.0°C)
Core 1:        +49.0°C  (high = +83.0°C, crit = +93.0°C)
Core 2:        +53.0°C  (high = +83.0°C, crit = +93.0°C)
Core 3:        +50.0°C  (high = +83.0°C, crit = +93.0°C)
Core 4:        +50.0°C  (high = +83.0°C, crit = +93.0°C)
Core 5:        +51.0°C  (high = +83.0°C, crit = +93.0°C)
Core 8:        +49.0°C  (high = +83.0°C, crit = +93.0°C)
Core 9:        +52.0°C  (high = +83.0°C, crit = +93.0°C)
Core 10:       +52.0°C  (high = +83.0°C, crit = +93.0°C)
Core 11:       +51.0°C  (high = +83.0°C, crit = +93.0°C)
Core 12:       +52.0°C  (high = +83.0°C, crit = +93.0°C)
Core 13:       +52.0°C  (high = +83.0°C, crit = +93.0°C)

coretemp-isa-0001
Adapter: ISA adapter
Package id 1:  +57.0°C  (high = +83.0°C, crit = +93.0°C)
Core 0:        +51.0°C  (high = +83.0°C, crit = +93.0°C)
Core 1:        +51.0°C  (high = +83.0°C, crit = +93.0°C)
Core 2:        +50.0°C  (high = +83.0°C, crit = +93.0°C)
Core 3:        +49.0°C  (high = +83.0°C, crit = +93.0°C)
Core 4:        +53.0°C  (high = +83.0°C, crit = +93.0°C)
Core 5:        +48.0°C  (high = +83.0°C, crit = +93.0°C)
Core 8:        +50.0°C  (high = +83.0°C, crit = +93.0°C)
Core 9:        +48.0°C  (high = +83.0°C, crit = +93.0°C)
Core 10:       +51.0°C  (high = +83.0°C, crit = +93.0°C)
Core 11:       +47.0°C  (high = +83.0°C, crit = +93.0°C)
Core 12:       +49.0°C  (high = +83.0°C, crit = +93.0°C)
Core 13:       +53.0°C  (high = +83.0°C, crit = +93.0°C)

After setting Package id 0 for CPU, temp2 for Motherboard and Fan2 for the Array fan, the lists become unpopulated, and running "sensors" again results in the following:

root@redacted:~# sensors
Error: File /etc/sensors.d/sensors.conf, line 2: Undeclared bus id referenced
Error: File /etc/sensors.d/sensors.conf, line 4: Undeclared bus id referenced
Error: File /etc/sensors.d/sensors.conf, line 6: Undeclared bus id referenced
Error: File /etc/sensors.d/sensors.conf, line 10: Undeclared bus id referenced
Error: File /etc/sensors.d/sensors.conf, line 12: Undeclared bus id referenced

The contents of sensors.conf at this point is as follows:

root@redacted:~# cat /etc/sensors.d/sensors.conf
# sensors
chip "nct7904-i2c-0-2e"
ignore "fan3"
chip "nct7904-i2c-0-2e"
ignore "fan4"
chip "nct7904-i2c-0-2e"
ignore "fan8"
chip "coretemp-isa-0000"
label "temp1" "CPU Temp"
chip "nct7904-i2c-0-2e"
label "temp2" "MB Temp"
chip "nct7904-i2c-0-2e"
label "fan2" "Array Fan"

The bus id "seems correct" based on the original output of sensors. Reading the manual, I decide to just use "nct7904*" which resulted in a "mostly" working scenario, where the CPU temperature and Motherboard temperature did work, but the fan speed did not. I have not been able to identify a way to get fan speed to work.

I'm not sure if this is caused by an upstream issue with LM_SENSORS or the way you are parsing the outputs for the creation of the sensors.conf file.

Anyways, hopefully there is enough detail here to resolve this.

haywiremk commented 4 years ago

Seems there is a bug in writing this config file. Here is what I did to fix. It is missing the bus line.
Delete the sensors.conf file. Run the sensors command to get the bus on the second line where says adapter. then set the sensors in unraid. afterards edit the sensors.conf file and add at the top below #sensors bus "i2c-0" "SMBus I801 adapter at 0580" <--- from the sensors command(using your example).

Then just never touch the config in unraided. I am not sure if this is just a bug only I have or and issue with this plugin. But after finding this via google and more digging into sensors.conf this is how I solved. Hopefully helps others.