RPi 4 - CPU Operating Temp indication
#1
OK,

I am running KODI as an App on the latest release of RPi OS on an RPI 4, and in the scheme of things this may not be an earth-shattering issue, but I am concerned that my RPi may be overheating when running KODI.

When I look at Settings>System Information>Hardware the CPU temp is listed as not available, which i find a little strange as it must be very achievable to get it from the RPI host, or am i missing something here?

Thanks.
JohnW
Reply
#2
What do you mean you're using kodi as an app?  RPiOS is linux.  THere are no apps on linux.  There are binaries on linux.  You're running the kodi binary.  Semantics aside, temp sensor access is mainlined for a long time now.  From an terminal, try:
cat /sys/class/thermal/thermal_zone0/temp

Divide the result by 1,000 to get Celsius temp.

Or use this
Code:
temp=$(cat /sys/class/thermal/thermal_zone0/temp)
echo $(( temp / 1000 ))°C 
35°C
Need help programming a Streamzap remote?
Reply
#3
Hello,

Apologies for my terminology, but that aside, yes I am aware of how to get the CPU Temp via the Terminal, but that requires another device to access the RPI, whilst it is running KOID, via SSH. I have seen KODI provide CPU and GPU temperature in the same Setting>System Info>hardware display on other implementations of KODI on RPi, so why not in this environmentHuh

JohnW
Reply
#4
Can you confirm that the temp sensors is readable by the OS?

EDIT: I just checked on my RPi4B/Arch ARM and I have "not available" for both GPU and CPU.  LibreLE is the gold standard of Kodi distros, you might want to throw an image on a spare uSD card and confirm that these are there if you haven't already.
Need help programming a Streamzap remote?
Reply
#5
Hello,

I can read the temps via the OS Yes.

I have been trying to use LibreElec for a few weeks and gave up as it appeared I still needed access to the OS, and there are limits to what you can do with the stripped-down OS that LibreElec operate.

But during the time I was using LibreElec yes I could see both CPU and GPU temps.

Thanks
JohnW
Reply
#6
@popcornmix - do you have any thoughts on what is needed to have Kodi under Linux access the CPU temp via it's GUI?
Need help programming a Streamzap remote?
Reply
#7
I saw this thread and checked, and LE shows temperature correctly, but kodi on RPiOS shows not available.
The kodi code appears to read from /sys/class/hwmon/hwmon0/temp1_input which is available on RPiOS,
so I don't have an immediate answer. I'd need to build a kodi with some logging to see what is going on.
Reply
#8
In LE we use scripts to read the CPU and GPU temperatures, set via as.xml
https://github.com/LibreELEC/LibreELEC.t...ttings.xml

On RPi they both return the value of /sys/class/thermal/thermal_zone0/temp for both CPU and GPU (gputemp is a symlink to cputemp)
https://github.com/LibreELEC/LibreELEC.t...in/cputemp

so long,

Hias
Reply
#9
Where does the xml file need to go on the live filesystem @HiassofT
Need help programming a Streamzap remote?
Reply
#10
(2023-09-01, 03:16)graysky Wrote: Where does the xml file need to go on the live filesystem @HiassofT

https://forum.libreelec.tv/thread/21919-...-location/
Reply
#11
See https://github.com/xbmc/xbmc/pull/23703
Reply
#12
Thanks, all.  My intention was to open a PR but @popcornmix beat me to it and with a more elegant solution.
Need help programming a Streamzap remote?
Reply
#13
(2023-09-01, 13:21)popcornmix Wrote: See https://github.com/xbmc/xbmc/pull/23703

Strange. I have been using this fix for over 3 years. However, I can't remember where I got it or what was the reason for it
Kodi 18.6 @ openSUSE 13.1 x86_64 - Asus E35M1-I DELUXE | 8GB Ram | 240G 2.5" SSD
Kodi 20.2 on 1st Raspberry Pi B @ XBian | Kodi 20.2 on Raspberry Pi 3B+ @ XBian | Kodi 21a2 on Raspberry Pi4B @ XBian | Kodi 19.0 on SolidRun i.MX6 @ XBian
VDR 2.4.5 & Tvheadend4.3-1917 (for recording) on Cubieboard2 @ Debian Buster
Reply

Logout Mark Read Team Forum Stats Members Help
RPi 4 - CPU Operating Temp indication0