UCM-iMX95 Yocto Linux: CPU frequency

From Compulab Mediawiki
Revision as of 15:51, 9 January 2025 by Igor (talk | contribs) (Created page with "{{note|The operation below requires '''root''' access.}} To get the current settings run: grep -ir . /sys/devices/system/cpu/cpufreq/policy0/ 2>/dev/null == The scaling gov...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Admolition note.png The operation below requires root access.

To get the current settings run:

grep -ir . /sys/devices/system/cpu/cpufreq/policy0/ 2>/dev/null

The scaling governor

The scaling governor manages the CPU frequency to balance performance and power consumption dynamically.

To see current scaling governor run:

cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

To see available scaling governors run:

cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors

To set the scaling governor run:

echo userspace > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

CPU frequency

Admolition note.png CPU frequency can be changed only when the scaling governor is set to userspace.

To see current CPU frequency run:

cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq

To see available CPU frequencies run:

cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies

To set CPU frequency run:

echo 900000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed