Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Reading RK3288 cores temperature

638

Credits

0

Prestige

0

Contribution

advanced

Rank: 4

Credits
638

Reading RK3288 cores temperature

Posted at 7/1/2015 05:21:28      View:11791 | Replies:8        Print      Only Author   [Copy Link] 1#
Hello,

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

Thanks
Reply

Use props Report

115

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
115
Posted at 7/1/2015 07:54:33        Only Author  2#
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.
Reply

Use props Report

638

Credits

0

Prestige

0

Contribution

advanced

Rank: 4

Credits
638
Posted at 7/1/2015 15:55:56        Only Author  3#
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.
Reply

Use props Report

115

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
115
Posted at 7/1/2015 21:44:44        Only Author  4#
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.
Reply

Use props Report

244

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
244
Posted at 7/2/2015 09:14:58        Only Author  5#
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.
http://androtab.info/
Reply

Use props Report

115

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
115
Posted at 7/2/2015 14:43:31        Only Author  6#
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
Reply

Use props Report

638

Credits

0

Prestige

0

Contribution

advanced

Rank: 4

Credits
638
Posted at 7/2/2015 21:04:32        Only Author  7#

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.
Reply

Use props Report

115

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
115
Posted at 7/3/2015 08:42:02        Only Author  8#
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).
Reply

Use props Report

115

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
115
Posted at 7/3/2015 19:35:16        Only Author  9#
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
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list