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
commite09a01fe0b2cbc82670663bb32c0da950d64c71b (patch)
tree8a105a641ae3e191abf42adcb4d64e6778d991fb
parentd20673374f6c25875ccd9e756b129af373ac4d66 (diff)
downloadarchsetup-e09a01fe0b2cbc82670663bb32c0da950d64c71b.tar.gz
archsetup-e09a01fe0b2cbc82670663bb32c0da950d64c71b.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"