diff --git a/hosts/dumpyourvms/dumpyourvms.nix b/hosts/dumpyourvms/dumpyourvms.nix index bb31446e..e86f05fd 100644 --- a/hosts/dumpyourvms/dumpyourvms.nix +++ b/hosts/dumpyourvms/dumpyourvms.nix @@ -27,7 +27,7 @@ in boot.kernelParams = [ "acpi_backlight=video" "hid_apple.fnmode=2" - "intel_pstate=active" + "intel_pstate=passive" "radeon.si_support=0" "amdgpu.si_support=1" ]; @@ -108,6 +108,11 @@ in hardware.keyboard.uhk.enable = true; powerManagement = { + # Use new schedutil govenor + # https://github.com/NixOS/nixpkgs/pull/42330 + # https://www.kernel.org/doc/html/v5.10/admin-guide/pm/cpufreq.html#schedutil + cpuFreqGovernor = lib.mkDefault "schedutil"; + # brcmfmac being loaded during hibernation would inhibit a successful resume # https://bugzilla.kernel.org/show_bug.cgi?id=101681#c116. # Also brcmfmac could randomly crash on resume from sleep. @@ -136,8 +141,16 @@ in # Change lid switch behaviour services.logind.lidSwitch = "hibernate"; - # Power management - services.power-profiles-daemon.enable = true; + # TLP for power management + services.tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; + CPU_BOOST_ON_AC = 1; + CPU_BOOST_ON_BAT = 0; + }; + }; services.udev.extraRules = # Disable XHC1 wakeup signal to avoid resume getting triggered some time