Hallo,
* Jamie Zawinski [Tue, Dec 29 2020, 04:48:10PM]:
> > Once logged in, I can see some active process of xscreensaver (this is what 
> > "pidof xscreensaver" tells me).
> >
> > But after some seconds, this process is gone. Why? Don't know.
>
> Dunno. Maybe it's trying to connect and timing out. Run xscreensaver with 
> --log log.txt

I tried, but no such file gets created, even with absolute path.

After RTFM and some time wasted I guess that it should be -log AND NOT
--log. And then, when I use it with relative path, no such file is
created. With absolute path, it is created but then it's created by
lightdm user first and then maybe the user session cannot replace it.
I could trick my way around it by removing the file manually, though.

After some daemon-reload runs, I cannot even start it now whatsoever.
Means: journalctl or "systemctl --user status xscreensaver.service"
show me the last log lines from an hour ago (with the
failed-to-open-DISPLAY issue).

systemctl --user status | grep saver

-> nothing

However without --user:

   CGroup: /
           ├─user.slice
           │ └─user-500.slice
           │   ├─user@500.service
           │   │ ├─app.slice
           │   │ │ ├─pulseaudio.service
           │   │ │ │ └─12150 /usr/bin/pulseaudio --daemonize=no
...
           │   │ └─init.scope
           │   │   ├─2483 /lib/systemd/systemd --user
           │   │   └─2484 (sd-pam)
           │   ├─session-2.scope
           │   │ └─2748 xscreensaver-systemd

...

The PID of xscreensaver-systemd does not fit, it's an old process,
started an hour ago. /proc/2748 confirms it, this belong to the old
lines in "systemctl --user status". But I did close and restart the X
session severtal times now, why is that process not dead?

> Or if you have an old version, -verbose -no-capture -log log.txt

That said, I saw something odd, sometimes xscreensaver was started. That
made me remember something, I think I had a similar problem on this
same system some months ago and it did not work with systemd but I took
a shortcut due to lag of time and so I have put it into the startup file
of the window manager. And it seems like it had worked this way since then.

So my previous statement was not fully correct.

Nevertheless, the systemd way does not work even after I removed the
custom startup call.

> > 2884  0.0  0.0   5716  1064 ?        SN   01:13   0:00 xscreensaver-systemd
> >
> > The manpage of this binary is slightly confusing. That is some kind of
> > helper, fine, but who is supposed to run it? Xsession? Or systemd user
> > session? It mentions "When run from ~/.xsession or equivalent" but there
> > is no information on what is considered "equivalent" here.
>
> It is launched by xscreenasver itself.

Ok. Is this supposed to be gone when user logs out? Does this interfere
with my trying different parameters (-log, --log, etc.) above, are those
cached and therefore ignored after subsequent changes?

Anyway, I killed it now, logged out, logged in, the process is not
coming back, and the picture looks like above (old status log in the
"systemctl --user status" output). Also, xscreensaver process was running
for some seconds and then disappeared. However, this time it created a
log file.

##########################################################################
xscreensaver: 19:08:25: logging to "/tmp/xscreensaver-log.txt" at Wed Dec 30 
19:08:25 2020
##########################################################################

xscreensaver: 19:08:26: running on display ":0.0"
xscreensaver: 19:08:26: vendor is The X.Org Foundation, 12010000.
xscreensaver: 19:08:26: useful extensions:
xscreensaver: 19:08:26:   MIT Screen-Saver (disabled at compile time)
xscreensaver: 19:08:26:   Shared Memory (1.2)
xscreensaver: 19:08:26:   Double-Buffering (1.0)
xscreensaver: 19:08:26:   Power Management (1.2)
xscreensaver: 19:08:26:   GLX
xscreensaver: 19:08:26:   XF86 Video-Mode (2.2)
xscreensaver: 19:08:26:   XC Misc (disabled at compile time)
xscreensaver: 19:08:26:   Xinerama (1.1)
xscreensaver: 19:08:26:   Resize-and-Rotate (1.5)
xscreensaver: 19:08:26:   XInput
xscreensaver: 19:08:26:   libsystemd
xscreensaver: 19:08:26: screen 0 non-colormapped depths: 24.
xscreensaver: 19:08:26: WARNING: RANDR and Xinerama report different
xscreensaver: 19:08:26:          screen layouts!  Believing RANDR.
xscreensaver: 19:08:26: screens in use: 1
xscreensaver: 19:08:26:    3/0: 1920x1080+0+0 (HDMI-1)
xscreensaver: 19:08:26: rejected screens: 4
xscreensaver: 19:08:26:    0/0: 1920x1080+0+0 (DVI-D-1) -- output disabled
xscreensaver: 19:08:26:    1/0: 1920x1080+0+0 (DP-1) -- output disabled
xscreensaver: 19:08:26:    2/0: 1920x1080+0+0 (DP-2) -- output disabled
xscreensaver: 19:08:26:    4/0: 1920x1080+0+0 (HDMI-2) -- output disabled
xscreensaver: 19:08:26: selecting RANDR events
xscreensaver: 19:08:26: not using XInputExtension.
xscreensaver: 19:08:26: consulting /proc/interrupts for keyboard activity.
xscreensaver: 19:08:26: 0: visual 0x21 (TrueColor,   depth: 24, cmap: default)
xscreensaver: 19:08:26: 0: saver window is 0x400001.
xscreensaver: 19:08:26: selecting events on extant windows... done.
xscreensaver: 19:08:26: disabling server builtin screensaver:
xscreensaver: 19:08:26:  (xset s 0 0; xset s blank; xset s expose)
xscreensaver: 19:08:26: 0: spawning "xscreensaver-systemd -verbose" in pid 
14055.
xscreensaver: 19:08:26: awaiting idleness.
xscreensaver-systemd: 19:08:26: connected

xscreensaver: 19:08:40: SIGTERM

This fits to what I get from: journalctl -b0 | grep screensaver

Dez 30 19:08:25 whitestar systemd[13952]: Started XScreenSaver.
Dez 30 19:08:25 whitestar xscreensaver[13979]: xscreensaver: 19:08:25: warning: 
$DISPLAY is not set: defaulting to ":0.0".
Dez 30 19:08:25 whitestar xscreensaver[13979]: xscreensaver: 19:08:25: logging 
to file /tmp/xscreensaver-log.txt
Dez 30 19:08:40 whitestar systemd[13952]: Stopping XScreenSaver...
Dez 30 19:08:40 whitestar systemd[13952]: xscreensaver.service: Succeeded.
Dez 30 19:08:40 whitestar systemd[13952]: Stopped XScreenSaver.

Why is this user service shutdown? Don't know.
What happened with xscreensaver-systemd? Don't know. There is no active
PID 14055 anywhere.

Just guessing, is this maybe some bug of xscreensaver-systemd which
makes it request an early shutdown of xscreensaver?

> > Dez 30 01:13:20 whitestar systemd[2605]: xscreensaver.service: Service has 
> > more than one ExecStart= setting, which is only allowed for Type=oneshot 
> > services. Refusing.
> > Dez 30 01:13:20 whitestar systemd[2605]: xscreensaver.service: Cannot add 
> > dependency job, ignoring: Unit xscreensaver.service has a bad unit file 
> > setting.
>
> Sounds like it doesn't like your edits?

Yes but I am wondering why, i.e. since when ExecStart is conflicting
with ExecStartPre. Anyway, I have undone them and added --log as
mentioned above.

Best regards,
Eduard.

Reply via email to