CPU temp at 122c

Having issues with your DietPi installation or found a bug? Post it here.
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: CPU temp at 122c

Post by Joulinar »

We simply read the temperature from /sys/class/hwmon/hwmon0/temp1_input. That's what is reported by your system. Nothing more. Probably the other tool using a different value.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3514
Joined: Sat Nov 18, 2017 6:21 pm

Re: CPU temp at 122c

Post by MichaIng »

Also note that core temperatures can change quite quickly, also when only running the commands to read the temperature. To reduce overhead, after neofetch try to immediately execute either:

Code: Select all

cat /sys/class/hwmon/hwmon0/temp1_input
or

Code: Select all

G_OBTAIN_CPU_TEMP
Darron
Posts: 18
Joined: Sun Aug 18, 2019 12:56 pm

Re: CPU temp at 122c

Post by Darron »

Thank you guys for trying to sort this out, but ...

Code: Select all

root@Server:~# cat /sys/class/hwmon/hwmon0/temp1_input
32850
root@Server:~# G_OBTAIN_CPU_TEMP
43
root@Server:~#
Two different commands two different temperatures, and that's not counting nefetch which is reporting another:
CPU: AMD Ryzen 5 1600 (12) @ 3.200GHz [26.6°on]

Then I installed lm-sensors:

Code: Select all

root@Server:~# cat /sys/class/hwmon/hwmon0/temp1_input
32850
root@Server:~# G_OBTAIN_CPU_TEMP
42
root@Server:~# sensors
iwlwifi_1-virtual-0
Adapter: Virtual device
temp1:        +42.0°C

nvme-pci-0100
Adapter: PCI adapter
Composite:    +32.9°C

k10temp-pci-00c3
Adapter: PCI adapter
Tctl:         +25.5°C
Tdie:         +25.5°C
CPU: AMD Ryzen 5 1600 (12) @ 3.200GHz [25.7°on]
It makes me curious though, how can I feed the Tctl or Tdie sensors back to your MOTD? So instead of 42c it reports Tdie?
I'm sorry for the hassle, it's really not important, but it's just a bit of an annoyance and it'd be nice to have some parity.
Image
User avatar
MichaIng
Site Admin
Posts: 3514
Joined: Sat Nov 18, 2017 6:21 pm

Re: CPU temp at 122c

Post by MichaIng »

You can find the /sys file which matches this temperature and put it to the top of the list in the mentioned /boot/dietpi/func/dietpi-globals script. To update the function for the current shell session:

Code: Select all

. /boot/dietpi/func/dietpi-globals
It seems like 42°C is the WiFi adapter? Hotter than the CPU, strange :?.
Darron
Posts: 18
Joined: Sun Aug 18, 2019 12:56 pm

Re: CPU temp at 122c

Post by Darron »

MichaIng wrote: Fri Nov 19, 2021 3:06 pm You can find the /sys file which matches this temperature and put it to the top of the list in the mentioned /boot/dietpi/func/dietpi-globals script. To update the function for the current shell session:

Code: Select all

. /boot/dietpi/func/dietpi-globals
It seems like 42°C is the WiFi adapter? Hotter than the CPU, strange :?.
Want to hear something really strange? I've disabled it!
Image
User avatar
MichaIng
Site Admin
Posts: 3514
Joined: Sat Nov 18, 2017 6:21 pm

Re: CPU temp at 122c

Post by MichaIng »

Confusing :o. I dream of a world where every kernel/firmware/manufacturer uses the same sysfs files to provide CPU temperatures, same as optionally GPU and mainboard chip temperatures, those for HDDs/storage etc :D. Not sure how to proceed with this. For x86 as said it is difficult/expensive to differentiate between individual hardware. Easiest would be to allow defining a custom sysfs path to read. I just don't like that this would mean to run another sed on every function call. Probably we can load it as environment variable as part of dietpi-globals :?.
Post Reply