aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xarchsetup14
1 files changed, 8 insertions, 6 deletions
diff --git a/archsetup b/archsetup
index 88b7c2e..ce8117e 100755
--- a/archsetup
+++ b/archsetup
@@ -1232,14 +1232,16 @@ 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.
+ # cpupower applies a CPU frequency governor at boot from /etc/default/cpupower.
+ # The cpupower package no longer ships that file, so write it fresh rather than
+ # edit it. 'performance' is valid under every cpufreq driver -- amd_pstate and
+ # intel_pstate active mode accept only performance and powersave, while
+ # passive/acpi-cpufreq also allow schedutil/ondemand. Laptops (velox) want
+ # 'powersave', a per-host override candidate. Non-fatal: an unsupported
+ # governor just fails to apply at boot.
pacman_install cpupower
action="setting cpupower governor to performance" && display "task" "$action"
- sed -i "s/^#\?governor=.*/governor='performance'/" /etc/default/cpupower >> "$logfile" 2>&1 || \
+ printf "# Set by archsetup.\ngovernor='performance'\n" > /etc/default/cpupower 2>> "$logfile" || \
error_warn "$action" "$?"
action="enabling cpupower service" && display "task" "$action"
systemctl enable cpupower.service >> "$logfile" 2>&1 || error_warn "$action" "$?"