1
1
Fork 0

power: switch to hybrid-sleep

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2025-01-29 06:22:56 -06:00
parent ef1f0b0513
commit c656090494
Signed by: Myned
GPG key ID: C7224454F7881A34
4 changed files with 4 additions and 4 deletions

View file

@ -37,7 +37,7 @@
#?? sudo btrfs inspect-internal map-swapfile -r /swap/swapfile #?? sudo btrfs inspect-internal map-swapfile -r /swap/swapfile
"resume_offset=533760" "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 # 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"

View file

@ -46,7 +46,7 @@ in {
{ {
timeout = 60 * 60; # Seconds 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
} }
]; ];
}; };

View file

@ -10,7 +10,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.logind = { services.logind = {
lidSwitch = "suspend-then-hibernate"; # Laptop lid switch lidSwitch = "hybrid-sleep"; # Laptop lid switch
}; };
}; };
} }

View file

@ -61,7 +61,7 @@ in {
# https://github.com/NixOS/nixpkgs/pull/259196 # https://github.com/NixOS/nixpkgs/pull/259196
# Suspend system # Suspend system
{ {
command = "${systemctl} suspend-then-hibernate"; command = "${systemctl} hybrid-sleep";
timeout = 60 * 60; # Minutes * 60 timeout = 60 * 60; # Minutes * 60
} }
]; ];