CPU temp at 122c

Having issues with your DietPi installation or found a bug? Post it here.
Darron
Posts: 18
Joined: Sun Aug 18, 2019 12:56 pm

CPU temp at 122c

Post by Darron »

CPU temp : WARNING: 122'C : 251'F (Reducing the life of your device)
I know this is wrong, the PC wouldn't work if it was right. So how do I correct it?

I'm running x86 and it's reported at MOTD.
neofetch is reporting it correctly at 24c

It's a cosmetic thing so no big deal.
I know I can disable it in dietpi-banner, but I'd rather it was corrected.

TIA.
Daz.

Code: Select all

 DietPi v7.8.2 : 09:53 - Tue 11/16/21
 ─────────────────────────────────────────────────────
 - Device model : Native PC (x86_64)
 - Uptime : up 52 minutes
 - CPU temp : WARNING: 122'C : 251'F (Reducing the life of your device)
 - FQDN/hostname : Server
 - LAN IP : 192.168.0.51 (eth0)
 - WAN IP : xx.xx.xx.xx England GB
 - Freespace (RootFS) : 153G
 - Freespace (userdata) : 153G
 - Weather (wttr.in) : Bradford, United Kingdom: 🌫  🌡️+9°C 🌬️↗11km/h
 - MOTD : Read more about the new DietPi-Dashboard:
          https://dietpi.com/docs/software/system_stats/#dietpi-dashboard
Image
User avatar
Joulinar
Posts: 6525
Joined: Sat Nov 16, 2019 12:49 am

Re: CPU temp at 122c

Post by Joulinar »

usually our script is just reading the temp from system sensor. Let's have a look. Just copy the entire code block and have it executed

Code: Select all

for i in /sys/class/thermal/thermal_zone[0-9]/temp /sys/class/hwmon/hwmon[0-9]/temp[0-9]_input /sys/devices/platform/coretemp.[0-9]/hwmon/hwmon[0-9]/temp[0-9]_input
do
[[ -e $i ]] && echo "$i : $(<$i)"
done
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Darron
Posts: 18
Joined: Sun Aug 18, 2019 12:56 pm

Re: CPU temp at 122c

Post by Darron »

Results:

Code: Select all

/sys/class/thermal/thermal_zone0/temp :
/sys/class/hwmon/hwmon0/temp1_input : 123000
/sys/class/hwmon/hwmon0/temp2_input : -62500
/sys/class/hwmon/hwmon0/temp3_input : 26000
/sys/class/hwmon/hwmon0/temp4_input : 113000
/sys/class/hwmon/hwmon0/temp5_input : 115000
/sys/class/hwmon/hwmon0/temp6_input : -128000
/sys/class/hwmon/hwmon0/temp7_input : 24000
/sys/class/hwmon/hwmon0/temp8_input : 0
/sys/class/hwmon/hwmon0/temp9_input : 0
/sys/class/hwmon/hwmon1/temp1_input : 24000
/sys/class/hwmon/hwmon1/temp2_input : 24000
/sys/class/hwmon/hwmon2/temp1_input :
Neofetch: CPU: AMD Ryzen 5 1600 (12) @ 3.2GHz [24.7°C]
Image
User avatar
Joulinar
Posts: 6525
Joined: Sat Nov 16, 2019 12:49 am

Re: CPU temp at 122c

Post by Joulinar »

interesting, all your sensor giving different temps, even negative one. If I'm not mistaken our script will use the first one available. Which would be

Code: Select all

/sys/class/hwmon/hwmon0/temp1_input : 123000
@MichaIng
pls correct me if I'm wrong
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Darron
Posts: 18
Joined: Sun Aug 18, 2019 12:56 pm

Re: CPU temp at 122c

Post by Darron »

Joulinar wrote: Wed Nov 17, 2021 11:16 am interesting, all your sensor giving different temps, even negative one. If I'm not mistaken our script will use the first one available. Which would be

Code: Select all

/sys/class/hwmon/hwmon0/temp1_input : 123000
@MichaIng
pls correct me if I'm wrong
IIRC it was correct before I started installing apps.
It does look like #7 is the correct one.
Image
User avatar
MichaIng
Site Admin
Posts: 3534
Joined: Sat Nov 18, 2017 6:21 pm

Re: CPU temp at 122c

Post by MichaIng »

Sadly this API isn't used firmware wise in a consistent way, so we need to add special cases from time to time. Bad that it is an x86_64 system so we cannot simply check a different file based on the hardware ID only.

Which apps did you install which may have changed it? Is it possible that it actually was a recent kernel upgrade?

Btw here the current logic: https://github.com/MichaIng/DietPi/blob ... 1701-L1720
/sys/class/hwmon/hwmon0/temp1_input is used because prior checked ones contain none of negative values.
Darron
Posts: 18
Joined: Sun Aug 18, 2019 12:56 pm

Re: CPU temp at 122c

Post by Darron »

Yeah it's the previous X86 image, or at least 2 weeks old.
Freshly installed this weekend.

optional extras installed:

openSSH
Nload
Pi-Hole with DHCP
LASP
LAMP
Nextcloud

I think I installed lm-sensors and ran sensors-detect on this installation, but I could be wrong. I know I purged it all to check and there's nothing left there.
Image
User avatar
MichaIng
Site Admin
Posts: 3534
Joined: Sat Nov 18, 2017 6:21 pm

Re: CPU temp at 122c

Post by MichaIng »

Hmm, not sure whether lm-sensor can or does change anything in sysfs, but I would wonder if it did. Not sure how to handle yet, as other systems may have a wrong temperature at temp7_input or below hwmon1.
Darron
Posts: 18
Joined: Sun Aug 18, 2019 12:56 pm

Re: CPU temp at 122c

Post by Darron »

I'm just about to do a fresh install (from USB SSD to internal NVMe), nothing lost and this time I know it's clean.
Image
Darron
Posts: 18
Joined: Sun Aug 18, 2019 12:56 pm

Re: CPU temp at 122c

Post by Darron »

Whatever I did previously has been undone.

It's working as it should again.

There is a slight discrepancy between neofetch and motd.
Neofetch is 10c lower, I can only assume this is MOTD reporting package temps, while neofetch is reporting core temps. This is normal.
Image
Post Reply