fix(3p/overlays): Attempt to fix hard-to-debug suspend issue

I have an issue where my AMD laptop occasionally does not wake from
suspend. The only thing ever indicated in the logs is related to the
patched line here:

  xss-lock[2409537]: saver_blank: line 19: exec: sleep: not found

This stems from xsecurelock calling a script that in turn calls sleep,
in a loop.

I don't know if this causes my unsuspend problem because this also
happens sometimes without anything failing, but it's the best lead
I've got for now. Will run with this fix for a while and see if
anything changes in the stability of suspend.

Change-Id: Ie8190433c2125cbeddb909013be9dfa00141d5c6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4403
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2021-12-18 22:08:11 +03:00 committed by tazjin
parent d018484376
commit 54140b34c5

View file

@ -76,4 +76,14 @@ self: super: {
outputHash = "19p15gavcjldn1di7yyn80ys6rj4ajaprqk8x34vxslr4y2qychf";
});
});
# TODO(tazjin): determine whether this is the cause of my suspend
# bugs, and if so, upstream it to nixpkgs.
xsecurelock = super.xsecurelock.overrideAttrs(drv: rec {
buildInputs = drv.buildInputs ++ [ self.makeWrapper ];
postInstall = ''
wrapProgram $out/libexec/xsecurelock/saver_blank \
--prefix PATH : ${self.coreutils}/bin
'';
});
}