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
commit25943a7a7f65b69ce7efb1ae9e346d6278c89b60 (patch)
tree8a105a641ae3e191abf42adcb4d64e6778d991fb
parent94d203e9dd23242440f7af3f585ae558d038ddb2 (diff)
downloadarchsetup-25943a7a7f65b69ce7efb1ae9e346d6278c89b60.tar.gz
archsetup-25943a7a7f65b69ce7efb1ae9e346d6278c89b60.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"