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.