The way the sleep action works on XFCE currently is to call xflock4. This will successfully lock the screen, but nothing happens after that. I am just left with xscreensaver doing its fancy graphics on the screen. When I type in my password to unlock the screen, then the system immediately goes to sleep.
Atm I am getting around this issue by using a custom command that does xfce4-session-logout --suspend. The xfce power manager can be configured to lock the screen before suspend, which means it does the call to xflock4 by itself, so the screen gets locked after I run the suspend command.
Please consider switching to using this command over xflock4
Anonymous
xflock4 is called before sleep if "Lock screen before sleep"
option is enabled in KShutdown.
Maybe I should also try to add support for suggested "xfce4-session-logout --suspend"
in case all other (systemd, UPower, etc.) sleep functions fail.
Hmm... This is weird. I fixed some Xfce bugs years ago,
but I don't remember if this one is related.
If the problem still exist in recent KShutdown 5.2 please send me the log output
(quit KShutdown and run it in a Terminal or search in ~/.xsession-errors file)
Thanks