Find file History
Abhishek Goel Shuah Khan
Abhishek Goel and Shuah Khan cpupower : Auto-completion for cpupower tool
This script adds support for auto-completion for cpupower tool.
Added support for auto-completion of all the eight commands for
cpupower tool and their all subsequent sub-commands, wherever

A sample output after applying this script -

root@ubuntu:~# cpupower f<TAB>
root@ubuntu:~# cpupower frequency-<TAB>
frequency-info  frequency-set
root@ubuntu:~# cpupower frequency-set -
-d          --freq      --governor  --min       --related
-f          -g          --max       -r          -u
root@ubuntu:~# cpupower frequency-set -g <TAB>
conservative ondemand performance powersave schedutil userspace
root@ubuntu:~# cpupower frequency-set -f <TAB>
2061000  2194000  2327000  2460000  2593000  2726000  2859000
2094000  2227000  2360000  2493000  2626000  2759000  2892000
2128000  2261000  2394000  2527000  2660000  2793000  2926000
2161000  2294000  2427000  2560000  2693000  2826000  2959000
root@ubuntu:~# cpupower frequency-set -f 206<TAB>
root@ubuntu:~# cpupower frequency-set -f 2061000

Signed-off-by: Abhishek Goel <>
Signed-off-by: Bharath Thodla <>
Tested-by: Thomas Renninger <>
Signed-off-by: Shuah Khan <>
Latest commit 901d32b Dec 5, 2018


The cpupower package consists of the following elements:


On x86 pciutils is needed at runtime (-lpci).
For compilation pciutils-devel (pci/pci.h) and a gcc version
providing cpuid.h is needed.
For both it's not explicitly checked for (yet).


"libcpupower" is a library which offers a unified access method for userspace
tools and programs to the cpufreq core and drivers in the Linux kernel. This
allows for code reduction in userspace tools, a clean implementation of
the interaction to the cpufreq core, and support for both the sysfs and proc
interfaces [depending on configuration, see below].

compilation and installation

make install

should suffice on most systems. It builds libcpupower to put in
/usr/lib; cpupower, to put in /usr/bin; and
cpufreq-bench to put in /usr/sbin. If you want to set up the paths
differently and/or want to configure the package to your specific
needs, you need to open "Makefile" with an editor of your choice and
edit the block marked CONFIGURATION.

Many thanks to Mattia Dongili who wrote the autotoolization and
libtoolization, the manpages and the italian language file for cpupower;
to Dave Jones for his feedback and his dump_psb tool; to Bruno Ducrot for his
powernow-k8-decode and intel_gsic tools as well as the french language file;
and to various others commenting on the previous (pre-)releases of 

        Dominik Brodowski