🛠 Surveiller température et fréquence CPU
Objectives
The H3 is known to heat up: without cooling, sustained load on the four Cortex-A7 cores causes throttling. This tutorial sets up comprehensive monitoring under Armbian/mainline: reading the sunxi THS thermal sensor, observing DVFS (frequencies and voltages controlled via the SY8106A regulator), and running a controlled load test to find your board's throttling point — with or without a heatsink.
Hardware
- Orange Pi PC running Armbian, 5 V / 2 A power supply (DC jack)
- Optional but recommended: adhesive heatsink, small USB fan
- SSH access (Ethernet+SSH tutorial)
- Packages: sudo apt install stress-ng
Complete Code
- Health check script (health.sh):
#!/usr/bin/env bash
# health.sh — température, governor, fréquence max (Orange Pi PC / H3)
echo "CPU temp: $(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000)) °C" # sunxi THS
echo "Governor: $(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor)"
echo "Fréq act: $(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq) kHz"
echo "Fréq max: $(cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq) kHz"
# Le quad A7 est nominal à 1.2 GHz sur les images Armbian :
sudo ethtool end0 2>/dev/null | grep Speed || true # lien réseau à 100 Mbit/s attendu
- Load test with 1 Hz sampling for 2 minutes:
sudo apt install -y stress-ng
stress-ng --cpu 4 --timeout 120 &
while sleep 1; do
printf '%s temp=%s°C freq=%sMHz\n' "$(date +%T)" \
"$(($(cat /sys/class/thermal/thermal_zone0/temp)/1000))" \
"$(($(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq)/1000))"
done
wait
# Vue temps réel fournie par Armbian :
armbianmonitor -m
- Compare bare vs. heatsink: rerun the test, save outputs to a file, and plot the curve.
Expected Verification
At idle: approximately 35-50 °C. Under stress: frequency rises to ~1200 MHz, then the temperature curve plateaus and frequency drops in steps — this is throttling. With a heatsink, the plateau occurs later or disappears. The exact throttling thresholds are not documented by a reliable source.
Common Errors
- Reading thermal_zone without verifying the sensor: confirm that thermal_zone0 is indeed "sun8i-ths" (otherwise iterate through /sys/class/thermal/thermal_zone*/type).
- Concluding there is a defect when frequency drops under load: this is DVFS protecting the chip, not a bug.
- Believing the regulator can be freely adjusted: mainline forces the SY8106A minimum to 1.0 V because vendor tables went below the 1.1 V specified in the datasheet — do not force it manually.
- Forgetting that the board heats up inside a closed case: a bare H3 in open air is nothing like one inside a sealed plastic case.
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash