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.
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
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
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
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
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?
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.
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.
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.
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.
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:
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]
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.
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:
. /boot/dietpi/func/dietpi-globals
It seems like 42°C is the WiFi adapter? Hotter than the CPU, strange .
Confusing . 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 . 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 .
Sorry for digging this up again.
How do I setup the banner script to fetch this?
BTW even neofetch gets it wrong and tells me the CPU is at 92c at idle!