aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-26 16:00:11 -0500
committerCraig Jennings <c@cjennings.net>2026-05-26 16:00:11 -0500
commitf0dabfcfb5f658eb601ac87cfad1608db4e48c1a (patch)
treee465ab0409dd67d3f769f60aceadd7f9a6b16057
parentf2dad229d23ca7f43d1b698a3fe3b11a994d4a3f (diff)
downloadarchsetup-f0dabfcfb5f658eb601ac87cfad1608db4e48c1a.tar.gz
archsetup-f0dabfcfb5f658eb601ac87cfad1608db4e48c1a.zip
feat(archsetup): set a CPU governor with cpupower
I added cpupower to the Power section: install it, set the governor in /etc/default/cpupower, and enable cpupower.service so the governor applies at boot. The governor is performance. It's the one value valid under every cpufreq driver. amd_pstate and intel_pstate in active mode accept only performance or powersave, while passive and acpi-cpufreq also allow schedutil and ondemand. Laptops want powersave, so that's a per-host override to layer on later. The enable is non-fatal, matching the rest of the Power section.
-rwxr-xr-xarchsetup12
1 files changed, 12 insertions, 0 deletions
diff --git a/archsetup b/archsetup
index 367ecd2..566a186 100755
--- a/archsetup
+++ b/archsetup
@@ -1228,6 +1228,18 @@ EOF
action="enabling upower service" && display "task" "$action"
systemctl enable upower >> "$logfile" 2>&1 || error_warn "$action" "$?"
+ # cpupower applies a CPU frequency governor at boot. 'performance' is valid
+ # under every cpufreq driver -- amd_pstate/intel_pstate active mode accept
+ # only performance and powersave, while passive/acpi-cpufreq also allow
+ # schedutil/ondemand. Laptops (velox) want 'powersave'; that's a per-host
+ # override candidate. Non-fatal -- an unsupported governor just fails to apply.
+ pacman_install cpupower
+ action="setting cpupower governor to performance" && display "task" "$action"
+ sed -i "s/^#\?governor=.*/governor='performance'/" /etc/default/cpupower >> "$logfile" 2>&1 || \
+ error_warn "$action" "$?"
+ action="enabling cpupower service" && display "task" "$action"
+ systemctl enable cpupower.service >> "$logfile" 2>&1 || error_warn "$action" "$?"
+
# Secure Shell
display "subtitle" "Secure Shell"