diff options
author | Guillaume Girol <symphorien+git@xlumurb.eu> | 2022-11-03 12:00:00 +0000 |
---|---|---|
committer | Guillaume Girol <symphorien+git@xlumurb.eu> | 2022-11-03 12:00:00 +0000 |
commit | 5d07c39b149797c710ff09abda3ad90da231d53e (patch) | |
tree | bb3174a1eb7efd2914ed3d844c24a54fc7b5a216 /nixos/modules/config | |
parent | d40fea9aeb8840fea0d377baa4b38e39b9582458 (diff) |
nixos/power-management: fix deadlock with post-resume.{target,service}
Fixes a deadlock where post-resume.target has After=post-resume.service and post-resume.service runs systemctl try-restart post-resume.target the systemctl call cannot complete if post-resume.target was already queued at that time.
Diffstat (limited to 'nixos/modules/config')
-rw-r--r-- | nixos/modules/config/power-management.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/config/power-management.nix b/nixos/modules/config/power-management.nix index a4e8028cfbe9e..e7fd02920e0dc 100644 --- a/nixos/modules/config/power-management.nix +++ b/nixos/modules/config/power-management.nix @@ -94,7 +94,7 @@ in after = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target" ]; script = '' - /run/current-system/systemd/bin/systemctl try-restart post-resume.target + /run/current-system/systemd/bin/systemctl try-restart --no-block post-resume.target ${cfg.resumeCommands} ${cfg.powerUpCommands} ''; |