On all of my systems, I like to monitor various hardware sensors including CPU temperatures and fan speeds. This has been a challenge for many new Ryzen based motherboards (it might be the same on new Intel motherboards too, I haven't tried any.) I'm running Ubuntu 18.04 on on an Asus Prime X370-Pro and wanted to read the sensor data with lmsensors. Out of the box with recent kernals, one can directly read the on-die AMD temperature sensor, but that's about it. Here's the default lmsensors output:
root@a2700x:~$ sensors -f
k10temp-pci-00c3
Adapter: PCI adapter
temp1: +86.4°F (high = +158.0°F)
asus-isa-0000
Adapter: ISA adapter
cpu_fan: 0 RPM
Not bad, but that's all. To get all the motherboard sensors, you'll need at add a kernal module.
As I was searching for the kernal module I'm using for this article (authored by Guentar Roeck,) I found a new project that likely works with most Asus boards. I haven't tried it out, but it looks promising.
https://github.com/electrified/asus-wmi-sensors
Guenter Roeck has removed his creation from github since he indicated that he didn't have time to maintain and support it. Lucky for us, someone else cloned it and you can find it here: https://github.com/rpavlik/it87.
Once you've downloaded and installed the module (follow the directions from the readme,) you'll see something like this when you run sensors (running sensors-detect doesn't seem necessary):
root@a2700x:~/Downloads/it87-master$ sensors -f
it8665-isa-0290
Adapter: ISA adapter
in0: +0.79 V (min = +1.80 V, max = +1.36 V)
in1: +2.48 V (min = +2.76 V, max = +2.77 V)
in2: +2.00 V (min = +0.15 V, max = +1.83 V)
in3: +1.97 V (min = +2.08 V, max = +2.08 V)
in4: +0.03 V (min = +2.69 V, max = +2.04 V)
in5: +0.03 V (min = +2.65 V, max = +2.37 V)
in6: +0.03 V (min = +2.16 V, max = +2.74 V)
3VSB: +3.33 V (min = +5.21 V, max = +5.21 V)
Vbat: +3.27 V
+3.3V: +3.33 V
fan1: 590 RPM (min = 22 RPM)
fan2: 1470 RPM (min = 28 RPM)
fan3: 1220 RPM (min = 14 RPM)
fan5: 0 RPM (min = -1 RPM) ALARM
fan6: 0 RPM (min = -1 RPM)
temp1: +86.0°F (low = +30.2°F, high = +192.2°F)
temp2: +80.6°F (low = -137.2°F, high = +14.0°F) sensor = thermistor
temp3: +78.8°F (low = -86.8°F, high = -85.0°F) sensor = thermistor
intrusion0: ALARM
k10temp-pci-00c3
Adapter: PCI adapter
temp1: +86.9°F (high = +158.0°F)
asus-isa-0000
Adapter: ISA adapter
cpu_fan: 0 RPM
That's much better, but there's a few items we should take care of. First are the labels for temperature and fans, and second is the asus-isa-000 driver output that has no value (and makes using munin harder.) To take care of the labels, we introduce a file with the following contents to /etc/sensors.d/x370-pro.
root@a2700x:/etc/sensors.d$ ls -ltr
total 4
-rw-r--r-- 1 root root 258 Dec 3 09:43 x370-pro
root@a2700x:/etc/sensors.d$ cat x370-pro
chip "it8665-isa-0290"
label temp1 "Mobo CPU temp"
label temp2 "Mobo temp1"
label temp3 "Mobo temp2"
label fan1 "CPU_Fan"
label fan2 "Rear_Fan"
label fan3 "Front_Fan"
ignore fan5
ignore fan6
chip "k10temp-pci-00c3"
label temp1 "CPU temp"
root@a2700x:/etc/sensors.d$
After that's in, the output looks like this:
root@a2700x:~# sensors -f
it8665-isa-0290
Adapter: ISA adapter
in0: +0.79 V (min = +1.80 V, max = +1.36 V)
in1: +2.50 V (min = +2.76 V, max = +2.77 V)
in2: +2.01 V (min = +0.15 V, max = +1.83 V)
in3: +1.98 V (min = +2.08 V, max = +2.08 V)
in4: +0.03 V (min = +2.69 V, max = +2.04 V)
in5: +0.03 V (min = +2.65 V, max = +2.37 V)
in6: +0.03 V (min = +2.16 V, max = +2.74 V)
3VSB: +3.31 V (min = +5.21 V, max = +5.21 V)
Vbat: +3.27 V
+3.3V: +3.31 V
CPU_Fan: 590 RPM (min = 22 RPM)
Rear_Fan: 1467 RPM (min = 28 RPM)
Front_Fan: 1222 RPM (min = 14 RPM)
Mobo CPU temp: +89.6°F (low = +30.2°F, high = +192.2°F)
Mobo temp1: +80.6°F (low = -137.2°F, high = +14.0°F) sensor = thermistor
Mobo temp2: +78.8°F (low = -86.8°F, high = -85.0°F) sensor = thermistor
intrusion0: ALARM
k10temp-pci-00c3
Adapter: PCI adapter
CPU temp: +90.5°F (high = +158.0°F)
asus-isa-0000
Adapter: ISA adapter
cpu_fan: 0 RPM
And finally, let's remove asus-isa-0000. It's old and not useful, so all we do is blacklist the module at boot time. Edit /etc/modprobe.d/blacklist.conf and add
blacklist eeepc-wmi
Next time you boot, it will be gone. If you need immediate gratification, please execute the following command:
sudo modprobe -r eeepc-wmi
Ok, here's the final output:
root@a2700x:~# sensors -f
it8665-isa-0290
Adapter: ISA adapter
in0: +0.80 V (min = +1.80 V, max = +1.36 V)
in1: +2.48 V (min = +2.76 V, max = +2.77 V)
in2: +2.00 V (min = +0.15 V, max = +1.83 V)
in3: +1.97 V (min = +2.08 V, max = +2.08 V)
in4: +0.03 V (min = +2.69 V, max = +2.04 V)
in5: +0.03 V (min = +2.65 V, max = +2.37 V)
in6: +0.03 V (min = +2.16 V, max = +2.74 V)
3VSB: +3.31 V (min = +5.21 V, max = +5.21 V)
Vbat: +3.27 V
+3.3V: +3.31 V
CPU_Fan: 592 RPM (min = 22 RPM)
Rear_Fan: 1470 RPM (min = 28 RPM)
Front_Fan: 1229 RPM (min = 14 RPM)
Mobo CPU temp: +77.0°F (low = +30.2°F, high = +192.2°F)
Mobo temp1: +80.6°F (low = -137.2°F, high = +14.0°F) sensor = thermistor
Mobo temp2: +78.8°F (low = -86.8°F, high = -85.0°F) sensor = thermistor
intrusion0: ALARM
k10temp-pci-00c3
Adapter: PCI adapter
CPU temp: +77.9°F (high = +158.0°F)
In my next update, I will add how to add this to munin.