cpupower
Manage CPU power saving settings
TLDR
List CPUs
Print information about all cores
Set all CPUs to a power-saving frequency governor
Print CPU 0's available frequency governors
Print CPU 4's frequency from the hardware, in a human-readable format
SYNOPSIS
cpupower [global options]
Examples:
cpupower --cpu 0-3 frequency-set -g performance
cpupower frequency-info
PARAMETERS
--cpu
Specifies the CPU(s) to operate on. E.g., '0' for CPU0, '0-3' for CPUs 0-3, or 'all'.
--debug, -d
Enables verbose debugging output, showing more details about internal operations.
--version, -v
Displays the version information of the cpupower utility.
frequency-set
Sets CPU frequency scaling parameters like governor, min/max frequency, and boost mode.
frequency-info
Shows current CPU frequency and scaling driver information, available frequencies, and governors.
idle-info
Displays information about CPU idle states (C-states), including supported states and their latencies.
idle-set
Allows modification of CPU idle state parameters, such as disabling specific C-states for a CPU.
monitor
Provides real-time monitoring of CPU performance counters, like frequency and C-state residency.
turbo
Enables or disables Intel Turbo Boost technology on supported CPUs.
DESCRIPTION
cpupower is a powerful command-line utility for managing and monitoring CPU frequency scaling, power saving features, and performance counters on Linux systems. It interacts directly with the kernel's cpufreq subsystem and other power management interfaces exposed via sysfs.
This tool allows users to inspect current CPU settings (like minimum/maximum frequencies, active governor, available C-states), and modify them. It's crucial for optimizing system performance, energy efficiency, or striking a balance between the two. For instance, you can set the CPU governor to "performance" for maximum speed, or "powersave" to conserve battery life. cpupower is the modern successor to older cpufrequtils tools, offering a more integrated and comprehensive set of features for CPU power management. Most of its write operations require root privileges.
CAVEATS
cpupower operations, especially those that modify settings, typically require root (superuser) privileges. Incorrect usage can lead to system instability, reduced performance, or increased power consumption.
The actual functionality and available options depend heavily on the kernel's CPU frequency scaling drivers (e.g., intel_pstate, acpi_cpufreq) and underlying CPU hardware support. BIOS settings can also influence or override cpupower configurations.
CPU GOVERNORS
CPU governors are kernel mechanisms that decide how to adjust CPU frequency based on system load and power policies. Common governors include performance (maintains max frequency), powersave (maintains min frequency), ondemand (scales based on load), and schedutil (kernel scheduler-driven).
C-STATES (IDLE STATES)
C-states (or CPU idle states) are power-saving modes that a CPU can enter when it is not actively processing tasks. A higher C-state number (e.g., C3, C6, C7) indicates a deeper sleep state, consuming less power but taking longer for the CPU to wake up and resume processing. cpupower allows inspecting and sometimes managing these states to optimize power consumption.
HISTORY
cpupower emerged as part of the linux-tools project, aiming to consolidate and improve CPU power management tools. It was designed to replace the collection of individual commands provided by cpufrequtils (such as cpufreq-set and cpufreq-info), offering a unified and more powerful interface.
Its development reflects the ongoing need for granular control over CPU performance and energy efficiency in modern Linux systems, adapting to new hardware features like Intel's P-states and C-states.