From 1fc5b1ff2910106c59fac3199c682f9acfcff7f2 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 26 May 2026 19:04:00 -0500 Subject: fix(archsetup): write the cpupower config instead of editing a missing file A VM test caught my cpupower step failing with sed exit 2: the cpupower package no longer ships /etc/default/cpupower, so there was nothing to edit. The step was non-fatal, so the install carried on, but the governor never got set. I now write the file fresh with printf, which creates it whether or not one exists. The governor stays performance for the reasons in the surrounding comment. --- archsetup | 14 ++++++++------ 1 file 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" "$?" -- cgit v1.2.3