Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 696156 - kde-plasma/kscreenlocker conflicts with x11-misc/xscreensaver under Wayland
Summary: kde-plasma/kscreenlocker conflicts with x11-misc/xscreensaver under Wayland
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-04 00:11 UTC by Red
Modified: 2019-10-09 21:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Red 2019-10-04 00:11:28 UTC
When running Plasma Xorg, xscreensaver acts as a screensaver. That is, it overrides the settings in Workspace->Desktop Behavior->Screen Locking, and prevents the screen from locking, showing the screensaver from xscreensaver instead.

When running Plasma Wayland, xscreensaver does not act as a screensaver. That is, while the screensaver will start, the Plasma screen locker settings will take effect anyway, resulting in a locked screen while the screensaver is running.

Reproducible: Always

Steps to Reproduce:
Change settings:

1. Run systemsettings5
2. Go to Desktop Behavior->Workspace->Screen Locking
3. Check "Lock screen automatically after: 10 min"
4. Apply settings and exit
5. Run xscreensaver-demo
6. Set xscreensaver to blank after 5 minutes

Plasma Xorg:

1. After starting Plasma Xorg, start the xscreensaver daemon by running: xscreensaver -nosplash &
2. Wait 5 minutes. xscreensaver will take effect.
3. Wait another 5 minutes. Plasma will not lock the screen.

Plasma Wayland:

1. After starting Plasma Xorg, start the xscreensaver daemon by running: xscreensaver -nosplash &
2. Wait 5 minutes. xscreensaver will take effect.
3. Wait another 5 minutes. Plasma will lock the screen while the screensaver is running.
Actual Results:  
Under Xorg, xscreensaver works as expected, preventing Plasma's Screen Locking settings from taking effect.

Under Wayland, xscreensaver does not work as expected, as Plasma locks the screen while the screensaver is running.

Expected Results:  
Plasma Wayland should not lock the screen when xscreensaver's screensaver is running, which is the behavior with Plasma Xorg.

The computer running Wayland is a Dell Latitude E5450 laptop with Intel HD Graphics 5500.
Comment 1 Jeroen Roovers gentoo-dev 2019-10-04 06:38:21 UTC
driver/xscreensaver.c:612:

  /* Like MacOS, locking under Wayland's embedded X11 server does not work.
     (X11 grabs don't work because the Wayland window manager lives at a
     higher level than the X11 emulation layer.)
   */
  if (!si->locking_disabled_p && getenv ("WAYLAND_DISPLAY"))
    {
      si->locking_disabled_p = True;
      si->nolock_reason = "Cannot lock securely under Wayland";
    }

x11-misc/xscreensaver does not support wayland. Perhaps this can be handled by KDE?
Comment 2 Andreas Sturmlechner gentoo-dev 2019-10-04 06:40:30 UTC
Disable screen locking in Plasma if you want it to be done by xscreensaver.

There is no support for xscreenserver in Plasma whatsoever, so you have to change settings like these on your own if you want to make it work.
Comment 3 Red 2019-10-04 17:44:44 UTC
(In reply to Andreas Sturmlechner from comment #2)
> Disable screen locking in Plasma if you want it to be done by xscreensaver.
> 
> There is no support for xscreenserver in Plasma whatsoever, so you have to
> change settings like these on your own if you want to make it work.

Under Xorg, disabling Plasma screen locking is not necessary because xscreensaver won't let it happen. Not so under Wayland.
Comment 4 Andreas Sturmlechner gentoo-dev 2019-10-05 12:07:42 UTC
You're using two screenlockers. The result is undefined unless you disable one or the other. You don't see a 'bug' in Xorg only by chance.
Comment 5 Red 2019-10-08 12:51:23 UTC
(In reply to Andreas Sturmlechner from comment #4)
> You're using two screenlockers. The result is undefined unless you disable
> one or the other. You don't see a 'bug' in Xorg only by chance.

Is it "chance" that two different computers, with two different brands graphics cards, never locks while xscreensaver is running? I've never had Plasma screenlocking ever happen while Xorg is in use and xscreensaver is running.
Comment 6 Red 2019-10-08 13:04:10 UTC
(In reply to Red from comment #5)
> (In reply to Andreas Sturmlechner from comment #4)
> > You're using two screenlockers. The result is undefined unless you disable
> > one or the other. You don't see a 'bug' in Xorg only by chance.
> 
> Is it "chance" that two different computers, with two different brands
> graphics cards, never locks while xscreensaver is running? I've never had
> Plasma screenlocking ever happen while Xorg is in use and xscreensaver is
> running.


Or perhaps the present behavior I prefer is actually a bug in Xorg, and it's supposed to act the way it does under Wayland?

While xscreensaver is running, I have never had Plasma screenlocking start when using Xorg, ever. It cannot possibly be chance because it has never happened before on either of two computers, with two different brands of graphics cards, I use. Or on a past computer, now broken, that I had Gentoo on. This only happens with Wayland.

Perhaps my original complaint about Wayland the "right" way, while the behavior I always had under Xorg the "bug"? If so, then we need to change the bug. I have marked "unconfirmed" again so you can make the decision. Otherwise change it back to invalid.
Comment 7 Andreas Sturmlechner gentoo-dev 2019-10-08 13:49:35 UTC
(In reply to Red from comment #5)
> Is it "chance" that two different computers, with two different brands
> graphics cards, never locks while xscreensaver is running?
Yes.

In any case this is no Plasma issue as Plasma makes no claim about supporting xscreensaver.
Comment 8 Red 2019-10-08 20:38:24 UTC
(In reply to Andreas Sturmlechner from comment #7)
> (In reply to Red from comment #5)
> > Is it "chance" that two different computers, with two different brands
> > graphics cards, never locks while xscreensaver is running?
> Yes.
> 
> In any case this is no Plasma issue as Plasma makes no claim about
> supporting xscreensaver.

Perhaps I don't understand what you mean by "chance." Are you saying that the choice on whether to lock while xscreensaver is running is completely random? Because I'm saying that has never happened to me...except under Wayland.
Comment 9 Andreas Sturmlechner gentoo-dev 2019-10-09 14:08:27 UTC
Perhaps I don't understand what you don't understand. A sample size of two systems is nothing more than anecdotal evidence. When I was briefly testing xfce-screensaver while running Plasma on Xorg, I was also greeted by a double locked screen. And the simple reason is that systemsettings checkbox for screen locking controls kscreenlocker only. What you're doing is equivalent to setting up an imap and a pop3 fetch job to the same mailbox and wondering why half of each e-mails ends up only in one of both directories. Now, even if you assume that xscreensaver has some magic to detect that Plasma setting and does some magic to inhibit kscreenlocker to do its thing, you have been told that xscreensaver does not support Wayland. So the answer to the bug summary is a simple 'Yes'.
Comment 10 Jeroen Roovers gentoo-dev 2019-10-09 14:26:18 UTC
This is a local configuration issue, then. You fix it locally, not by some distributed logic that does the correct job locally by guessing which screen locker you want to have running.
Comment 11 Red 2019-10-09 20:59:54 UTC
(In reply to Andreas Sturmlechner from comment #9)
> Perhaps I don't understand what you don't understand. A sample size of two
> systems is nothing more than anecdotal evidence. When I was briefly testing
> xfce-screensaver while running Plasma on Xorg, I was also greeted by a
> double locked screen. And the simple reason is that systemsettings checkbox
> for screen locking controls kscreenlocker only. What you're doing is
> equivalent to setting up an imap and a pop3 fetch job to the same mailbox
> and wondering why half of each e-mails ends up only in one of both
> directories. Now, even if you assume that xscreensaver has some magic to
> detect that Plasma setting and does some magic to inhibit kscreenlocker to
> do its thing, you have been told that xscreensaver does not support Wayland.
> So the answer to the bug summary is a simple 'Yes'.

Why didn't you test with xscreensaver (which is what this bug is about)?

Also, if what I said about Wayland is expected behavior, is the Xorg behavior instead the bug?
Comment 12 Andreas Sturmlechner gentoo-dev 2019-10-09 21:10:29 UTC
As I told you it is undefined behaviour, with far too many variables involved for me to start spending my time in reproducing your particular Xorg behaviour, when I already know what you do is unsupported.