2

I'd like to monitor CPU core temperatures on a Dell Inspiron 16 5625 (which has an AMD Ryzen 7 5825U) but I'm not finding solutions.

The source for k10temp does have chip ids for recent (Zen 3) AMD processors, so the reason may be the 5825U doesn't expose much information to the OS, as reported when I tried the only the safe checks with sudo sensors-detect:

Sorry, no sensors were detected.
This is relatively common on laptops, where thermal management is
handled by ACPI rather than the OS.

And when I run sensors it reports data from k10temp - I think the best available driver is installed. If there is an alternative an answer here is a (somewhat old) guide to installation.

This is what I had originally found, in case it's useful:

I looked at /sys/class/thermal and there's 16 cooling_device entries (I'm not familiar with these, but the CPU has 8 cores and 16 HW threads). There is only one thermal_zone entry, so this doesn't seem to have per-core details.

I had looked at the hwmon support status page on the kernel wiki and the latest AMD architecture listed as supported is "16h". Cross referencing the AMD product page the Zen 3, which according to Wikipedia's AMD CPU codenames, is "19h", so while the chips are detected, I'm not sure if support is complete.

That lm-sensors wiki home page does have a note:

The content at this time is being copied from the archive of lm-sensors.org. Once that is complete the content will be updated.

Unfortunately, lm-sensors.org seems to be down at the moment.

Finally, below is a sensors report (this output didn't change after I ran sensors-detect) and it doesn't call out "CPU" or "cores".

Thanks for any help or guidance.

> sensors
amdgpu-pci-0400
Adapter: PCI adapter
vddgfx:        1.38 V  
vddnb:       768.00 mV 
edge:         +42.0°C  
slowPPT:       3.00 mW

k10temp-pci-00c3 Adapter: PCI adapter Tctl: +43.6°C

BAT0-acpi-0 Adapter: ACPI interface in0: 17.37 V
curr1: 1000.00 uA

dell_smm-isa-0000 Adapter: ISA adapter Processor Fan: 0 RPM Other: +43.0°C
SODIMM: +39.0°C
Ambient: +33.0°C
Other: +38.0°C
GPU: +16.0°C

nvme-pci-0200 Adapter: PCI adapter Composite: +31.9°C (low = -20.1°C, high = +82.8°C) (crit = +84.8°C) Sensor 1: +31.9°C (low = -273.1°C, high = +65261.8°C)

acpitz-acpi-0 Adapter: ACPI interface temp1: +43.0°C (crit = +115.0°C)

Edit: I originally put 24.04 in the question by accident! I meant something current... 22.04 and, well oops! Aplogies!

2 Answers2

0

One solution for Linux is to use the psutil library in Python:

import psutil
print( psutil.sensors_temperatures() )
print( psutil.sensors_temperatures()['cpu_thermal'][0][1] )

The first print line will show everything returned from the temperature sensors. The second line outputs only the CPU temperature for my Raspberry Pi 4 running Raspbian (a distro based on Debian), and looks like this:

>>> print( psutil.sensors_temperatures()['cpu_thermal'][0][1] )
71.088

More information can be found here.

Another solution is to use Node-RED, with a CPU plugin, like this one.

From that node, I take the reading and publish it to my MQTT broker. Then I consume the data from a few different MQTT clients, who each run a web server (in Node-RED) that shows the temperatures in a gauge and on a chart.

I cannot say enough good things about Node-RED and MQTT.

0

Consistent with the output of sensors from k10temp, CoreFreq finds only a single temperature sensor on AMD Ryzen laptop chips (see the reports on the CoreFreq wiki).

Unless there are sensors on the chip which can be accessed using a different method, the inability of the OS to monitor individual core temperatures looks like a limitation of the HW.

(For completeness, this is my post on AMD's community site; the author of CoreFreq provided the information for this answer and the relevant links)