From 52ab3940649715958400fa2f61004e98b01d793a Mon Sep 17 00:00:00 2001 From: Myned Date: Sat, 21 Dec 2024 13:30:03 -0500 Subject: [PATCH] power-profiles-daemon: use ppd for all profiles by default Signed-off-by: Myned --- machines/myork/default.nix | 16 ++++------------ options/custom/services/auto-cpufreq.nix | 2 +- options/custom/services/default.nix | 1 + profiles/desktop/default.nix | 1 - profiles/laptop/default.nix | 5 ----- 5 files changed, 6 insertions(+), 19 deletions(-) diff --git a/machines/myork/default.nix b/machines/myork/default.nix index d835fad..dedab8d 100644 --- a/machines/myork/default.nix +++ b/machines/myork/default.nix @@ -23,16 +23,8 @@ in { # https://github.com/Cryolitia/ryzen_smu/issues/1 #// programs.ryzenadj.enable = true; + services.fw-fanctrl.enable = true; settings.storage.mnt = ["myve"]; - - services = { - fw-fanctrl.enable = true; - - auto-cpufreq.max = { - battery = 3; # GHz - #// charger = 3.5; # GHz - }; - }; }; services.keyd.keyboards.default.settings.main.rightcontrol = "layer(altgr)"; # No Ctrl_R @@ -49,11 +41,11 @@ in { # Fix battery drain with suspend-then-hibernate # https://wiki.archlinux.org/title/Framework_Laptop_13#Suspend-then-hibernate_on_AMD_version - #// "rtc_cmos.use_acpi_alarm=1" + "rtc_cmos.use_acpi_alarm=1" - # Force disable display power savings + # Force display power savings # https://wiki.archlinux.org/title/Framework_Laptop_13#(AMD)_Washed-out_colors_when_using_power-profiles-daemon_in_power-saver_or_balanced_mode - #// "amdgpu.abmlevel=0" + "amdgpu.abmlevel=0" # Disable AMD scaling driver # https://wiki.archlinux.org/title/CPU_frequency_scaling#amd_pstate diff --git a/options/custom/services/auto-cpufreq.nix b/options/custom/services/auto-cpufreq.nix index 26527b5..7e0fbcf 100644 --- a/options/custom/services/auto-cpufreq.nix +++ b/options/custom/services/auto-cpufreq.nix @@ -27,7 +27,7 @@ in { # https://github.com/AdnanHodzic/auto-cpufreq/blob/master/auto-cpufreq.conf-example settings = { battery = { - energy_performance_preference = "balance_power"; + energy_performance_preference = "power"; governor = "powersave"; platform_profile = "low-power"; scaling_max_freq = mkIf (isFloat cfg.max.battery || isInt cfg.max.battery) (builtins.floor (cfg.max.battery * 1000 * 1000)); # KHz diff --git a/options/custom/services/default.nix b/options/custom/services/default.nix index af28e23..1e8081d 100644 --- a/options/custom/services/default.nix +++ b/options/custom/services/default.nix @@ -42,6 +42,7 @@ with lib; { keyd.enable = true; #// mako.enable = true; #// network-manager-applet.enable = true; + power-profiles-daemon.enable = true; samba.enable = true; #// swayidle.enable = true; swaync.enable = true; diff --git a/profiles/desktop/default.nix b/profiles/desktop/default.nix index 5633b88..1ee18df 100644 --- a/profiles/desktop/default.nix +++ b/profiles/desktop/default.nix @@ -3,6 +3,5 @@ full = true; profile = "desktop"; wallpaper = true; - services.power-profiles-daemon.enable = true; }; } diff --git a/profiles/laptop/default.nix b/profiles/laptop/default.nix index 87a8764..d66479b 100644 --- a/profiles/laptop/default.nix +++ b/profiles/laptop/default.nix @@ -2,11 +2,6 @@ custom = { full = true; profile = "desktop"; # Inherit desktop - - services = { - #// auto-cpufreq.enable = true; - power-profiles-daemon.enable = true; - }; }; #!! Rebuild offline - drastically increases initial download and resulting closure size