power: switch to hybrid-sleep
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
ef1f0b0513
commit
c656090494
4 changed files with 4 additions and 4 deletions
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -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
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Reference in a new issue