flightlessmango / MangoHud

A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more. Discord: https://discordapp.com/invite/Gj5YmBb
MIT License
6.13k stars 262 forks source link

[Feature Request] Access to arbitrary lm_sensors sensors #1317

Open flippette opened 2 months ago

flippette commented 2 months ago

Hi,

I have a 7950X, and currently zenpower/zenpower3 doesn't work on this platform. However, I am able to access readings for things like CPU voltages using this project. I would like to be able to use these readings inside of MangoHud.

flightlessmango commented 2 months ago

By doesn't work, I assume you mean that the cpu temp is 0? In latest we read from any NCT module if the preferred gives us a bad value (like 0)

flippette commented 2 months ago

Curious. I can't seem to get a CPU temp readout even if the NCT module does return them?

~ ❯ mangohud vkcube-wayland
[2024-05-07 19:56:13.265] [MANGOHUD] [error] [overlay_params.cpp:1029] Failed to read presets file: '/home/flippette/.config/MangoHud/presets.conf'
[2024-05-07 19:56:13.272] [MANGOHUD] [error] [cpu.cpp:536] Could not find cpu temp sensor location
Selected GPU 0: AMD Radeon RX 7800 XT (RADV NAVI32), type: DiscreteGpu

Here's the sensor output, FWIW

~ ❯ sensors nct6687-isa-0a20
nct6687-isa-0a20
Adapter: ISA adapter
+12V:           12.10 V  (min = +12.07 V, max = +12.10 V)
+5V:             5.03 V  (min =  +5.02 V, max =  +5.03 V)
+3.3V:           3.35 V  (min =  +3.35 V, max =  +3.36 V)
CPU Soc:         1.30 V  (min =  +1.30 V, max =  +1.30 V)
CPU Vcore:     940.00 mV (min =  +0.65 V, max =  +1.46 V)
CPU 1P8:         0.00 V  (min =  +0.00 V, max =  +0.00 V)
CPU VDDP:        0.00 V  (min =  +0.00 V, max =  +0.00 V)
DRAM:            1.34 V  (min =  +1.34 V, max =  +1.34 V)
Chipset:       308.00 mV (min =  +0.29 V, max =  +0.36 V)
CPU SA:        586.00 mV (min =  +0.59 V, max =  +0.59 V)
Voltage #2:      1.54 V  (min =  +1.54 V, max =  +1.54 V)
AVCC3:           3.31 V  (min =  +3.31 V, max =  +3.31 V)
AVSB:            3.35 V  (min =  +3.35 V, max =  +3.35 V)
VBat:            2.05 V  (min =  +2.04 V, max =  +2.05 V)
CPU Fan:        480 RPM  (min =  480 RPM, max =  988 RPM)
Pump Fan:      3076 RPM  (min = 3076 RPM, max = 3084 RPM)
System Fan #1:  557 RPM  (min =  555 RPM, max =  557 RPM)
System Fan #2: 1263 RPM  (min = 1212 RPM, max = 1264 RPM)
System Fan #3:  552 RPM  (min =  524 RPM, max =  552 RPM)
System Fan #4:    0 RPM  (min =    0 RPM, max =    0 RPM)
System Fan #5:    0 RPM  (min =    0 RPM, max =    0 RPM)
System Fan #6:    0 RPM  (min =    0 RPM, max =    0 RPM)
CPU:            +54.0°C  (low  = +54.0°C, high = +66.0°C)
System:         +48.5°C  (low  = +48.0°C, high = +48.5°C)
VRM MOS:        +43.5°C  (low  = +43.5°C, high = +44.0°C)
PCH:            +51.0°C  (low  = +50.0°C, high = +51.0°C)
CPU Socket:     +42.5°C  (low  = +42.5°C, high = +43.0°C)
PCIe x1:        +80.5°C  (low  = +79.0°C, high = +80.5°C)
M2_1:            +0.0°C  (low  =  +0.0°C, high =  +0.0°C)
flightlessmango commented 2 months ago

If zenpower is still installed, it's possible that mangohud is preferring zenpower over other modules like NCT

flippette commented 2 months ago

I don't have zenpower/zenpower3 installed anymore though.

~ ❯ paru -Qi zenpower
error: package 'zenpower' was not found
~ ❯ paru -Qi zenpower3
error: package 'zenpower3' was not found
flightlessmango commented 2 months ago

What mangohud version are you on? I think the NCT stuff has been revised since 0.7.1

flippette commented 2 months ago

I'm using the mangohud-git AUR package on version 0.7.2.rc3.r6.ga0a31b4-1, so effectively the latest commit.

flippette commented 1 month ago

Hi, it's been a while and I'm wondering if I could do anything else to help with this issue?

flightlessmango commented 1 month ago

Can you get the output of tree in the nct hwmon folder?

flippette commented 1 month ago

Firstly, something somewhere changed, and now the sensor output looks like this:

~ ❯ sensors nct6687-isa-0a20
nct6687-isa-0a20
Adapter: ISA adapter
VIN0:               1.01 V  (min =  +0.00 V, max =  +0.00 V)
VIN1:             992.00 mV (min =  +0.00 V, max =  +0.00 V)
VIN2:               1.30 V  (min =  +0.00 V, max =  +0.00 V)
VIN3:             672.00 mV (min =  +0.00 V, max =  +0.00 V)
VIN4:               1.06 V  (min =  +0.00 V, max =  +0.00 V)
VIN5:             320.00 mV (min =  +0.00 V, max =  +0.00 V)
VIN6:             608.00 mV (min =  +0.00 V, max =  +0.00 V)
VIN7:               1.54 V  (min =  +0.00 V, max =  +0.00 V)
VCC:                3.31 V  (min =  +0.00 V, max =  +0.00 V)
VSB:                3.34 V  (min =  +0.00 V, max =  +0.00 V)
AVSB:               3.34 V  (min =  +0.00 V, max =  +0.00 V)
VTT:                2.03 V  (min =  +0.00 V, max =  +0.00 V)
VBAT:               3.22 V  (min =  +0.00 V, max =  +0.00 V)
VREF:               1.84 V  (min =  +0.00 V, max =  +0.00 V)
fan1:              909 RPM  (min =    0 RPM)
fan2:             3084 RPM  (min =    0 RPM)
fan3:              562 RPM  (min =    0 RPM)
fan4:             1219 RPM  (min =    0 RPM)
fan5:              543 RPM  (min =    0 RPM)
fan6:                0 RPM  (min =    0 RPM)
fan7:                0 RPM  (min =    0 RPM)
fan8:                0 RPM  (min =    0 RPM)
fan9:                0 RPM  (min =    0 RPM)
fan10:               0 RPM  (min =    0 RPM)
AMD TSI Addr 98h:  +57.0°C  (low  =  +0.0°C)
                            (high =  +0.0°C, hyst =  +0.0°C)
                            (crit =  +0.0°C)  sensor = AMD AMDSI
Diode 0 (curr):    +49.0°C  (low  =  +0.0°C)
                            (high =  +0.0°C, hyst =  +0.0°C)
                            (crit =  +0.0°C)  sensor = thermal diode
Thermistor 15:     +47.0°C  (low  =  +0.0°C)
                            (high =  +0.0°C, hyst =  +0.0°C)
                            (crit =  +0.0°C)  sensor = thermistor
Thermistor 1:      +49.0°C  (low  =  +0.0°C)
                            (high =  +0.0°C, hyst =  +0.0°C)
                            (crit =  +0.0°C)  sensor = thermistor
Thermistor 16:     +46.5°C  (low  =  +0.0°C)
                            (high =  +0.0°C, hyst =  +0.0°C)
                            (crit =  +0.0°C)  sensor = thermistor
Thermistor 0:      +80.5°C  (low  =  +0.0°C)
                            (high =  +0.0°C, hyst =  +0.0°C)
                            (crit =  +0.0°C)  sensor = thermistor
intrusion0:       ALARM
beep_enable:      disabled

nct6687-isa-0a20
Adapter: ISA adapter
+12V:           12.12 V  (min = +12.07 V, max = +12.12 V)
+5V:             5.03 V  (min =  +5.02 V, max =  +5.03 V)
+3.3V:           3.36 V  (min =  +0.00 V, max =  +3.36 V)
CPU Soc:         1.30 V  (min =  +1.30 V, max =  +1.31 V)
CPU Vcore:       1.06 V  (min =  +1.06 V, max =  +1.45 V)
CPU 1P8:         0.00 V  (min =  +0.00 V, max =  +0.00 V)
CPU VDDP:        0.00 V  (min =  +0.00 V, max =  +0.00 V)
DRAM:            1.34 V  (min =  +1.34 V, max =  +1.34 V)
Chipset:       334.00 mV (min =  +0.30 V, max =  +0.35 V)
CPU SA:        610.00 mV (min =  +0.61 V, max =  +0.79 V)
Voltage #2:      1.54 V  (min =  +1.53 V, max =  +1.54 V)
AVCC3:           3.31 V  (min =  +3.30 V, max =  +3.31 V)
AVSB:            3.36 V  (min =  +0.00 V, max =  +3.36 V)
VBat:            2.05 V  (min =  +0.00 V, max =  +2.05 V)
CPU Fan:        909 RPM  (min =  731 RPM)
Pump Fan:      3084 RPM  (min = 3069 RPM)
System Fan #1:  562 RPM  (min =  551 RPM)
System Fan #2: 1219 RPM  (min = 1219 RPM)
System Fan #3:  543 RPM  (min =  519 RPM)
System Fan #4:    0 RPM  (min =    0 RPM)
System Fan #5:    0 RPM  (min =    0 RPM)
System Fan #6:    0 RPM  (min =    0 RPM)
ERROR: Can't get value of subfeature fan9_input: Kernel interface error
ERROR: Can't get value of subfeature fan9_min: Kernel interface error
fan9:               N/A  (min =    0 RPM)
ERROR: Can't get value of subfeature fan10_input: Kernel interface error
ERROR: Can't get value of subfeature fan10_min: Kernel interface error
fan10:              N/A  (min =    0 RPM)
ERROR: Can't get value of subfeature temp1_max_hyst: Kernel interface error
ERROR: Can't get value of subfeature temp1_crit: Kernel interface error
CPU:            +57.0°C  (low  = +57.0°C)
                         (high = +74.0°C, hyst =  +0.0°C)
ERROR: Can't get value of subfeature temp1_type: Kernel interface error
                         (crit =  +0.0°C)  sensor = disabled
ERROR: Can't get value of subfeature temp2_max_hyst: Kernel interface error
ERROR: Can't get value of subfeature temp2_crit: Kernel interface error
System:         +49.0°C  (low  = +38.0°C)
                         (high = +49.0°C, hyst =  +0.0°C)
ERROR: Can't get value of subfeature temp2_type: Kernel interface error
                         (crit =  +0.0°C)  sensor = disabled
ERROR: Can't get value of subfeature temp3_max_hyst: Kernel interface error
ERROR: Can't get value of subfeature temp3_crit: Kernel interface error
VRM MOS:        +47.0°C  (low  = +35.0°C)
                         (high = +48.0°C, hyst =  +0.0°C)
ERROR: Can't get value of subfeature temp3_type: Kernel interface error
                         (crit =  +0.0°C)  sensor = disabled
ERROR: Can't get value of subfeature temp4_max_hyst: Kernel interface error
ERROR: Can't get value of subfeature temp4_crit: Kernel interface error
PCH:            +49.0°C  (low  = +37.0°C)
                         (high = +49.0°C, hyst =  +0.0°C)
ERROR: Can't get value of subfeature temp4_type: Kernel interface error
                         (crit =  +0.0°C)  sensor = disabled
ERROR: Can't get value of subfeature temp5_max_hyst: Kernel interface error
ERROR: Can't get value of subfeature temp5_crit: Kernel interface error
CPU Socket:     +46.5°C  (low  = +36.0°C)
                         (high = +49.0°C, hyst =  +0.0°C)
ERROR: Can't get value of subfeature temp5_type: Kernel interface error
                         (crit =  +0.0°C)  sensor = disabled
ERROR: Can't get value of subfeature temp6_max_hyst: Kernel interface error
ERROR: Can't get value of subfeature temp6_crit: Kernel interface error
PCIe x1:        +80.5°C  (low  = +80.5°C)
                         (high = +83.0°C, hyst =  +0.0°C)
ERROR: Can't get value of subfeature temp6_type: Kernel interface error
                         (crit =  +0.0°C)  sensor = disabled

I use erd for my tree utility, and its output looks broken. Here's ls -R output instead:

bus/platform/devices🔒 ❯ ls -R nct6687.2592/
 driver   driver_override   hwmon   modalias   power   subsystem   uevent

nct6687.2592/hwmon:
 hwmon3

nct6687.2592/hwmon/hwmon3:
 device       fan3_min     fan6_min     in0_min     in3_min     in6_min     in9_min      in12_min      pwm3_enable   temp1_input   temp4_input   temp7_input
 fan1_input   fan4_input   fan7_input   in1_input   in4_input   in7_input   in10_input   in13_input    pwm4          temp1_label   temp4_label   temp7_label
 fan1_label   fan4_label   fan7_label   in1_label   in4_label   in7_label   in10_label   in13_label    pwm4_enable   temp1_max     temp4_max     temp7_max
 fan1_max     fan4_max     fan7_max     in1_max     in4_max     in7_max     in10_max     in13_max      pwm5          temp1_min     temp4_min     temp7_min
 fan1_min     fan4_min     fan7_min     in1_min     in4_min     in7_min     in10_min     in13_min      pwm5_enable   temp2_input   temp5_input   uevent
 fan2_input   fan5_input   fan8_input   in2_input   in5_input   in8_input   in11_input   name          pwm6          temp2_label   temp5_label  
 fan2_label   fan5_label   fan8_label   in2_label   in5_label   in8_label   in11_label   power         pwm6_enable   temp2_max     temp5_max    
 fan2_max     fan5_max     fan8_max     in2_max     in5_max     in8_max     in11_max     pwm1          pwm7          temp2_min     temp5_min    
 fan2_min     fan5_min     fan8_min     in2_min     in5_min     in8_min     in11_min     pwm1_enable   pwm7_enable   temp3_input   temp6_input  
 fan3_input   fan6_input   in0_input    in3_input   in6_input   in9_input   in12_input   pwm2          pwm8          temp3_label   temp6_label  
 fan3_label   fan6_label   in0_label    in3_label   in6_label   in9_label   in12_label   pwm2_enable   pwm8_enable   temp3_max     temp6_max    
 fan3_max     fan6_max     in0_max      in3_max     in6_max     in9_max     in12_max     pwm3          subsystem     temp3_min     temp6_min    

nct6687.2592/hwmon/hwmon3/power:
 autosuspend_delay_ms   control   runtime_active_time   runtime_status   runtime_suspended_time

nct6687.2592/power:
 autosuspend_delay_ms   control   runtime_active_time   runtime_status   runtime_suspended_time