🛠 Surveillance thermique big.LITTLE et ventilateur
Objectives
Monitor and control the thermal behavior of the Exynos5422: under mainline, the PWM fan (levels 0/130/170/230) increases in steps at 50/60/70 °C, the A15 cluster is passively throttled at 70 °C (−2 DVFS steps, ≈1.8/1.2 GHz) then at 85 °C (≈600 MHz), critical at 120 °C, with a separate thermal zone for the Mali-T628. At 2.0 GHz, active cooling is essential.
Hardware
- ODROID-XU4 with its original heatsink + fan (the passive XU4Q loses ~16% of performance under sysbench at 2.0 GHz)
sudo apt install stress-ngfor load generation
Full code
#!/usr/bin/env bash
# xu4-thermique.sh — surveillance big.LITTLE + test de chauffe
set -euo pipefail
# 1) Temperatures : un thermal_zone par capteur TMU (cpu0..cpu3 + gpu)
paste <(cat /sys/class/thermal/thermal_zone*/type) \
<(awk '{printf "%.1f C\n", $1/1000}' /sys/class/thermal/thermal_zone*/temp)
# 2) Fréquences courantes par cluster (A15 <= 2.0 GHz, A7 <= 1.4 GHz)
grep . /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq
# 3) Politique du ventilateur : pwm-fan, cooling-levels 0/130/170/230
cat /sys/class/thermal/thermal_zone0/trip_point_*_temp 2>/dev/null || true
# 4) Test de chauffe 60 s puis observation du decrochage A15
stress-ng --cpu 8 --timeout 60s &
for i in $(seq 1 12); do sleep 5
echo "--- T+$((i*5))s"; awk '{printf "%.1f C ", $1/1000}' \
/sys/class/thermal/thermal_zone*/temp; echo
grep . /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq
done
Expected verification
After 20-40 s of load, the A15 cluster frequencies drop below 2.0 GHz (steps 1.8 → 1.2 GHz) while the fan ramps up; upon release, everything returns to 2000000 kHz. Without a functioning fan, permanent throttling confirms overheating.
Common errors
- Running the board without a functional fan at 2.0 GHz: permanent throttling, total silence requires limiting to 1.2 GHz.
- Writing to /sys/class/pwm/pwm0: the channel is claimed by pwm-fan, use the thermal governor instead.
- Confusing the cpu and gpu zones: the Mali has its own thermal zone with the same scale.
- Weak 5 V power supply causing frequency drops independently of temperature.
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash