Solved Lock and Freeze in XFCE

I've installed xfce and xorg on my FreeBSD.12-2-RELEASE. The problem is when I don't touch mouse or keyboard for about 2 mins, I can't use keyboard and mouse anymore. The screen goes freeze without locking. I can see the desktop, opened applications and even the mouse cursor moving.

The only thing I can access is consoles (Ctrl+Alt+F1 ...etc.). So, I have to go Ctrl+Alt+F1 and press Ctrl+C and type startx. At least, it can start over again although all running process are lost.

The same effect happen when I press Lock Screen from the top panel bar.

I set dbus_enable="YES" in /etc/rc.conf and do
echo ". /usr/local/etc/xdg/xfce4/xinitrc" > ~/.xinitrc

Thanks in advance.
 
A bit more faultfinding is needed - it helps if you have another computer. When the problem occurs, try to ping and ssh from the other computer. Does it work? If it does, try to figure out which processes are hanging / stalled / waiting. ps(1) is useful for that.
 
I open my xfce4-terminal and type xflock4. The screen goes freeze.

Then I do which xflock4 and check it's content which is as follows.

Code:
for lock_cmd in \
    "$LOCK_CMD" \
    "xfce4-screensaver-command --lock" \
    "xscreensaver-command -lock" \
    "gnome-screensaver-command --lock"
do
 ...
 ...

I tried to type those commands in my xfce4-terminal one by one. And found that the line xfce4-screensaver-command --lock is causing the issue. So I deleted that line and the freeze problem is gone. I don't know if it is a bug or it only happens to me.
 
Aha. You should check your Xfce session to verify that you have one (and one only) screensaver activated. This was in upgrade instructions a while back, I forgot when.
 
Aha. You should check your Xfce session to verify that you have one (and one only) screensaver activated. This was in upgrade instructions a while back, I forgot when.
Sorry, I'm a newbie. Can you tell me where to check it?
 
I tried to type those commands in my xfce4-terminal one by one. And found that the line xfce4-screensaver-command --lock is causing the issue. So I deleted that line and the freeze problem is gone. I don't know if it is a bug or it only happens to me.
Not just you. I had the same problem and happened across this post. I removed xfce4-screensaver and it resolved.
 
FWIW, the instructions are in the pkg-message of xfce4-session. Show it like this # pkg info -D xfce4-session. Here is the relevant part of the output
Code:
This port installs a startup file for xscreensaver but it is
disabled by default. This is so because the XFCE metaport
installs xfce4-screensaver to autostart and having both enabled
causes conflicts.

If you want to change the screen saver being used and enable
xscreensaver please go to the Session and Startup settings, and in
the Aplication Autostart tab enable only the relevant screensaver:

Screensaver -> to enable xscreensaver
XFCE Screensaver -> to enable xfce4-screensaver
 
Back
Top