Firefly Open Source Community

Title: Reading RK3288 cores temperature [Print This Page]

Author: FesterBester38    Time: 7/1/2015 05:21
Title: Reading RK3288 cores temperature
Hello,

Does anyone knows of a command that would work with the stock Ubuntu release to read processor cores temperature?

Thanks
Author: return0    Time: 7/1/2015 07:54
I have not (yet) tried, but you should be able to use lm-sensors on Ubuntu -> http://www.lm-sensors.org

Alternatively, check in the filesystem location /proc - there might be a binding to CPU related details (e.g. /proc/cpuinfo) which also reports temperatures - also check /sys/class/thermal/ if it does exist.

This assumes that the kernel you're running is properly built to read temperatures from the SoC.
Author: FesterBester38    Time: 7/1/2015 15:55
return0 Posted at 7/1/2015 07:54
I have not (yet) tried, but you should be able to use lm-sensors on Ubuntu -> http://www.lm-sensors. ...

Thank you,

I'll give a try to lm-sensors asap.

In the meantime I found a set of pseudo-files such as:

/sys/class/hwmon/hwmon0/device/temp0_input

When I "cat" the file I get a sensible result (between 40 and 62 depending on the load). There are also temp<1 to 3>_input files, but a "cat" yields the same result whatever the index. I'm wondering if there are several temperature sensors inside the RK3288 - say one sensor for each core.

Author: return0    Time: 7/1/2015 21:44
It's very possible that there are multiple temperature sensors in an SoC - specifically for the RK3288, there is a sensors controller which supports up to 4 individual sensors -> http://bbs.t-firefly.com/forum.p ... 3Njh8MzA2M3wyNzU%3D

Some of the temperatures that you see might be reported by the kernel but not related to any hardware components in particular - the kernel often shows random battery temperature on boards where there is absolutely no battery connected, for example. This is basically because with one kernel for that particular SoC architecture (say, RK3288) you can support different applications (e.g. mobile or dev board) without much porting effort.
Author: naobsd    Time: 7/2/2015 09:14
Last edited by naobsd In 7/2/2015 10:18 Editor
FesterBester38 Posted at 7/1/2015 16:55
In the meantime I found a set of pseudo-files such as:

/sys/class/hwmon/hwmon0/device/temp0_input

When I "cat" the file I get a sensible result (between 40 and 62 depending on the load). There are also temp<1 to 3>_input files, but a "cat" yields the same result whatever the index. I'm wondering if there are several temperature sensors inside the RK3288 - say one sensor for each core.

from TRM
The system has three Temperature Sensors, channel0 is reserve, and channel 1is for CPU, and
channel 2 is for GPU.

if your system is well stable(no or constant workload), it might report same values.

it's very hardware component(SoC) related sensor. it's not random temperature, not for different applications.
Author: return0    Time: 7/2/2015 14:43
it's very hardware component(SoC) related sensor


What are you referring to, exactly?

it's not random temperature


Uh? Perhaps you want to clarify where the temperature below is read from then (Firefly RK3288):

  1. root@rk3288:/sys/class/hwmon/hwmon1 # cat name; cat temp1_input
  2. test_battery
  3. 2600
Copy the code


Same SoC, different device, no battery (SunChip CX929):

  1. root@rk3288:/sys/class/hwmon/hwmon1 # cat name; cat temp1_input
  2. battery
  3. 1400
Copy the code


This one also does not look SoC related to me (P90HD RK3288):

  1. root@p90hd:/sys/class/hwmon/hwmon0 # cat name; cat temp1_input
  2. battery
  3. 28500
Copy the code

Author: FesterBester38    Time: 7/2/2015 21:04

I have not (yet) tried, but you should be able to use lm-sensors on Ubuntu -> http://www.lm-sensors.org


I gave a try to lm-sensors but it returns temperature equal to 0 for tsadc. The same for the GUI tool Psensor (maybe that Psensor is based on lm-sensors?).

  1. Uh? Perhaps you want to clarify where the temperature below is read from then (Firefly RK3288):
Copy the code


If I "cd" to "/sys/class/hwmon/hwmon0/device" and then type "cat name; cat temp0_input;... cat temp3_input"
I get :
rockchip-tsadc
42
43
42
42

Of course the values displayed vary with the current load but they stay close to each other. If I have correctly understood the TSADC chapter of the TRM the temp0_input could be the ˇ°reservedˇ± channel, the temp1_input could be the CPU channel, and the temp2_input the GPU.

Author: return0    Time: 7/3/2015 08:42
FesterBester38 Posted at 7/2/2015 21:04
I gave a try to lm-sensors but it returns temperature equal to 0 for tsadc. The same for the G ...

Hi, probably lm_sensors does not support the TS-ADC embedded into the RK3288 - yes most GUIs for temperature monitoring in Linux rely on lm_sensors.

An idea to help you find out which temperature actually relates to the CPU is to run a stress-test that only involves CPU processing and not GPU at all - in theory, you should observe the CPU temp increasing while the GPU temp should remain noticeably lower.

For example, try the excellent "stress" and "cpuburn" programs which should be available via package manager in Ubuntu (hopefully for ARM architecture).

http://manpages.ubuntu.com/manpages/trusty/en/man1/stress.1.html
http://manpages.ubuntu.com/manpages/utopic/en/man1/cpuburn.1.html

The fact is also that these sensors are very close to each others in the SoC package, so it is unlikely to see a very high CPU temp and low GPU temp (and vice versa).
Author: return0    Time: 7/3/2015 19:35
For the sake of experimenting, I verified that all the 4 available temperatures (excluding test_battery) temp0_input to temp3_input, remain relatively close in value when the CPU is performing stress-benchmarks.

Definitely a useful Android app: https://play.google.com/store/ap ... stability&hl=en




Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1