You are not logged in.

#1 2018-01-14 05:36:04

Registered: 2017-12-28
Posts: 8

systemd triggers screensaver *after* laptop is un-suspended

I'm trying to get systemd to kick on my screen lock before the laptop is suspended.  I'm using a unit that uses a

directive to kick off the locker:

Description=User suspend actions

ExecStart=/usr/bin/xlock -mode mountain


It partially works.  When you close the laptop, it will go to sleep and the screen will be locked but the screen doesn't actually lock until you open the laptop back up.  This results in the unlocked screen being visible for a brief moment.

Using xss-lock in place of systemd produces the same faulty result.

This is a ThinkPad X1 gen 5 but I have the same issue on my older ThinkPads.

Last edited by Defender110 (2018-01-14 05:38:08)


#2 2018-01-14 06:36:59

Registered: 2013-04-10
Posts: 1,607

Re: systemd triggers screensaver *after* laptop is un-suspended

Why are you using After= if you wan't to start the screen lock before sleep?
Replacing it with Before= should work as you intended. … leep_hooks


Board footer

Powered by FluxBB