🛠 Surveillance thermique et fréquence CPU

ODROID-C4 (Hardkernel) · avance · Schéma : IMG-odroid-c4-avance-2-odroidc4-thermique.svg — ODROID-C4 vu de dessus avec son dissipateur passif 40×32 mm, sondes de température (junction du S905X3) et graphique fréquence/temps de 1,0 à 1,908 GHz.

Objectives

Instrument the ODROID-C4 for 24/7 service: read mainline kernel thermal zones, observe the actual OPP steps of the S905X3 (the SM1 table stops at 1.908 GHz, not the 2.0 GHz marketing figure), tune the governor, and verify the frequency actually reached by your image — some images limit the board to 1.5 GHz by default. Reference power consumption: ≈ 1.8 W at idle, ≈ 3.64 W under CPU stress with the included passive heatsink.

Hardware

Complete code

#!/usr/bin/env bash
# suivi_c4.sh : temperature + frequence, echantillon / 2 s
sudo apt install -y linux-cpupower stress-ng
list { for z in /sys/class/thermal/thermal_zone*/temp; do
    printf '%s %d °C\n' "$(dirname $z | xargs basename)" \
      $(( $(cat $z) / 1000 )); done; }
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
# -> 1000000 1200000 1404000 1500000 1608000 1704000 1800000 1908000
sudo cpupower frequency-set -g performance
stress-ng --cpu 4 --timeout 120s &
for i in $(seq 1 30); do
  list | tr '\n' ' '
  echo "| $(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq) Hz"
  sleep 2
done
wait
cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state  # temps par palier

Expected verification

During the 120 s stress test, the current frequency climbs toward the highest available step (1.908 GHz on a full mainline image, 1.5 GHz if the image is limited — the time_in_state file proves this). The temperature rises and then stabilizes with the heatsink; no shutdown or reset occurs. At idle, scaling_cur_freq drops back toward 1.0 GHz with the powersave governor, consistent with the ≈ 1.8 W power envelope measurement.

Common mistakes

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials