From 02f1cb4dae4f466d79e102f890f093fb9e97e7f7 Mon Sep 17 00:00:00 2001 From: Alexander Kassouni Date: Sun, 30 Aug 2026 22:42:35 -0700 Subject: power settings, palette cleanup --- machines/magician/configuration.nix | 40 +++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) (limited to 'machines/magician') diff --git a/machines/magician/configuration.nix b/machines/magician/configuration.nix index 6f085c5..e11434a 100644 --- a/machines/magician/configuration.nix +++ b/machines/magician/configuration.nix @@ -17,6 +17,31 @@ settings = { CPU_SCALING_GOVERNOR_ON_AC = "performance"; CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + + # intel_pstate runs in active mode, where the scaling governor barely + # matters. EPP is the knob that actually moves power. + CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + + # drives the EC's PL1/PL2 power limits + PLATFORM_PROFILE_ON_AC = "balanced"; + PLATFORM_PROFILE_ON_BAT = "low-power"; + + # no turbo on battery, and cap sustained clocks. costs real + # performance (nix builds especially) to buy runtime. + CPU_BOOST_ON_BAT = 0; + CPU_HWP_DYN_BOOST_ON_BAT = 0; + CPU_MAX_PERF_ON_BAT = 60; + + PCIE_ASPM_ON_BAT = "powersave"; + RUNTIME_PM_ON_BAT = "auto"; + WIFI_PWR_ON_BAT = "on"; + SOUND_POWER_SAVE_ON_BAT = 1; + USB_AUTOSUSPEND = 1; + + # battery longevity, not runtime. stops charging at 85%. + START_CHARGE_THRESH_BAT0 = 75; + STOP_CHARGE_THRESH_BAT0 = 85; }; }; @@ -31,6 +56,11 @@ hardware.graphics.enable = true; services.xserver.videoDrivers = [ "modesetting" ]; + # eDP-1 reports vrr_capable. Only helps fullscreen apps flipping via Present. + services.xserver.deviceSection = '' + Option "VariableRefresh" "true" + ''; + environment.variables = { "MOZ_USE_XINPUT2" = "1"; }; @@ -45,10 +75,12 @@ services.libinput = { enable = true; - mouse.tapping = false; - # No bottom-right corner right-click; use two-finger click instead. - touchpad.clickMethod = "clickfinger"; - touchpad.naturalScrolling = true; + + touchpad = { + tapping = false; + clickMethod = "clickfinger"; # no right click corner + naturalScrolling = true; + }; }; # This option defines the first version of NixOS you have installed on this particular machine, -- cgit v1.3.1