A lock check reaches the shell when a display socket is gone
Pull request 15226, merged into quattro, recovers the live display when a service still names a Wayland socket that is gone. David Heinemeier Hansson said suspend had warned that the screen did not lock. The merge is not in version 4.0.4.
David Heinemeier Hansson said every suspend warned "Screen did not lock before suspend", although the screen did lock. He said a second session on tty2 had exported WAYLAND_DISPLAY=wayland-2 into the shared user manager. Hansson said that after that session was killed, the lock service still started with wayland-2, whose socket was gone, and lock status answered that the shell was not running.
The shell already recovered a live display when WAYLAND_DISPLAY was empty. The merged change does the same when the named display's socket is gone. David Heinemeier Hansson said a live check with WAYLAND_DISPLAY set to wayland-2 used to answer that the shell was not running, and with the change it returns the shell's status. David Heinemeier Hansson opened and merged the pull request.