Setting a lower CPU frequency ceiling in Linux reduces heat, fan noise, and power draw when a system spends long periods under load. A lower cap is also useful when troubleshooting thermal behavior or keeping a laptop or small server from boosting harder than the workload requires.
The kernel exposes CPU performance scaling through the CPUFreq subsystem under /sys/devices/system/cpu/cpufreq. Each policyX directory represents one frequency policy, and writing a new value to scaling_max_freq lowers the highest frequency that policy is allowed to request while the current governor continues choosing speeds within the remaining range.
Verification on Ubuntu 24.04 LTS x86_64 showed populated policyX directories and writable policy files, while current Ubuntu 24.04 ARM64 guests under Parallels exposed an empty cpufreq directory with no policy entries. Use a machine that exposes at least one policyX directory, keep the chosen ceiling between cpuinfo_min_freq and cpuinfo_max_freq, and expect a direct sysfs change to be runtime state that can be replaced by a reboot or another power-management tool.
Steps to set a CPU frequency limit in Linux:
- List the CPU frequency policy directories exported by the kernel.
$ ls -1 /sys/devices/system/cpu/cpufreq/ policy0 policy1 policy2 policy3 ##### snipped ##### policy15
Related: How to check CPU speed throttling in Linux
Continue only when the directory contains at least one policyX entry. If the directory is empty or missing, the current machine is not exposing writable CPUFreq policy controls. - Read the target policy before changing it.
$ cat /sys/devices/system/cpu/cpufreq/policy0/affected_cpus 0 $ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_driver amd-pstate-epp $ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor powersave $ cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_min_freq 400000 $ cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq 4829000 $ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq 400000 $ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq 4829000
Every CPU listed in affected_cpus shares that same policy, so changing policy0 can throttle more than one logical CPU at once. Replace policy0 with the policy directory that covers the CPUs to limit.
- Choose a new maximum in kHz that stays within the published hardware range.
2000000 means 2.00 GHz. If an optional bios_limit file exists in the same policy directory and reports a lower number, that firmware cap still applies.
- Write the new maximum to the policy.
$ echo 2000000 | sudo tee /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq 2000000
The kernel rejects a scaling_max_freq value below the current scaling_min_freq. Raise the target ceiling or lower scaling_min_freq first when the current minimum is already above the intended cap.
- Read the policy back to confirm that the new ceiling is active.
$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq 2000000
scaling_max_freq is the decisive proof that the new limit is in effect. The live clock shown by scaling_cur_freq can stay below that ceiling when the system is idle.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
