From fe44207a715771e6103e0874c9b9bd693fd79955 Mon Sep 17 00:00:00 2001 From: Alois Wohlschlager Date: Fri, 22 Jul 2022 18:33:37 +0200 Subject: [PATCH] nixos/power-management: run post-resume after suspend-then-hibernate The suspend-then-hibernate functionality is implemented by systemd in the suspend-then-hibernate.target, separately from suspend.target and hibernate.target. Thus post-resume would not run after resuming from suspend-then-hibernate. Fix this by explicitly making post-resume run after suspend-then-hibernate. --- nixos/modules/config/power-management.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/config/power-management.nix b/nixos/modules/config/power-management.nix index 710842e1503b..874b82278c93 100644 --- a/nixos/modules/config/power-management.nix +++ b/nixos/modules/config/power-management.nix @@ -91,7 +91,7 @@ in systemd.services.post-resume = { description = "Post-Resume Actions"; - after = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" ]; + after = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target" ]; script = '' /run/current-system/systemd/bin/systemctl try-restart post-resume.target