Linux CPU frequency
See current CPU frequency¶
To display frequencies of all CPU cores every second:
watch -n1 lscpu --all --extended
Change CPU frequency directly¶
Source: Stackoverflow
Query CPU options
grep . /sys/devices/system/cpu/cpu0/cpufreq/*
Set the maximum CPU frequency
echo 4400000 | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
Change CPU frequency using cpufrequtils¶
Install cpufrequtils
sudo apt install cpufrequtils
Set the maximum CPU frequency
sudo cpufreq-set -u 4Ghz
Change performance governor¶
Edit the file /etc/default/cpufrequtils
/etc/default/cpufrequtils
GOVERNOR="performance"
Restart the service
sudo systemctl restart cpufrequtils
Check the frequency status of each core
cpufreq-info