diff --git a/DECISIONS.md b/DECISIONS.md index 74978ea..09c3e9c 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -1,5 +1,25 @@ # Decisions +## 2026-08-24 – power-profiles-daemon replaces auto-cpufreq + +- **Who**: Dominik, ClaudeCode +- **Why**: auto-cpufreq arrived a day earlier as the backend of the quickshell CpuGov + widget, not because it fits the hardware. Upstream calls it a laptop tool and points + AMD users at `amd_pstate.enable=0`, while the kernel documents that amd-pstate in + active mode ignores the requested performance level and reads only the minimum, + maximum and EPP registers — so the governor auto-cpufreq switches decides nothing. +- **Tradeoffs**: ppd writes those registers (`ppd-driver-amd-pstate.c`) and the ACPI + `platform_profile`, and its polkit policy allows the active session to switch + profiles without pkexec. Given up is the load-dependent automatic: ppd has three + fixed profiles and leaves reacting to the firmware. The module lives in + `modules/services.nix`, so the testvm gets it too — there ppd finds no driver and + falls back to `ppd-driver-placeholder.c`, which touches no hardware, whereas + auto-cpufreq was a daemon polling sysfs that a virtio guest does not have. The + NixOS module asserts against auto-cpufreq, so a leftover elsewhere fails evaluation + rather than running two daemons at one knob. +- **How**: `services.power-profiles-daemon.enable` in `modules/services.nix`. The widget + itself lives in the moonarch tree this flake deploys from and switched with it. + ## 2026-08-20 – Input denoising was deployed to a path PipeWire never reads - **Who**: Dominik, ClaudeCode diff --git a/modules/services.nix b/modules/services.nix index 1dab3c5..2db6629 100644 --- a/modules/services.nix +++ b/modules/services.nix @@ -20,7 +20,11 @@ services.upower.enable = true; services.gvfs.enable = true; services.fwupd.enable = true; - services.auto-cpufreq.enable = true; + # power-profiles-daemon over auto-cpufreq: on amd-pstate in active mode the + # platform decides the frequency from the min/max and EPP registers alone, so + # the governor is the wrong knob. ppd writes EPP and the ACPI platform_profile; + # where neither exists it falls back to a driver that touches no hardware. + services.power-profiles-daemon.enable = true; # --- Firewall, replaces the ufw calls in post-install.sh --- networking.firewall.enable = true;