Skip to content
This repository was archived by the owner on Sep 23, 2021. It is now read-only.
This repository was archived by the owner on Sep 23, 2021. It is now read-only.

Sway: Unlocking physlock after lid is closed (suspend/sleep) causes blank screen #112

@nyancow

Description

@nyancow

#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions