fix(users/tazjin): disable systemd user slice freezing
I have a suspicion that some systemd bugs around this feature (I actually couldn't figure out what it does and why?) introduced in systemd 256 lead to issues with suspend that I've seen in recent times. In the issue, my machine is seemingly frozen after resuming from suspend. I'd seen this previously on EXWM with xsecurelock, but now I'm seeing it on niri with swaylock, where it is more severe because switching to a VT is impossible. Upstream tickets: - https://github.com/systemd/systemd/issues/33083 - https://github.com/systemd/systemd/issues/33626 - https://bugzilla.redhat.com/show_bug.cgi?id=2321268 I'm not running a VM, but there seem to be multiple different bugs leading to this, so who knows. It's worth a try. The long-term fix will be getting rid of systemd) Change-Id: Ie985a3f222f3daac1e3c7db79ee8624c66297374 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12961 Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
parent
5c9e671c1f
commit
b9e0a682ab
3 changed files with 17 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ in
|
|||
(usermod "home-config.nix")
|
||||
(usermod "laptop.nix")
|
||||
(usermod "physical.nix")
|
||||
(usermod "systemd-unfreeze.nix")
|
||||
(pkgs.home-manager.src + "/nixos")
|
||||
] ++ (if (builtins.pathExists private) then [
|
||||
(private + "/nixos/yandex.nix")
|
||||
|
|
|
|||
15
users/tazjin/nixos/modules/systemd-unfreeze.nix
Normal file
15
users/tazjin/nixos/modules/systemd-unfreeze.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Workaround for disabling semi-broken systemd user slice freezing (whatever
|
||||
# that is). This can cause machines to become unusable after resume.
|
||||
|
||||
let
|
||||
override.environment.SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false";
|
||||
in
|
||||
{
|
||||
systemd.services = {
|
||||
systemd-suspend = override;
|
||||
systemd-hibernate = override;
|
||||
systemd-hybrid-sleep = override;
|
||||
systemd-suspend-then-hibernate = override;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -22,6 +22,7 @@ lib.fix (self: {
|
|||
(usermod "laptop.nix")
|
||||
(usermod "persistence.nix")
|
||||
(usermod "physical.nix")
|
||||
(usermod "systemd-unfreeze.nix")
|
||||
|
||||
(pkgs.home-manager.src + "/nixos")
|
||||
] ++ lib.optional (builtins.pathExists ./local-config.nix) ./local-config.nix;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue