LeMaker Guitar CPU Frequency Scaling
Introduction
The LeMaker Guitar is powered by the Actions Semiconductor S500 system-on-chip, which contains four ARM Cortex-A9 cores. Like most modern ARM processors, the S500 supports dynamic voltage and frequency scaling (DVFS) through the Linux kernel’s cpufreq subsystem. By adjusting the CPU clock speed at runtime, you can balance processing performance against power consumption and thermal output—an important consideration when running the Guitar in headless or battery-powered configurations.
Understanding Governors
The Linux cpufreq framework exposes several scaling governors, each implementing a different strategy for choosing the CPU clock speed. The most commonly used governors on the LeMaker Guitar are:
- ondemand – Dynamically scales the frequency based on current CPU load. When load rises above a configurable threshold the governor immediately jumps to the maximum frequency, then gradually steps down as load decreases. This is the default governor on most Guitar images and provides a good balance between responsiveness and power savings.
- performance – Locks the CPU at its highest available frequency at all times. Use this governor when you need consistent throughput and are not concerned about power draw or heat.
- powersave – Locks the CPU at its lowest available frequency. This governor minimises power consumption and is useful for idle kiosk displays or low-demand IoT gateway tasks.
- conservative – Similar to ondemand but ramps up and down more gradually, reducing frequency fluctuation and voltage switching overhead. It can extend the life of the voltage regulator in long-running deployments.
Checking the Current Governor
To see which governor is currently active, read the sysfs node for CPU 0:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
You can also list every available governor on the running kernel:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
Changing the Governor at Runtime
Switch to the performance governor with a single echo command (root permissions required):
echo performance | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
On a symmetric multi-processing kernel the change usually applies to all cores simultaneously. Verify by reading the sysfs node again after writing.
Setting Minimum and Maximum Frequencies
The S500 on the Guitar typically supports frequency steps such as 408 MHz, 720 MHz, 900 MHz, and 1104 MHz. You can clamp the frequency range by writing to scaling_min_freq and scaling_max_freq:
echo 720000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 900000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Values are specified in kilohertz. Use scaling_available_frequencies to list the exact steps supported by your kernel build.
Persisting Settings Across Reboots
Sysfs values are reset on every boot. To make your preferred governor and frequency limits permanent, add the echo commands to /etc/rc.local (before the exit 0 line) or create a systemd service unit that runs at multi-user target. Another approach is to install the cpufrequtils package and configure it via /etc/default/cpufrequtils:
sudo apt-get install cpufrequtils
echo 'GOVERNOR="ondemand"' | sudo tee /etc/default/cpufrequtils
sudo systemctl restart cpufrequtils
Monitoring in Real Time
Use the watch utility to monitor the current clock speed as workloads change:
watch -n1 cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
Pair this with a stress tool such as stress-ng to observe how each governor reacts to varying CPU demand. For more information on the LeMaker Guitar hardware and software, visit the LeMaker Guitar wiki page.
Author: LeMaker Documentation Team
Last updated: 2026-02-10