Command to read CPU, GPU temperature?

Any idea which command should we use to get current temp readings on GPU and CPU?

Thanks

Hi,
please try:
cat /sys/class/thermal/thermal_zone0/temp
cat /sys/class/thermal/thermal_zone1/temp
to get temps from the 2 thermal zones of the soc (they appear to be related)
I don’t know if it’s possible to get either CPU or GPU temp.

You could also try:
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

cat /sys/devices/system/cpu/cpu5/cpufreq/cpuinfo_cur_freq
to get each core frequency and understand if the core is throttling / overheating.

2 Likes

you should note that even though the frequency is dynamic it is kinda of fixed to a few specific freqencies,especially the 100MHz multiples, so you will see frequencies like 2218 MHz, 2118MHz, 2018 Mhz, 1918 MHz etc.

The system shows that the CPU is always running at full speed. 1800MHz on the A53 cores and 2200MHz on the A72 Cores. Is there trick to get the real values?

Well if your device is not throttling it will be in the highest clock rate, this is because the governor is set to Performance by default, you can set it to be in the powersave mode and see that that your clock rate suddenly drops when Idle…

Thanks, thats true the governor is set to “performance”.
How canI set it to “interactive”? I use Ubunutu 18.04 and cpuwoer does not work with provided kernel.

1 Like

I think you can try this, it is a permanent fix:

sudo sed -i 's/^GOVERNOR=.*/GOVERNOR="interactive"/' /etc/init.d/cpufrequtils
2 Likes

hi, yes, most likely it is enough to change the system settings for the processor “interactive”

1 Like

Is interactive running stable?

interactive is usually the default for Android and is considered popular.

Interactive - “productive” kernel mode. Modified kernel mode ondemand, which changes the core frequency faster, but unlike ondemand, it is allowed to spend more time at the maximum frequency. Therefore less energy efficient.

Assuming the units returned are in thousandths of a degree C?