Author Topic: CPU Temp Sensor  (Read 16002 times)

Offline twist

  • Newbie
  • *
  • Posts: 25
  • Karma: +0/-0
    • View Profile
CPU Temp Sensor
« on: March 12, 2014, 03:29:12 pm »
Hallo,

has the Cubietruck a CPU temperature Sensor?
I dont find any information on the internet about it.
« Last Edit: March 12, 2014, 03:31:12 pm by twist »

Offline electrocret

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: CPU Temp Sensor
« Reply #1 on: March 12, 2014, 03:52:11 pm »
From everything I've read, it does not have a temperature sensor that is user readable. however according to a post on the official cubieboard website, the A20 chip has an internal sensor that will prevent the board from overheating. http://cubieboard.org/2013/09/01/2-in-1-heatsink-package-for-cubies/
Please applaud if you find what I say helpful! :)

Offline Madozu

  • Newbie
  • *
  • Posts: 12
  • Karma: +3/-0
    • View Profile
Re: CPU Temp Sensor
« Reply #2 on: March 12, 2014, 06:06:39 pm »
Hallo,

has the Cubietruck a CPU temperature Sensor?
I dont find any information on the internet about it.

Yes, CT has a temperature sensor ... or kind of ... built in to the touch pannel controller. There are two ways of accessing it:
  • Use Pats Kernel version 3.4.79. You find the sensor data at "/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input". Divide the value read by 1000 to get degrees Celsius.
  • If you use your "own" kernel source, look here for a patch that adds the touch panel thermal sensor to your kernel without adding or requiring touch panel support. You find the temp sensor data at " /sys/devices/platform/a20-tp-hwmon/temp1_input". Divide the value read from this file by 1000 to get the temperature in degrees Celsius
Both ways give identical results.

Offline twist

  • Newbie
  • *
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: CPU Temp Sensor
« Reply #3 on: March 13, 2014, 09:00:43 am »
Hallo,

thx for this info. I am using slovenia server and i found this file :)

41000/1000= 41 degrees Celsius

Is there a possibility to make something (script?! or some thing better) to display this by command or some thing like than?

Are there more possibilities for infos like hdd temp?

I am complete new to Linux so please keep your answer easy to understand for beginners.

twist

Offline Jojo

  • Developer
  • Full Member
  • ***
  • Posts: 190
  • Karma: +13/-0
  • Cubieboard 2 - A20, aRUNTU v1.666
    • View Profile
Re: CPU Temp Sensor
« Reply #4 on: March 13, 2014, 10:27:48 am »
Hallo,

has the Cubietruck a CPU temperature Sensor?
I dont find any information on the internet about it.

Yes, CT has a temperature sensor ... or kind of ... built in to the touch pannel controller. There are two ways of accessing it:
  • Use Pats Kernel version 3.4.79. You find the sensor data at "/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input". Divide the value read by 1000 to get degrees Celsius.
  • If you use your "own" kernel source, look here for a patch that adds the touch panel thermal sensor to your kernel without adding or requiring touch panel support. You find the temp sensor data at " /sys/devices/platform/a20-tp-hwmon/temp1_input". Divide the value read from this file by 1000 to get the temperature in degrees Celsius
Both ways give identical results.

Hi,

this sounds interesting. Can you tell me the source of that information? Is the touch panel controller an external IC or is it integrated in the A20? I asked Allwinner, and they sayed that there is no internal sensor  ??? .

Greetings
Don't think that anyone will take more pains for his answer, as you took for your question.

Offline twist

  • Newbie
  • *
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: CPU Temp Sensor
« Reply #5 on: March 13, 2014, 10:37:04 am »
Hallo,

when i understand this http://dl.linux-sunxi.org/A20/A20%20User%20Manual%202013-03-22.pdf right its
inside the A20 Chip.

Offline Madozu

  • Newbie
  • *
  • Posts: 12
  • Karma: +3/-0
    • View Profile
Re: CPU Temp Sensor
« Reply #6 on: March 13, 2014, 11:53:16 am »

Hi,

this sounds interesting. Can you tell me the source of that information? Is the touch panel controller an external IC or is it integrated in the A20? I asked Allwinner, and they sayed that there is no internal sensor  ??? .

Greetings

AFAIK, this is integrated into the A20. Just follow the two links in my original post ... and ask those guys where they have the information from ;)

Is there a possibility to make something (script?! or some thing better) to display this by command or some thing like than?

You could use this script to format it nicely
Code: [Select]
#!/bin/bash
cat /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input | awk '{ printf ("CPU Temperature = %0.1f°C\n",$1/1000); }'

Are there more possibilities for infos like hdd temp?

To get information about a HDD, you could install the "smartmontools" package and use the command "smartctl -A /dev/sda" to display S.M.A.R.T. values of /dev/sda.
« Last Edit: March 13, 2014, 12:10:30 pm by Madozu »

Offline twist

  • Newbie
  • *
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: CPU Temp Sensor
« Reply #7 on: March 13, 2014, 12:53:14 pm »
Hallo,

super thx for your help!

I made a *.sh copy your script inside and add sh *.sh in .bashrc. Now i see the temp very time i log in
over putty.

 :)

Have a nice weekend

login as: root
root@192.168.178.30's password:

  ____      _     _      _                   _
 / ___|   _| |__ (_) ___| |_ _ __ _   _  ___| | __
| |  | | | | '_ \| |/ _ \ __| '__| | | |/ __| |/ /
| |__| |_| | |_) | |  __/ |_| |  | |_| | (__|   <
 \____\__,_|_.__/|_|\___|\__|_|   \__,_|\___|_|\_\


Last login: Thu Mar 13 14:49:13 2014 from meiner.fritz.box
CPU Temperature = 37.8°C
root@cubie:~#
« Last Edit: March 13, 2014, 12:55:31 pm by twist »

Offline pako

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +2/-0
    • View Profile
Re: CPU Temp Sensor
« Reply #8 on: March 13, 2014, 01:49:18 pm »
Thank you, now my raspcontrol shows and CPU temperature.
just change in file /raspcontrol/lib/cpu.php string 43 to
Code: [Select]
$fh = fopen("/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input", 'r');

Offline Jojo

  • Developer
  • Full Member
  • ***
  • Posts: 190
  • Karma: +13/-0
  • Cubieboard 2 - A20, aRUNTU v1.666
    • View Profile
Re: CPU Temp Sensor
« Reply #9 on: March 13, 2014, 03:16:44 pm »
Works like a charm for me :) . Thanks a lot!
I would like to know, why the Allwinner guys told me that there is no sensor  >:( . Stupid...

And thank you for the manual! I asked Allwinner about that, too, but they didn't reply. Really bad support. I am really p****d   >:( !
Don't think that anyone will take more pains for his answer, as you took for your question.

Offline swampy

  • Newbie
  • *
  • Posts: 27
  • Karma: +1/-0
    • View Profile
Re: CPU Temp Sensor
« Reply #10 on: March 14, 2014, 12:18:19 am »
Are there more possibilities for infos like hdd temp?

To get information about a HDD, you could install the "smartmontools" package and use the command "smartctl -A /dev/sda" to display S.M.A.R.T. values of /dev/sda.

Also:

apt-get install hddtemp
hddtemp /dev/sda


Offline Jojo

  • Developer
  • Full Member
  • ***
  • Posts: 190
  • Karma: +13/-0
  • Cubieboard 2 - A20, aRUNTU v1.666
    • View Profile
Re: CPU Temp Sensor
« Reply #11 on: March 14, 2014, 09:20:08 am »
Update Allwinner conversation:
When I wrote them the first time, I asked about the internal temperature measurement and requested a useful user manual (linked above). Not that crapy "datasheet" from their homepage. The answered that there is no temp sensor supported. Nothing else  ??? .

I wrote to Allwinner again, to tell them, that there is a way to get some kind of processor temperature, and that there is a user manual like that, which I requested from them.
They answered with a reference to the "datasheet" v1.3. Useless...  >:(

Only Lantronix has even worse support...
Don't think that anyone will take more pains for his answer, as you took for your question.

ikeeki

  • Guest
Re: CPU Temp Sensor
« Reply #12 on: March 14, 2014, 09:41:22 am »
Support? That is not even mild Interest

Offline naxmon

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: CPU Temp Sensor
« Reply #13 on: April 12, 2016, 11:35:30 am »
Just for your information guys,
the temp sensor you are reading is inside of the Power Management chip and not inside the A20, normally a chip starting with AXP(209, 221, etc.)