From c65609049485cace29a04b2bacb3bf352c7ee386 Mon Sep 17 00:00:00 2001 From: Myned Date: Wed, 29 Jan 2025 06:22:56 -0600 Subject: [PATCH] power: switch to hybrid-sleep Signed-off-by: Myned --- machines/myork/default.nix | 2 +- options/custom/services/hypridle.nix | 2 +- options/custom/services/logind.nix | 2 +- options/custom/services/swayidle.nix | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/machines/myork/default.nix b/machines/myork/default.nix index b44b617..bb5c6c2 100644 --- a/machines/myork/default.nix +++ b/machines/myork/default.nix @@ -37,7 +37,7 @@ #?? sudo btrfs inspect-internal map-swapfile -r /swap/swapfile "resume_offset=533760" - # Fix battery drain with suspend-then-hibernate + # Fix battery drain with suspend # https://wiki.archlinux.org/title/Framework_Laptop_13#Suspend-then-hibernate_on_AMD_version "rtc_cmos.use_acpi_alarm=1" diff --git a/options/custom/services/hypridle.nix b/options/custom/services/hypridle.nix index 7e171a4..e45d4e3 100644 --- a/options/custom/services/hypridle.nix +++ b/options/custom/services/hypridle.nix @@ -46,7 +46,7 @@ in { { timeout = 60 * 60; # Seconds - on-timeout = "${pw-cli} info all | ${grep} running || ${systemctl} suspend-then-hibernate"; # Suspend if no audio + on-timeout = "${pw-cli} info all | ${grep} running || ${systemctl} hybrid-sleep"; # Suspend if no audio } ]; }; diff --git a/options/custom/services/logind.nix b/options/custom/services/logind.nix index f27ba9d..00965f7 100644 --- a/options/custom/services/logind.nix +++ b/options/custom/services/logind.nix @@ -10,7 +10,7 @@ in { config = mkIf cfg.enable { services.logind = { - lidSwitch = "suspend-then-hibernate"; # Laptop lid switch + lidSwitch = "hybrid-sleep"; # Laptop lid switch }; }; } diff --git a/options/custom/services/swayidle.nix b/options/custom/services/swayidle.nix index f2c50f9..be86e87 100644 --- a/options/custom/services/swayidle.nix +++ b/options/custom/services/swayidle.nix @@ -61,7 +61,7 @@ in { # https://github.com/NixOS/nixpkgs/pull/259196 # Suspend system { - command = "${systemctl} suspend-then-hibernate"; + command = "${systemctl} hybrid-sleep"; timeout = 60 * 60; # Minutes * 60 } ];