Xfce Forum

Sub domains

You are not logged in.

#1 2023-07-24 23:30:29

Registered: 2023-05-04
Posts: 7

[SOLVED] "Failed to lock the screen"

(Related to this previously solved issue: https://forum.xfce.org/viewtopic.php?id=16676)

After a package upgrade, suspending the system now fails, and displays this popup:

Window title:     Shutdown Failed
Window subtitle: Failed to suspend session
Window text:     Failed to lock the screen.

My system logs show the following upgrades:

xfce4-session upgraded: 4.18.2 -> 4.18.3
xfce4-conf upgraded: 4.18.0 -> 4.18.1

There's nothing in the logs. How can I troubleshoot what's preventing the system logout?


Here's how I suspend the system (but it currently fails with just xfce4-session-logout --suspend as well):

~:$ crontab -l | grep xfc
*/5   4 2-31 * 1-5,7 -n pgrep -q xlock && $xfce4_session_logout
*/5   5 2-31 *     6 -n pgrep -q xlock && $xfce4_session_logout
*/5   6    1 *     * -n pgrep -q xlock && $xfce4_session_logout

~:$ cat .bin/xfce4-session-logout.cron
# export | awk '/DBUS|DISPLAY/SESSION_M/ { print $NF }'

export $(procstat -e $(pgrep xfce4-session) | sed -nr 's/.*(DBUS[^,]*).*/\1/p')
export DISPLAY=":0.0"
/usr/local/bin/xfce4-session-logout --suspend

~:$ ls -lhd /usr/local/bin/xfce4-session-logout
-rwxr-xr-x  1 root  wheel   9.1K Jul  2 20:00 /usr/local/bin/xfce4-session-logout

Last edited by UT_qx13s (2023-08-11 03:18:55)


#2 2023-08-11 03:18:00

Registered: 2023-05-04
Posts: 7

Re: [SOLVED] "Failed to lock the screen"


1. Uninstalled xlockmore (could have possibly kept it).
2. Installed xfce4-xscreensaver
3. Locked the screen with xflock4 or xfce4-screensaver-command --lock
4. grep'd the output of xfce4-screensaver-command --time to test if the screen is locked.

Now it suspends when the cron job fires off and the session is locked.


Board footer

Powered by FluxBB