cpupower: add a systemd service to run cpupower
authorFrancesco Poli (wintermute) <invernomuto@paranoici.org>
Fri, 25 Apr 2025 15:07:31 +0000 (17:07 +0200)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 2 May 2025 19:52:45 +0000 (13:52 -0600)
commit9c70b779ad91604dbfcfcde90c292797cb1ff352
tree30405bb4e843eb7f4e36c70d99af9aa053cb0d07
parentb4432656b36e5cc1d50a1f2dc15357543add530e
cpupower: add a systemd service to run cpupower

One of the most typical use cases of the 'cpupower' utility works as
follows: run 'cpupower' at boot with the desired command-line options
and then forget about it.

Add a systemd service (disabled by default) that automates this use
case (for environments where the initialization system is 'systemd'),
by running 'cpupower' at boot with the settings read from a default
configuration file.

The systemd service, the associated support script and the
corresponding default configuration file are derived from what is
provided by the Arch Linux package (under "GPL-2.0-or-later" terms),
modernized and enhanced in various ways (the script has also been
checked with 'shellcheck').

Link: https://gitlab.archlinux.org/archlinux/packaging/packages/linux-tools/-/tree/dd2e2a311e05413d0d87a0346ffce8c7e98d6d2b
Signed-off-by: Francesco Poli (wintermute) <invernomuto@paranoici.org>
Reviewed-by: John B. Wyatt IV <jwyatt@redhat.com>
Reviewed-by: John B. Wyatt IV <sageofredondo@gmail.com>
Tested-by: John B. Wyatt IV <jwyatt@redhat.com>
Tested-by: John B. Wyatt IV <sageofredondo@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/power/cpupower/Makefile
tools/power/cpupower/README
tools/power/cpupower/cpupower.default [new file with mode: 0644]
tools/power/cpupower/cpupower.service.in [new file with mode: 0644]
tools/power/cpupower/cpupower.sh [new file with mode: 0644]