Xfce fail to suspend/lock screen

Last night I found my spare laptop again. Automatic updates are disabled, so this issue is not related to any updates.
System was a clean reinstall from manjaro minimal iso on april 9th.

When I was done with the pc last night, I told it to sleep, using the action button in system tray → suspend.

When I woke up this morning I was surprised to find the laptop still powered on. I moved the mouse and found the lock screen. I entered password and was met with the message:

none of the screen lock tools ran successfully

Then I tried suspend again - the same message popped up. Screen didn’t lock, system didn’t suspend.
(I suspect the reason I was met with the lock screen this morning was that the screensaver ran after inactivity after the error message was displayed last night.)

I open power manager and remove the tick on “lock screen when system goes to sleep”

Then I tried suspend again, and it worked.
The problem with this is that computer is not locked on resume, so I put the removed tick back. Sure enough, that also brought the lock-error-message back.

I searched around for this issue, and found that someone had solved the issue by installing light-locker. I tried that. Now I got a different error on suspend:

Failed to suspend session
Failed to lock the screen

Now I try:

$ light-locker-command --lock
** Message: 08:56:21.625: Received error message from the locker: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable

and if I run

xfce4-screensaver-command --lock

The screen goes black. When I move the mouse I get to the lock screen.

How can I fix this issue?
(I find it strange that it has turned up, as there has not been any updates performed since it was working two weeks ago)

1 Like

i had an issue with light-locker in xfce keeping black so i would recomment xfce4-screensaver
i’ve been through the set up lock, sleep, hibernation just two days ago…
so maybe it’s helpful to you.

i don’t know if it applys to you…cause of nvidia i had to

Suspend/Hibernate nvidia
  1. put the following kernel parameters in my /etc/default/grub additional to the existing nvidia_drm.modeset=1:
    NVreg_PreserveVideoMemoryAllocations=1, NVreg_TemporaryFilePath=/var/tmp,
  2. i moved all modules from mkinitcpio.conf to /etc/moduls-load.d/choseaname.conf
    nvidia, nvidia_modeset, nvidia_uvm and nvidia_drm
  3. Added resume= to kernel parameter (see https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation
  4. ‘systemctl enable nvidia-suspend.service’
    ‘systemctl enable nvidia-hibernation.service’
    ‘systemctl enable nvidia-resume.service’

after that i set the command for the lock (i think thats the important step, that missed in your configuration)
xfconf-query --create -c xfce4-session -p /general/LockCommand -t string -s "xfce4-screensaver-command --lock"

You can try it with light-locker like
xfconf-query --create -c xfce4-session -p /general/LockCommand -t string -s "light-locker-command --lock"
but it did not work for me…

Thank you. This did the trick

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.