Lock-screen does not play well with Laptop Lid actions + suspend/resume:
Steps to reproduce:
select "Suspend" in Xfce Power Manager > General > Laptop Lid
select "Lock screen when screensaver is active" in Screen Saver Preferences
close lid and wait for system to suspend.
open lid and resume system
Result:
Lock screen appears for a fraction of a second and then desktop content appears without the need of entering user's login password.
However the desktop is locked because I need to blindly type my login password before I can do anything further.
What works:
On the other end when calling suspend through the menu and then resume, the lock-screen works as expected.
Maybe resolved, but in locked mode (login dialog) i see only black background
It can't get a color property using my configuration for xfdesktop-4.12.4
My config:
<property name="workspace0" type="empty"><property name="color1" type="array"></property><property name="color2" type="array"></property></property>
I was able to reproduce this on my system, and found the cause to be related to the logind-handle-lid-switch setting for Xfce Power Manager. The above commit adds some detection for this and a button to resolve the configuration error.
I was able to reproduce this on my system, and found the cause to be related
to the logind-handle-lid-switch setting for Xfce Power Manager. The above
commit adds some detection for this and a button to resolve the
configuration error.
Thank you the issue reported is resolved however after resume from suspend, the desktop content is still visible for a second before the lock -screen appears. I will look into it and if needed open a new report.
Thank you the issue reported is resolved however after resume from suspend,
the desktop content is still visible for a second before the lock -screen
appears. I will look into it and if needed open a new report.
This problem still exists. With xscreensaver everything is fine, but unfortunately not with xfce4-screensaver.
Therefore the bug report should be re-opened.
If you need any log files or special tests please let me know!
Thank you the issue reported is resolved however after resume from suspend,
the desktop content is still visible for a second before the lock -screen
appears. I will look into it and if needed open a new report.
This problem still exists. With xscreensaver everything is fine, but
unfortunately not with xfce4-screensaver.
Therefore the bug report should be re-opened.
If you need any log files or special tests please let me know!
I'm reopening this because I can confirm the behavior. Steps to reproduce are the same as comment 1.
This tends to be even worse when you automatically switch monitor layouts on wakeup, as Xfce's display settings can do. There's a random chance the lockscreen will either:
not show up at all, revealing a static image of previous screen contents
show up partially and offset on one monitor while showing the screen contents of another
show up fully on one monitor while showing the screen contents of another
show up fully on one monitor while blanking the others (intended use case)
Not only does this reveal possibly private information, it also confuses the user. I can see my normal windows, when I type in my password now, will it go to the screensaver or a chat window? I rather kill the xfce4-screensaver process than risking it.
Experiencing the same issue as from the described scenario in comment 1 as well.
I'm using:
a fresh install of xfce4 spin of Fedora 30 on a ThinkPad x220
xfce4-screensaver 0.1.4
patched version of xflock4 that contains: "xfce4-screensaver-command --lock" \
I've also uninstalled the default locker, xscreensaver
Please let me know if I can be of anymore assistance
I just got pointed to disable fading in xscreensaver. This solves the similar problem there. Maybe this is something to help with xfce4-screensaver as well?
If you run xfce4-screensaver --debug, then close your laptop lid, you should see the following message:
Handling Logind PrepareForSleep
If this message is not seen, xfce4-power-manager is not configured to listen for lid events and there should be a blue info bar in the Screensaver preferences that says:
Xfce Power Manager is not configured to handle laptop lid events
This has a resolve button that should correct the setting by setting:
/xfce4-power-manager/logind-handle-lid-switch
Looking at the timestamps in debug output it seems to me that systemd is simply suspending too fast for xfce4-screensaver to activate the lock screen. Indeed according to debug messages handling of PrepareForSleep happens only after resume:
src/xfce4-screensaver --debug --no-daemon
[gs_debug_init] gs-debug.c:115 (02:22:43.147): Debugging enabled
[main] xfce4-screensaver.c:97 (02:22:43.147): Initializing xfce4-screensaver 0.1.8
[init_session_id] gs-listener-dbus.c:2039 (02:22:43.153): Got session-id: /org/freedesktop/login1/session/_34
[gs_listener_x11_set_timeouts] gs-listener-x11.c:312 (02:22:43.153): Saver timeout updated to 300 seconds
[gs_listener_x11_set_timeouts] gs-listener-x11.c:318 (02:22:43.153): Lock timeout updated to 60 seconds
[gs_listener_x11_acquire] gs-listener-x11.c:288 (02:22:43.154): ScreenSaver Registered
<Lid close><System asleep for about 7 seconds><Lid open><Desktop visible for about 1 second>
[listener_dbus_handle_system_message] gs-listener-dbus.c:1361 (02:22:52.025): Handling Logind PrepareForSleep
[listener_dbus_handle_system_message] gs-listener-dbus.c:1367 (02:22:52.025): Logind requested session lock
[gs_grab_grab_root] gs-grab-x11.c:347 (02:22:52.025): Grabbing the root window
<Lock screen is activated>
Adding a sleep delay inhibitor lock[1] makes the problem go away since it gives xfce4-screensaver time to activate the lock screen before allowing systemd to continue suspending the system:
The attached patch is tested with systemd 243rc2 and xfce4-screensaver git HEAD (github mirror) and 0.1.8 release. A quick read of ConsoleKit docs suggests they have a similar interface for the same reason so that it should work with CK as well.
Sorry, somehow managed to attach above path to the wrong report (maybe relevant here as well though). https://bugzilla.xfce.org/show_bug.cgi?id=15929 (on 'suspend' : locking only occurs after resume, desktop is visible (with workaround)) is what I'm actually trying to fix. Attach again in this other bug?
Issues with blanking/dialog handling with multiple monitors and/or changing monitor layouts after plug/unplug, suspend, etc. seem to be common in xfce4-screensaver. Also see bug 15763, bug 15925, bug 16090. I think it's best to keep them all collected in this bug report to avoid duplicates.
From personal experience and what I've seen others complain about, these problems exist:
Screensaver won't show up at all, revealing static image of previous screen contents
Screensaver shows up, but with a delay, briefly revealing screen contents
Screensaver shows up partially and/or offset on one monitor, while showing the screen contents of other monitors
Screensaver shows up on only one monitor, without capturing the mouse, leaving other monitors to be partially interacted with! (bug 15763)
Password dialog won't show up (but actually exists and has keyboard focus)
Password dialog shows up but is frozen (but has keyboard focus)
Password dialog shows up properly, and stays visible while a monitor is (un)plugged, but will not show up again after being allowed to time out and brought up again
All of these problems appear related to monitor events. A single-monitor or multi-monitor setup that doesn't change its monitor layout appears unaffected. However the layout can change by (un)plugging monitors, opening/closing the laptop lid or suspending/hibernating the machine. Thus they can be frequent events, leading xfce4-screensaver to frequently fail (hence the number of related bug reports).
Apart from being a nuisance, these issues have serious security implications. A screenlocker that doesn't lock the screen or a password dialog that is invisible and entices users to blindly type their password in (not knowing if the dialog or a chat window underneath receives it) is bad. I would even suggest to elevate this bug report's severity setting.
Please, someone have a look at this. I want to like and use this screensaver, but this bug is a showstopper.