physlock
physlock copied to clipboard
Sway: Unlocking physlock after lid is closed (suspend/sleep) causes blank screen
#96 is similar to my issue, but in my case I am using Sway, not LightDM.
swayidle
is used to trigger the lock before suspend like so:
swayidle -w \
timeout 60 'physlock -dsm -p "1"' \
timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep 'physlock -dsm -p "2"'
When the lid is closed, suspend is triggered according to /etc/systemd/logind.conf
which defines:
[Login]
...
HandleLidSwitch=suspend
...
When closing the lid, suspend is indeed triggered, and when waking form suspend, physlock
shows a password prompt. But when the correct password is entered, the screen switches to a blank black screen. The only way to fix this is to switch to a different TTY, login, and kill Sway.
Just to clarify, the blank screen does not occur when using physlock
during "regular" usage, i.e. without sleep/suspend triggers.
If I manually lock, then close the lid and suspend, the blank screen doesn't happen. But in that case, when I wake from suspend, then unlock, then proceed to lock again, this is the output:
physlock -d -s -m
physlock: /dev/tty-1: No such file or directory
And ps aux | grep physlock
returns a list of ~60 physlock
processes for the root
user.
swaylock
appears to be broken and now this... What session lockers are still viable under Wayland?
Honestly, it's beginning to look like the answer is none. The current state of session lockers is embarrassing. I've tried swaylock, waylock and now physlock, and none of them supply basic out-of-the-box functionality I would expect from a locker (and that's before going into anything regarding design/aesthetics or more advanced capabilities like fingerprint unlocking). I really appreciate the effort that developers are putting into this, but the fact is none of them provide the basic functionality needed:
- Session lock: no sudden flashes of the unlocked session, no crashes that leave an unlocked session
- Session unlock: no remaining locked when it's been unlocked, no freezes on wake from sleep, no double locking
You can follow the discussion here, but it doesn't look to be moving forward: https://github.com/swaywm/wlroots/issues/2706
Reading the relevant topic at Freedesktop/Wayland and https://github.com/swaywm/wlroots/issues/2706 makes me think that exiting to TTY suddenly does not look as bad.
Try hikari's screen locker.
No, it's part of the compositor. Logo+Shift+Backspace is the keybinding in the default configuration.
No, it's part of the compositor.
Well, then it's more of a "switch to another WM".
Ok, well that was just a suggestion. I'm happy if you fix sway with physlock or update swaylock to use the lockscreen protocol.
Session lock: no sudden flashes of the unlocked session Session unlock: no remaining locked when it's been unlocked, no freezes on wake from sleep, no double locking
BTW, these are either bugs in the compositor or layer shell protocol, not the screen locker.
BTW, these are either bugs in the compositor or layer shell protocol, not the screen locker.
This is being discussed here: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/100