Monitor CPU Temperature on M1 from Terminal

To monitor CPU temperature, really easy

apt-get install lm-sensors
sensors-detect
sensors

tested on Bananian Linux

I think it works, dunno though, getting the same temperature every time.

So many wrong/missing informations:

  1. thatā€™s not ā€œCPU temperatureā€ and itā€™s not even the SoCā€™s temperature. Itā€™s the PMU

  2. No need to install lm-sensors, this value is already available via sysfs: awk '{printf ("%0.1f",$1/1000); }' </sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input

  3. Due to missing mainline drivers this only works with kernel 3.4.x

  4. This applies to every device using the AXP209 PMU

  5. To read out the SoCā€™s temperature you need a separate binary with kernel 3.4 (see thread below) but this functionality is already included in mainline kernel: awk '{printf ("%0.1f",$1/1000); }' </sys/devices/virtual/thermal/thermal_zone0/temp

  6. This is still the SoCā€™s and not the CPUā€™s temperature. There is a thermal sensor somewhere inside A20ā€™s touchpad controller and this piece of silicon seems to be nearby the display engine since plugging in a HDMI display immediately fires up the display engine and the temperate rises approx. 3Ā°C

  7. Depending on the kernel you use you get the PMUā€™s temperature easily on kernel 3.4 and the SoCā€™s more unrealiable with kernel 4.0 or above.

To sum it up: This is not about CPU temp, thereā€™s no need to install additional software and this applies to each and every SBC using A10/A20 and the AXP209 PMU (Banana Pi M1+ or Pro for example) and this wonā€™t work on other devices that are called Banana Pi (M2 and M3 for example)

Everything is outlined in details since ages.

2 Likes

That makes so much more sense. lol thanks

nano /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input

This also records temperature, this time temperature changes!

Of course it reads a temperature value. But this is not ā€œCPU temperatureā€ but the one of the PMU, the power management unit (AXP209 on A10/A20 boards). The more stuff the PMU has to power the hotter it gets. The PMUā€™s temperature is also dependant of the more CPU, GPU cores and VPU have to do.

So this temperature value scales somewhat linear with ā€˜loadā€™ and normally itā€™s ok to have an eye on either the PMUā€™s or the SoCā€™s temperature value.

But this applies not to the ā€˜router boardā€™ (Banana Pi R1 or Lamobo R1) where the PMU also has to power a SATA disk and is on the lower side of the PCB whereas SoC and DRAM are on the upper. If you there watch the SoCā€™s temperature and use a crappy enclosure you wonā€™t realize that the PMUā€™s temperature might be 20Ā°-30Ā°C above SoCā€™s.