You are not logged in.
This might be some kind of X server and not systemd issue, but I was under the distinct impression that slock should always be triggered before suspend with the following, nevertheless sometimes on lid open (resume) the desktop loads appears for a brief (~.1 seconds) before switching to the slock screen). Here is my suspend@.service file:
[Unit]
Description=User suspend actions
Before=sleep.target
[Service]
User=%I
#Type=forking
Environment=DISPLAY=:0
#ExecStartPre=
ExecStart=/usr/bin/slock
[Install]
WantedBy=sleep.targetLast edited by dejy (2015-06-06 10:25:17)
Offline
systemd has no way of knowing when slock has finished starting so it doesn't (can't) wait until slock is active. You could hack around this by adding a fixed delay or you could try i3lock with Type=forking (or another locker that supports something like this).
Offline