You are not logged in.

#1 2015-06-06 10:24:48

dejy
Member
Registered: 2014-03-18
Posts: 67

Slock suspend@.service triggered only after resume

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

Last edited by dejy (2015-06-06 10:25:17)

Offline

#2 2015-06-06 13:50:29

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Slock suspend@.service triggered only after resume

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

Board footer

Powered by FluxBB