2

I was reading the Arch Wiki on how to start a screen locker when suspend, but I can't get work light-locker for LightDM from my suspend@kevin.service looks like this:

[Unit]
Description=Screen Locker LightDM
Before=suspend.target

[Service]
User=kevin
Type=forking
Environment=DISPLAY=:0
ExecStart=-/usr/bin/light-locker

[Install]
WantedBy=suspend.target

After that I enable the service:

# systemctl enable suspend@kevin.service

Restarted, but when I suspend my laptop, and resume again, it just doesn't work, the status of suspend@kevin.service looks like this:

● suspend@kevin.service - Screen Locker LightDM
   Loaded: loaded (/etc/systemd/system/suspend@kevin.service; enabled; vendor preset: disabled)
   Active: inactive (dead)

nov 17 12:08:37 arch-kevin light-locker[1321]: failed to commit changes to dconf: Error al lanzar («spawn») el comando «dbus-launch --autolaunch=6409fcf6b77741839c02aa4
nov 17 12:08:37 arch-kevin light-locker[1321]: failed to commit changes to dconf: Error al lanzar («spawn») el comando «dbus-launch --autolaunch=6409fcf6b77741839c02aa4
nov 17 12:08:37 arch-kevin light-locker[1321]: failed to commit changes to dconf: Error al lanzar («spawn») el comando «dbus-launch --autolaunch=6409fcf6b77741839c02aa4
nov 17 12:08:37 arch-kevin light-locker[1321]: failed to commit changes to dconf: Error al lanzar («spawn») el comando «dbus-launch --autolaunch=6409fcf6b77741839c02aa4
nov 17 12:08:37 arch-kevin light-locker[1321]: failed to commit changes to dconf: Error al lanzar («spawn») el comando «dbus-launch --autolaunch=6409fcf6b77741839c02aa4
nov 17 12:08:37 arch-kevin light-locker[1321]: failed to register with the message bus

PD: I tried light-locker before in a terminal, typing:

$ light-locker --debug

Output:

[gs_debug_init] gs-debug.c:106 (12:15:13):   Debugging enabled
[main] light-locker.c:126 (12:15:13):    initializing light-locker 1.6.0
[main] light-locker.c:128 (12:15:13):    lock after screensaver 5
[main] light-locker.c:129 (12:15:13):    late locking 0
[main] light-locker.c:130 (12:15:13):    lock on suspend 1
[init_session_id] gs-listener-dbus.c:1882 (12:15:13):    Got session-id: /org/freedesktop/login1/session/c2
[init_session_id] gs-listener-dbus.c:1887 (12:15:13):    Got sd-session-id: c2
[init_seat_path] gs-listener-dbus.c:1964 (12:15:13):     Got seat: /org/freedesktop/DisplayManager/Seat0
[gs_listener_x11_acquire] gs-listener-x11.c:172 (12:15:13):  ScreenSaver Registered
[listener_dbus_handle_system_message] gs-listener-dbus.c:1084 (12:15:13):    obj_path=/org/freedesktop/DBus interface=org.freedesktop.DBus method=NameAcquired destination=:1.34

And from another terminal or just closing lid and resuming, it shows me LightDM display, for unlock my session

Any workaround for making this work?

  • You should try starting light-locker on startup, it will automatically handle showing LightDM on suspension etc. – Machiel May 2 '18 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.