CPU Temp not showing

I did a fresh install of DietPi 6.34.3 on a RPi3b and noticed the CPU temp shows “N/A” when I run the cpu command.

 DietPi v6.34.3 : 09:40 - Thu 01/14/21
 - Device model : RPi 3 Model B (aarch64)
 - Uptime : up 15 hours, 12 minutes
 - CPU temp : N/A
 - LAN IP : (wlan0)
 - MOTD : Happy New Year of the Ox 2021, may things be looking up for you!

 DietPi Team     : MichaIng (lead), Daniel Knight (founder), Joulinar (support)
 Image           : DietPi Core Team (pre-image: Raspberry Pi OS 64-bit)
 Web             : https://dietpi.com | https://twitter.com/DietPi_
 Donate          : https://dietpi.com/#donate
 DietPi Hosting  : Powered by https://myvirtualserver.com

 dietpi-launcher : All the DietPi programs in one place.
 dietpi-config   : Feature rich configuration tool for your device.
 dietpi-software : Select optimized software for installation.
 htop            : Resource monitor.
 cpu             : Shows CPU information and stats.

I did a cat of the sys thermal but got this:

 $ cat /sys/class/thermal/thermal_zone*/temp
cat: /sys/class/thermal/thermal_zone0/temp: Invalid argument

I also did:

$ sudo vcgencmd measure_temp

Is there something I missed on the install? It was working fine when running v6.33 on the same RPi3b but I had to do a clean reinstall due to a corrupt sdcard. I don’t recall doing anything before on the previous version. It just worked. Now it’s not.


Do you use any beta kernel 5.10? Can you check uname -a pls

No, just the latest available kernel.

$ uname -a
Linux PwMon 5.10.5-v8+ #1392 SMP PREEMPT Sat Jan 9 18:56:30 GMT 2021 aarch64 GNU/Linux

Best to my knowledge 5.10 is a Beta kernel and not yet released.

It’s odd then it would be installed on a fresh DietPi OS install.

Let me verify it later the evening. Currently I’m away for home

I have the exact same issue. I reinstalled DietPi on my Raspberry Pi 3B and no longer have cpu temp information on the dashboard screen. It says N/A. It was working on version 6.33.3 but fresh install of 6.34.3 does not work.

Here’s my kernel information.

Linux gretapi 5.10.5-v8+ #1392 SMP PREEMPT Sat Jan 9 18:56:30 GMT 2021 aarch64 GNU/Linux

Also tried a fresh install with version 6.34.3 on my Raspberry Pi 4 and the temp info works without issue.

It’s most probably related to Raspberry OS 64bit Beta. I guess the Foundation changed something and our script did detect it correctly now. That’s why it’s still in Beta as the Foundation could change things on the way :wink:

Ok, interesting. Well, we were warned that not all things work on 64 bit yet. I didn’t expect cpu temp to break going from previous version to the latest.

Also, why are beta kernels used for the base install? Has this always been the case?

This has nothing to do with DietPi, this is fully related to Raspberry OS 64bit Beta. The image contains the Beta flag still, because RPi OS 64bit has not been released as stable by the Foundation.

Indeed a bug of the Raspberry OS 64bit BETA in combination with BETA kernel 5.10.5 and RPi3
Looks like Foundation is now shipping 5.10 kernel version on RPi OS 64bit.
Means you are running BETA OS + BETA Kernel and it seems on RPi3 it is not working to detect temperature.

Usually, CPU temp is written to a file and can be simple read cat /sys/class/thermal/thermal_zone0/temp. On RPi3 the file is not readable and you will get Invalid argument while on RPi4 this is working well. I switched SD card between RP3 and 4 back and force. Always on RP3 it was not working, even if it has been working a minute before running RPi4

btw vcgencmd measure_temp is giving GPU temp and not CPU temp :wink:

I verified it running plain Raspberry OS 64bit BETA. There the kernel was switched to 5.10 LTS Beta as well

right after download and install

Linux raspberrypi 5.4.51-v8+ #1333 SMP PREEMPT Mon Aug 10 16:58:35 BST 2020 aarch64 GNU/Linux

after apt upgrade

Linux raspberrypi 5.10.5-v8+ #1392 SMP PREEMPT Sat Jan 9 18:56:30 GMT 2021 aarch64 GNU/Linux

The plain RPi OS is having same issue on RPi3. Definitely not related to DietPi

Ah, good to know it’s not DietPi. I guess we’ll have to be patient. It’s not a huge deal; just ticks that “OCD” box when viewing cloudshell stats. :wink:

btw vcgencmd measure_temp is giving GPU temp and not CPU temp

Also, good to know. My bad.

Hey guys, OOT, but I see you make use of the in-line code BBcode [icode] already, which I added yesterday. Does it look okay like that, or shall I change it’s appearance a bit?

Have seen it on one of your post today and for me it’s fine

for the records, we open an issue at RPi GitHib https://github.com/raspberrypi/linux/issues/4077

Excellent! Thanks.


RPi kernel dev added a fix that will be provided on one of the next kernel updates


Such a simple fix, too. I wonder if there are any other similar issues waiting to be discovered?

Thanks for the update.

one of the reason why it is still beta and not released as stable :wink:

Thanks for the fix. Much appreciated!

Well fix will be provided by Raspberry OS kernel developer, not us :wink: