Public bug reported:
/usr/bin/xdg-screensaver checks for various different screensavers with
lines like this:
# Consider "xscreensaver" a separate DE
xscreensaver-command -version 2> /dev/null | grep XScreenSaver > /dev/null &&
DE="xscreensaver"
# Consider "gnome-screensaver" a separate DE
dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus
org.freedesktop.DBus.GetNameOwner string:org.gnome.ScreenSaver > /dev/null 2>&1
&& DE="gnome_screensaver"
However, gnome-shell always owns that org.gnome.ScreenSaver name on the
bus and that cannot be prevented, even if gnome-screensaver is disabled.
What this means is that if you install xscreensaver on a default Ubuntu
installation and then disable gnome-screensaver, xdg-screensaver will
still treat the running screensaver as being gnome-screensaver.
When Firefox plays videos, it regularly calls "xdg-screensaver reset" to
inhibit the screensaver, which is correct behaviour. However, because of
the above bug, this call doesn't actually work because gnome-screensaver
can't be told to stop owning its name on the bus. So what this means in
practice is that on Ubuntu, if you install xscreensaver, then the
screensaver will come on even while videos are playing in Firefox, and
that's not supposed to happen.
Proposed fix: move the xscreensaver check in xdg-screensaver to *after*
the check for gnome-screensaver, so that if xscreensaver is present then
it takes priority. This is likely to be correct because xscreensaver
isn't present by default, so it being installed at all indicates some
desire on the user's part to have it running.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: xdg-utils 1.1.3-2ubuntu1.20.04.2 [modified: usr/bin/xdg-screensaver]
ProcVersionSignature: Ubuntu 5.13.0-48.54~20.04.1-generic 5.13.19
Uname: Linux 5.13.0-48-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu27.24
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Mon Jun 20 07:20:51 2022
InstallationDate: Installed on 2020-06-20 (729 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
PackageArchitecture: all
SourcePackage: xdg-utils
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: xdg-utils (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug focal
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to xdg-utils in Ubuntu.
https://bugs.launchpad.net/bugs/1979175
Title:
Gnome screensaver always overrides xscreensaver in xdg-screensaver
Status in xdg-utils package in Ubuntu:
New
Bug description:
/usr/bin/xdg-screensaver checks for various different screensavers
with lines like this:
# Consider "xscreensaver" a separate DE
xscreensaver-command -version 2> /dev/null | grep XScreenSaver > /dev/null &&
DE="xscreensaver"
# Consider "gnome-screensaver" a separate DE
dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus
org.freedesktop.DBus.GetNameOwner string:org.gnome.ScreenSaver > /dev/null 2>&1
&& DE="gnome_screensaver"
However, gnome-shell always owns that org.gnome.ScreenSaver name on
the bus and that cannot be prevented, even if gnome-screensaver is
disabled. What this means is that if you install xscreensaver on a
default Ubuntu installation and then disable gnome-screensaver, xdg-
screensaver will still treat the running screensaver as being gnome-
screensaver.
When Firefox plays videos, it regularly calls "xdg-screensaver reset"
to inhibit the screensaver, which is correct behaviour. However,
because of the above bug, this call doesn't actually work because
gnome-screensaver can't be told to stop owning its name on the bus. So
what this means in practice is that on Ubuntu, if you install
xscreensaver, then the screensaver will come on even while videos are
playing in Firefox, and that's not supposed to happen.
Proposed fix: move the xscreensaver check in xdg-screensaver to
*after* the check for gnome-screensaver, so that if xscreensaver is
present then it takes priority. This is likely to be correct because
xscreensaver isn't present by default, so it being installed at all
indicates some desire on the user's part to have it running.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: xdg-utils 1.1.3-2ubuntu1.20.04.2 [modified: usr/bin/xdg-screensaver]
ProcVersionSignature: Ubuntu 5.13.0-48.54~20.04.1-generic 5.13.19
Uname: Linux 5.13.0-48-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu27.24
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Mon Jun 20 07:20:51 2022
InstallationDate: Installed on 2020-06-20 (729 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
PackageArchitecture: all
SourcePackage: xdg-utils
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/1979175/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp