Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#997794: xscreensaver: systemd integration leads to spurious deactivations (unblank) on desktop

103 views
Skip to first unread message

Lionel Elie Mamane

unread,
Oct 24, 2021, 10:40:03 AM10/24/21
to
Package: xscreensaver
Version: 5.45+dfsg1-2
Severity: important

I took the habit of running "xscreensaver-command -suspend" when
leaving my desk. However, after ten(s of) seconds, xscreensaver
unblanks and shows the password prompt screen. After timeout, it
blanks again, and after some time, unblanks again, in a never-ending
cycle. This keeps the screens on a cycle of going into sleep and
waking up.

My first guess was that random mouse movements were above
xscreensaver's ignore threshold; however, an "xev" window having the
focus shows no event at all for minutes as long as I don't touch mouse
or keyboard.

Killing the "xscreensaver-systemd" process fixed it. Being an
always-running desktop, it is never suspended, so from reading its man
page, I gather xscreensaver-systemd doesn't do anything useful for
that particular machine.

Let me know what else I can do to help debug the problem.

-- System Information:
Debian Release: 11.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable'), (200, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.14.0-2-amd64 (SMP w/8 CPU threads)
Locale: LANG=fr_LU.UTF-8, LC_CTYPE=fr_LU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages xscreensaver depends on:
ii init-system-helpers 1.60
ii libatk1.0-0 2.36.0-2
ii libc6 2.31-13+deb11u2
ii libcrypt1 1:4.4.18-4
ii libglib2.0-0 2.66.8-1
ii libgtk2.0-0 2.24.33-2
ii libpam0g 1.4.0-9+deb11u1
ii libpango-1.0-0 1.46.2-3
ii libsystemd0 247.3-6
ii libx11-6 2:1.7.2-1
ii libxext6 2:1.3.3-1.1
ii libxi6 2:1.7.10-1
ii libxinerama1 2:1.1.4-2
ii libxml2 2.9.10+dfsg-6.7
ii libxmu6 2:1.1.2-2+b3
ii libxrandr2 2:1.5.1-1
ii libxt6 1:1.2.0-1
ii libxxf86vm1 1:1.1.4-1+b2
ii xscreensaver-data 5.45+dfsg1-2

Versions of packages xscreensaver recommends:
ii gsfonts-x11 0.27
ii libjpeg-turbo-progs 1:2.0.6-4
ii perl 5.32.1-4+deb11u2
ii wamerican [wordlist] 2019.10.06-1
ii wamerican-huge [wordlist] 2019.10.06-1
ii wbritish-huge [wordlist] 2019.10.06-1
ii wcanadian-huge [wordlist] 2019.10.06-1
ii wfrench [wordlist] 1.2.6-1
ii wngerman [wordlist] 20161207-9
ii xfonts-100dpi 1:1.0.4+nmu1.1

Versions of packages xscreensaver suggests:
ii chromium [www-browser] 90.0.4430.212-1
ii firefox-esr [www-browser] 78.15.0esr-1~deb11u1
ii fortune-mod [fortune] 1:1.99.1-7.1
pn gdm3 | kdm-gdmcompat <none>
ii lynx [www-browser] 2.9.0dev.6-3~deb11u1
pn qcam | streamer <none>
ii w3m [www-browser] 0.5.3+git20210102-6
ii xdaliclock 2.44+debian-2
ii xfishtank 2.5-1+b1
pn xscreensaver-data-extra <none>
pn xscreensaver-gl <none>
pn xscreensaver-gl-extra <none>

-- no debconf information

Jamie Zawinski

unread,
Oct 25, 2021, 4:10:03 PM10/25/21
to
First, upgrade to 6.02. Then, run xscreensaver with -log to see what's going on. Probably some other app is trying to disable blanking while locked.

> Killing the "xscreensaver-systemd" process fixed it. Being an
> always-running desktop, it is never suspended, so from reading its man
> page, I gather xscreensaver-systemd doesn't do anything useful for
> that particular machine.

xscreensaver-systemd is also the mechanism by which most movie players and web browsers tell XScreenSaver to not blank the screen while a video is playing.

--
Jamie Zawinski https://www.jwz.org/ https://www.dnalounge.com/

Lionel Élie Mamane

unread,
Oct 26, 2021, 3:40:04 AM10/26/21
to
On Mon, Oct 25, 2021 at 12:51:30PM -0700, Jamie Zawinski wrote:

> First, upgrade to 6.02.

I see it is not yet packaged for Debian; will try to schedule building
it from sources sometime soon.

> xscreensaver-systemd is also the mechanism by which most movie
> players and web browsers tell XScreenSaver to not blank the screen
> while a video is playing.

Ah yes, I see now that is documented in the manpage of version 6.02,
but not in 5.45 which Debian has / I'm running. Thanks for the
pointer; else I probably would ~never have noticed, since I run

xset -dpms; while sleep 30; do xscreensaver-command -deactivate; done

when I run a long video, and

xset +dpms

when I'm finished.

Lionel Élie Mamane

unread,
Nov 7, 2021, 11:50:04 AM11/7/21
to
On Mon, Oct 25, 2021 at 12:51:30PM -0700, Jamie Zawinski wrote:

> First, upgrade to 6.02. Then, run xscreensaver with -log to see
> what's going on. Probably some other app is trying to disable
> blanking while locked.


Version 6.02 compiled directly from sources doesn't immediately turn
off the screens (through DPMS) when using
xscreensaver-command -lock
or
xscreensaver-command -suspend

After a few minutes, the screens turn off.

I couldn't immediately reproduce the behaviour I as complaining about
within a few minutes, also not with 5.45. Previously, I consistently
had the problem for several days / weeks with 5.45. I will make longer
(e.g. overnight) tests. I a particular process, or a particular
webpage left open in Firefox (maybe one with a video running?) was
causing that, then I'll have to just run with -log and wait until the
behaviour crops up again.

I notice, however, that 5.45 is much, much more chatty on its logfile
than 6.02. Compare the attached.
logfile
logfile2

Lionel Élie Mamane

unread,
Nov 7, 2021, 1:40:04 PM11/7/21
to
> I couldn't immediately reproduce the behaviour I as complaining
> about within a few minutes, also not with 5.45. (...) I will make
> longer (e.g. overnight) tests.

I reproduced the issue with 5.45 and more patience, on the scale of
ten minutes. The attached log file is from 5.45 and contains at least
two occurrences, about 10 minutes apart. The screen spontaneously
turns back on, and back off after about 3 minutes, the configured idle
time to DPMS off.

I start a longer test with 6.02. Will keep you updated,
logfile3

Jamie Zawinski

unread,
Nov 7, 2021, 1:50:03 PM11/7/21
to
On Nov 7, 2021, at 10:31 AM, Lionel Élie Mamane <lio...@mamane.lu> wrote:
>
>> I couldn't immediately reproduce the behaviour I as complaining
>> about within a few minutes, also not with 5.45. (...) I will make
>> longer (e.g. overnight) tests.
>
> I reproduced the issue with 5.45 and more patience, on the scale of
> ten minutes. The attached log file is from 5.45 and contains at least
> two occurrences, about 10 minutes apart. The screen spontaneously
> turns back on, and back off after about 3 minutes, the configured idle
> time to DPMS off.

I don't know what "about ten minutes apart" means without you saying actual timestamps, but that log file shows the screen powering on due to user activity:

> xscreensaver: 18:48:06: user is active (keyboard activity)
> ...
> xscreensaver: 19:25:42: user is active (mouse motion)

Lionel Élie Mamane

unread,
Nov 7, 2021, 2:30:03 PM11/7/21
to
I reproduced the issue with 6.02 and more patience, too, but it
doesn't log anything. I locked the screen, and at 20:01 it
spontaneously turned on again, and the XScreenSaver login screen
appeared. At 20:15 I moved the mouse and unlocked (entering my
password), and ran "xscreensaver-command -exit". Here's the full
log file. It doesn't show any of the above described events.
logfile4

Lionel Élie Mamane

unread,
Nov 16, 2021, 3:10:03 AM11/16/21
to
On Sun, Nov 07, 2021 at 10:39:46AM -0800, Jamie Zawinski wrote:
> On Nov 7, 2021, at 10:31 AM, Lionel Élie Mamane <lio...@mamane.lu> wrote:

>> I reproduced the issue with 5.45 and more patience, on the scale of
>> ten minutes. The attached log file is from 5.45 and contains at least
>> two occurrences, about 10 minutes apart. The screen spontaneously
>> turns back on, and back off after about 3 minutes, the configured idle
>> time to DPMS off.

> I don't know what "about ten minutes apart" means without you saying
> actual timestamps, but that log file shows the screen powering on
> due to user activity:

Since 6.02 doesn't log anything useful, I reroproduced with 5.45
again, here's the log extract. At 08:46:41 I launched
xscreensaver-command -suspend
I'm fairly sure the screens turned off, not only went black. A few
minutes later, I walked back into the room, and the screens were
black, but on.

The log shows "user is active (mouse motion)" at 08:50:43, that would
be me moving the mouse to get the a password prompt to unlock and send
thus email. There is nothing in the log between the screen blanking
and that.

xscreensaver: 08:46:41: SUSPEND ClientMessage received.
xscreensaver: 08:46:41: locking.
xscreensaver: 08:46:41: 0: locked mode switching.
xscreensaver: 08:46:41: user is idle (ClientMessage)
xscreensaver: 08:46:41: blanking screen at Tue Nov 16 08:46:41 2021.
xscreensaver: 08:46:41: mouse is on screen 1 of 2
xscreensaver: 08:46:41: 1: grabbing keyboard on 0x55a... GrabSuccess.
xscreensaver: 08:46:41: 1: grabbing mouse on 0x55a... GrabSuccess.
xscreensaver: 08:46:41: not launching hack (throttled.)
xscreensaver: 08:50:43: user is active (mouse motion)
xscreensaver: 08:50:43: pam_start ("xscreensaver", "master", ...) ==> 0 (Success)
xscreensaver: 08:50:43: pam_set_item (p, PAM_TTY, ":0.0") ==> 0 (Success)
xscreensaver: 08:50:43: pam_authenticate (...) ...
xscreensaver: 08:50:43: pam_conversation (ECHO_OFF="Password: ") ...
xscreensaver: 08:50:43: mouse is on screen 1 of 2
xscreensaver: 08:50:43: mouse is on screen 1 of 2
xscreensaver: 08:50:43: 1: mouse is at 1830,1082.
xscreensaver: 08:50:43: 1: creating password dialog ("")
xscreensaver: 08:50:43: mouse is on screen 1 of 2
xscreensaver: 08:50:43: grabbing server...
xscreensaver: 08:50:43: 1: ungrabbing mouse (was 0x55a).
xscreensaver: 08:50:43: 1: grabbing mouse on 0x2a01d2e... GrabSuccess.
xscreensaver: 08:50:43: ungrabbing server.
xscreensaver: 08:50:47: input finished.
xscreensaver: 08:50:47: pam_conversation (...) ==> PAM_SUCCESS
xscreensaver: 08:50:47: pam_authenticate (...) ==> 0 (Success)
xscreensaver: 08:50:47: pam_acct_mgmt (...) ==> 0 (Success)
xscreensaver: 08:50:47: pam_setcred (...) ==> 0 (Success)
xscreensaver: 08:50:47: pam_end (...) ==> 0 (Success)
xscreensaver: 08:50:47: grabbing server...
xscreensaver: 08:50:47: 1: ungrabbing mouse (was 0x2a01d2e).
xscreensaver: 08:50:47: 1: grabbing mouse on 0x55a... GrabSuccess.
xscreensaver: 08:50:47: ungrabbing server.
xscreensaver: 08:50:47: 1: moving mouse back to 1830,1082.
xscreensaver: 08:50:47: discarding MotionNotify event.
xscreensaver: 08:50:47: 1: destroying password dialog.
xscreensaver: 08:50:47: unblanking screen at Tue Nov 16 08:50:47 2021.
xscreensaver: 08:50:47: 1: ungrabbing mouse (was 0x55a).
xscreensaver: 08:50:47: 1: ungrabbing keyboard (was 0x55a).
xscreensaver: 08:50:47: 0: unlocked mode switching.
xscreensaver: 08:50:47: unthrottled.
xscreensaver: 08:50:47: starting de-race timer (10 seconds.)
xscreensaver: 08:50:47: awaiting idleness.
xscreensaver: 08:50:57: de-race completed.

Jamie Zawinski

unread,
Nov 18, 2021, 4:10:05 PM11/18/21
to
I don't understand why you are having trouble logging with 6.02. Did you launch it as xscreensaver -v -log log.txt?

Investigating this in 5.x will not be helpful, because the flow of control is completely different with 6.x's new security model.

Lionel Élie Mamane

unread,
Nov 21, 2021, 2:10:04 PM11/21/21
to
On Thu, Nov 18, 2021 at 01:00:52PM -0800, Jamie Zawinski wrote:
> I don't understand why you are having trouble logging with 6.02. Did
> you launch it as xscreensaver -v -log log.txt?

I was running it without the "-v". Trying again with 6.02

Lionel Élie Mamane

unread,
Dec 12, 2021, 11:10:03 AM12/12/21
to
Here's a log of the screen blanking after unactivity, then
spontaneously unblanking (it was not locked) with 6.02. I was nowhere
near the mouse or the keyboard at that time.

xscreensaver: 16:54:33: checking init file
xscreensaver: 16:54:40: XI RawKeyRelease
xscreensaver: 16:54:44: XI RawButtonPress 5
xscreensaver: 16:54:47: XI RawKeyPress
xscreensaver: 16:55:16: XI RawKeyPress
xscreensaver: 16:55:26: XI RawKeyPress
xscreensaver: 16:58:28: checking init file
xscreensaver: 16:58:28: blanking
xscreensaver: 16:58:28: grabbing keyboard on 0x55a: GrabSuccess
xscreensaver: 16:58:28: grabbing mouse on 0x55a... GrabSuccess
xscreensaver: 16:58:28: pid 1456177: launched xscreensaver-gfx --verbose
xscreensaver-gfx: 16:58:28: selecting RANDR events
xscreensaver-gfx: 16:58:28: screens in use: 2
xscreensaver-gfx: 16:58:28: 0/0: 1440x2560+0+0 (DP-1)
xscreensaver-gfx: 16:58:28: 1/0: 1440x2560+1440+0 (DP-2)
xscreensaver-gfx: 16:58:28: blanking
xscreensaver-gfx: 16:58:28: 0: X says monitor has powered down; not launching a hack
xscreensaver-gfx: 16:58:28: 0: next cycle in 600 sec at 17:08:28
xscreensaver-gfx: 16:58:28: 1: X says monitor has powered down; not launching a hack
xscreensaver-gfx: 16:58:28: 1: offsetting cycle time by 300 sec
xscreensaver-gfx: 16:58:28: 1: next cycle in 900 sec at 17:13:28
xscreensaver: 17:01:47: checking init file
xscreensaver: 17:01:47: unblanking
xscreensaver: 17:01:47: pid 1456177: killing xscreensaver-gfx
xscreensaver: 17:01:47: ungrabbing mouse
xscreensaver: 17:01:47: ungrabbing keyboard
xscreensaver-gfx: 17:01:47: SIGTERM: unblanking
xscreensaver-gfx: 17:01:47: SIGTERM: exiting
xscreensaver: 17:01:47: pid 1456177: xscreensaver-gfx exited with SIGTERM
xscreensaver: 17:02:14: XI RawKeyPress
xscreensaver: 17:02:17: XI RawKeyPress
xscreensaver: 17:02:25: XI RawKeyPress

Jamie Zawinski

unread,
Dec 12, 2021, 3:00:05 PM12/12/21
to
Well, I'm confused about how it got from "blanking" to "unblanking" without printing why active_at changed. Please try logging with -vvv -log to make sure it's printing everything.
0 new messages