#!/bin/bash # Set the A76 (cpu4-7) scaling_max_freq. Whitelisted OPPs only. Called by the # callrec node process via a NOPASSWD sudo rule to cap the big-core clock during # whisper transcription — the fanless board hit CRITICAL temp + auto-shutdown on # a long (79-min) clip at full clock. Restored to 2256000 after each run. f="$1" case "$f" in 408000|600000|816000|1008000|1200000|1416000|1608000|1800000|2016000|2208000|2256000) ;; *) echo "aime-cpucap: bad freq '$f'" >&2; exit 1 ;; esac for c in 4 5 6 7; do echo "$f" > "/sys/devices/system/cpu/cpu$c/cpufreq/scaling_max_freq" 2>/dev/null done