🛠 Surveiller la thermique big.LITTLE et piloter les fréquences CPU
Objectives
Monitor the temperature and frequency of the 8 big.LITTLE cores on the RK3588 (4 Cortex-A76 up to 2.4 GHz + 4 Cortex-A55 up to 1.8 GHz), understand the thermal policy of the mainline device-tree (fan triggered at 55 °C, full speed at 65 °C, package_thermal threshold), and choose a frequency governor. The board has no officially published temperature range: active cooling (5 V PWM fan connector or heatsink) is expected under sustained load.
Hardware
- Orange Pi 5 Plus with heatsink and/or 5 V fan on the dedicated connector
- 5 V / 4 A minimum power supply (A76 peaks at 2.4 GHz + NVMe + 2.5 GbE stress the input)
sudo apt install -y stress-ng linux-tools-common linux-cpupower
Complete code
# 1. Températures en continu (une ligne par zone thermique)
watch -n1 'paste <(cat /sys/class/thermal/thermal_zone*/type 2>/dev/null) \
<(cat /sys/class/thermal/thermal_zone*/temp 2>/dev/null)'
# 2. Fréquences par policy cpufreq (une policy par cluster big.LITTLE)
for p in /sys/devices/system/cpu/cpufreq/policy*; do
echo "$(basename $p) : $(cat $p/scaling_cur_freq) Hz (max $(cat $p/cpuinfo_max_freq))"
done
# 3. Gouverneurs : performance en bench, powersched/ondemand au quotidien
sudo apt install -y linux-cpupower
sudo cpupower frequency-set -g performance
cat /sys/devices/system/cpu/cpufreq/policy*/scaling_governor
# 4. Stress 8 cœurs pendant 60 s et observation du throttling
sudo apt install -y stress-ng
stress-ng --cpu 8 --timeout 60s &
for i in $(seq 1 12); do
paste <(cat /sys/class/thermal/thermal_zone*/temp) \
<(cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq)
sleep 5
done
# 5. Seuils thermiques déclarés par le device-tree
sudo apt install -y lm-sensors && sensors
paste <(cat /sys/class/thermal/thermal_zone*/type) \
<(cat /sys/class/thermal/thermal_zone*/trip_type 2>/dev/null)
Expected verification
At idle: 30–50 °C. Under stress-ng, frequencies rise (up to 2,400,000 kHz on the A76 cluster, 1,800,000 kHz on the A55 cluster) then the temperature climbs towards the 55/65 °C thresholds where the onboard fan accelerates; in case of saturation, scaling_cur_freq drops below the maximum (throttling visible in the loop).
Common errors
- Confusing cpufreq policy and cores: each policy covers a cluster (the cpu0..cpu7 indices of the big.LITTLE clusters are not guaranteed across images) — verify with
cat $p/related_cpus. - Leaving the performance governor permanently: unnecessary heat and power consumption in service.
- Board without airflow in a closed case: the 55/65 °C thresholds are reached in a few minutes; provide the fan on the 5 V PWM connector.
- >
Other tutorials for this board
- Allumer une LED via le GPIO 40 broches (libgpiod)
- Lire un bouton poussoir et afficher dans la console
- Premier script Python : fiche signalétique de la carte et LED
- Variation d'intensité d'une LED avec PWM (sysfs pwm)
- Lire un capteur I2C (BMP280) depuis le bus du connecteur
- Exploiter le double Ethernet 2,5 GbE et sécuriser le SSH
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash