! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Screen being locked at random even if device is being used and not idle
Status:
RESOLVED: FIXED
Product:
Xfce4-screensaver
Component:
General

Comments

Description Maurizio Galli 2020-01-01 20:58:49 CET
Steps to reproduce the behavior:

1. Work at the computer for  some time
2. Close laptop lid and let system go in "suspend" mode
3. Resume system
4. Work at the computer for few minutes till screen locker activates at "random" and presents password prompt.
5. Entering the password unlocks successfully


Expected behavior:
Screen never locks while user is actively using the computer.

Actual behavior:
Screen locks after few minutes at random, even if the device is active and being used, seemingly at random

General notes:

Power Manager's Presentation Mode stops this behavior.
Comment 1 Maurizio Galli 2020-01-01 21:11:08 CET
Created attachment 9346 
xfce4-screensaver --debug log
Comment 2 Adam Purkrt 2020-01-05 21:42:56 CET
I am experiencing similar behaviour. In my case

1. Work at the computer
2. Let the computer be idle - the screen will lock
3. Unlock the computer
4. Work again
5. The screen locks again after a short while, even right during mouse move (for example)

Using default setup. git versions of basically everything.
Comment 3 Adam Purkrt 2020-01-11 21:53:31 CET
The problem seems to occur (only) when I have external monitor attached to a laptop. I setup mirroring with "xrandr --output HDMI-1 --same-as eDP-1".

Both the laptop display and the external monitor would switch off after an inactivity period (ok). The external monitor goes to sleep mode. Then, when I move the mouse/press a key, an unlock dialog occurs on the notebook screen. It takes some time for it to also appear on the attached external screen (the external display has to be woken up from the sleep mode). The unlock dialog loses focus the moment the external screen comes to life. It is necessary to press cancel, then (sometimes) Escape key for the unlock dialog to occur again. Unlocking then proceeds normally, but - after a minute or so of normal activity - the screen gets locked at once.

Perhaps this is another bug, but it seems related to me.
Comment 4 haarp 2020-01-15 08:51:04 CET
I can confirm. With a second monitor attached, the screensaver sometimes activates on its own a short while after being unlocked.

Can you check how much time passed after unlocking the screensaver to it locking again? In my case, this seems to be exactly 5 minutes (despite none of the timeouts in xfce4-screensaver's settings being set to 5 minutes).
Comment 5 haarp 2020-01-15 08:58:27 CET
Wait, I just saw that the preferences for the "Blank screen" theme have "After blanking, put display to sleep after" set to 5 minutes. This might be related.
Comment 6 Maurizio Galli 2020-01-15 11:32:46 CET
(In reply to haarp from comment #5)
> Wait, I just saw that the preferences for the "Blank screen" theme have
> "After blanking, put display to sleep after" set to 5 minutes. This might be
> related.

It seems to be 5 minutes for me as well. Only difference is that I experience this on my laptop, without additional monitors attached
Comment 7 haarp 2020-01-15 22:17:40 CET
Indeed, it seems unrelated to whether an external monitor is connected or not.

And I'm fairly sure now that it's the "After blanking, put display to sleep after" setting. However many minutes it's set to, its exactly the time until the "random" blanking occurs.
Comment 8 Sean Davis editbugs 2020-01-16 03:36:55 CET
Created attachment 9385 
Fix for unexpected DPMS activation

Hey everyone, thanks for checking into this. I'm pretty sure it's related to the blank timeout. Can you try the above patch to see if it resolves the issues for you?
Comment 9 Sean Davis editbugs 2020-01-16 03:46:48 CET
*** Bug 16198 has been marked as a duplicate of this bug. ***
Comment 10 haarp 2020-01-22 16:02:31 CET
Thanks, Sean. I haven't witnessed this bug since applying the patch. Testing continues.
Comment 11 Maurizio Galli 2020-01-28 08:05:08 CET
Hi Sean thanks for the fix. I confirm that the issue no longer occurs in master branch
Comment 12 Maurizio Galli 2020-01-28 08:21:18 CET
(In reply to Maurizio Galli from comment #11)
> Hi Sean thanks for the fix. I confirm that the issue no longer occurs in
> master branch

sorry I realised the patch mentioned was not merged into master yet. Anyway I confirm what said above that I'm no longer able to reproduce the bug with the build from current master branch
Comment 13 Maurizio Galli 2020-03-01 06:16:31 CET
(In reply to Maurizio Galli from comment #12)
> (In reply to Maurizio Galli from comment #11)
> > Hi Sean thanks for the fix. I confirm that the issue no longer occurs in
> > master branch
> 
> sorry I realised the patch mentioned was not merged into master yet. Anyway
> I confirm what said above that I'm no longer able to reproduce the bug with
> the build from current master branch

I take it back it still happens. I simply had presentation mode on all this time without noticing.
The patch in comment #8 seems to work though
Comment 14 haarp 2020-03-21 21:46:59 CET
Hmm, I found another cause of "random" locking. When an application requests the screensaver to be inhibited, and then releases that inhibitor, the screensaver instantly activates for me. I don't think it happens under all conditions, but I can very reliably reproduce it currently.
Comment 15 Sean Davis editbugs 2020-03-22 11:40:28 CET
This issue should now be resolved in the latest git master. Please give it a try and let me know what you find.
Comment 16 Maurizio Galli 2020-03-22 16:30:43 CET
(In reply to Sean Davis from comment #15)
> This issue should now be resolved in the latest git master. Please give it a
> try and let me know what you find.

Amazing! seems to work fine now thank you. However and unrelated to this report, there are some other issues with xfpm 1.6.6 as reported here: https://bugzilla.xfce.org/show_bug.cgi?id=16522. With 1.6.5 it's all good though, so I think I can close this report.
Comment 17 haarp 2020-03-22 17:04:51 CET
Ah, I see. https://git.xfce.org/apps/xfce4-screensaver/commit/?id=7e6fe76f548cd3e0ea1363e57f26aa9f3579fcfb fixes the inhibitor bug too. Thanks a lot!
Comment 18 Sean Davis editbugs 2020-03-23 00:56:20 CET
*** Bug 15882 has been marked as a duplicate of this bug. ***

Bug #16327

Reported by:
Maurizio Galli
Reported on: 2020-01-01
Last modified on: 2020-03-23
Duplicates (2):
  • 15882 screensaver activates at wrong time
  • 16198 Screensaver locks 5 minutes after resume

People

Assignee:
Sean Davis
CC List:
6 users

Version

Attachments

xfce4-screensaver --debug log (44.26 KB, text/plain)
2020-01-01 21:11 CET , Maurizio Galli
no flags
Fix for unexpected DPMS activation (602 bytes, patch)
2020-01-16 03:36 CET , Sean Davis
no flags

Additional information