cpufreq-set
Set CPU frequency scaling parameters
TLDR
Set the CPU frequency policy of CPU 1 to "userspace"
Set the current minimum CPU frequency of CPU 1
Set the current maximum CPU frequency of CPU 1
Set the current work frequency of CPU 1
SYNOPSIS
cpufreq-set [-c|--cpu CPU] [-g|--governor GOVERNOR] [-d|--min FREQ] [-u|--max FREQ] [-f|--freq FREQ] [-r|--resolve] [-h|--help] [-V|--version]
PARAMETERS
-c, --cpu CPU
CPU to affect (default: all CPUs)
-f, --freq FREQ
Set target frequency (scaling_setspeed)
-g, --governor GOVERNOR
Set scaling governor (e.g., performance, powersave)
-d, --min FREQ
Set minimum frequency (scaling_min_freq)
-u, --max FREQ
Set maximum frequency (scaling_max_freq)
-r, --resolve
Resolve FREQ to nearest supported value
-h, --help
Display help
-V, --version
Show version info
DESCRIPTION
cpufreq-set is a command-line tool from the cpufrequtils package for configuring the Linux kernel's CPUFreq subsystem. It enables manual adjustment of CPU scaling governors (e.g., performance, powersave, ondemand), minimum/maximum frequencies, or a target frequency for specific CPUs.
The utility writes to sysfs files under /sys/devices/system/cpu/cpu*/cpufreq/, typically requiring root privileges. Frequencies accept Hz, kHz, MHz, or GHz suffixes and can be resolved to hardware-supported values with -r. By default, it affects all CPUs; use -c to target one.
Ideal for power management, performance optimization, or benchmarking without kernel recompilation. Changes are not persistent across reboots unless scripted (e.g., via systemd). Verify settings with cpufreq-info. Availability depends on kernel CPUFreq drivers and hardware support.
CAVEATS
Requires root privileges. Frequencies/governors limited by hardware and kernel drivers. Non-persistent across reboots. Use cpufreq-info to verify.
EXAMPLES
cpufreq-set -g performance (all CPUs to max performance)
cpufreq-set -f 2.0GHz -c 0 (CPU 0 to 2GHz)
cpufreq-set -u 1.5GHz -d 800MHz (limit range on all CPUs)
HISTORY
Developed in cpufrequtils (2004-2005) for Linux 2.6 CPUFreq support. Largely superseded by cpupower in modern kernels, but still widely used.
SEE ALSO
cpufreq-info(1), cpupower(1), tuned(8)


