You are not logged in.

#1 2021-12-10 08:32:25

pepper
Member
Registered: 2017-12-09
Posts: 116

[SOLVED] xfce locks the screen while watching videos on firefox

Hello, I've an updated arch linux machine, I use xfce as d.e. and everytime I watch a video (ie with youtube) on firefox (so mouse and keyboard are not used) the screen locks after 2-3 min (as configured in power manger). It seems firefox is not well recognized as "activity", if I use chrome this problem doesn't happen. I don't want to change firefox browser and I need to keep the automatic screen locking feature active.
How could I solve the problem?

Last edited by pepper (2021-12-14 14:40:09)

Offline

#2 2021-12-10 09:00:51

seth
Member
Registered: 2012-09-03
Posts: 49,992

Offline

#3 2021-12-10 17:26:42

TheSgtBilko
Member
Registered: 2013-08-13
Posts: 87

Re: [SOLVED] xfce locks the screen while watching videos on firefox

You could try xfce4-power-manager panel plugin and enable "Presentation mode" when watching firefox content.

https://docs.xfce.org/xfce/xfce4-power- … nel-plugin

Last edited by TheSgtBilko (2021-12-10 17:27:23)

Offline

#4 2021-12-10 23:08:35

pepper
Member
Registered: 2017-12-09
Posts: 116

Re: [SOLVED] xfce locks the screen while watching videos on firefox

The only way to fix it seems to use caffeine..

Offline

#5 2021-12-12 13:20:55

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: [SOLVED] xfce locks the screen while watching videos on firefox

I am experiencing the same issue in Xfce, I recently updated and ever since then watching videos in Firefox does not inhibit the display power settings as it used to. I think it might be a bug in Firefox or Xfce, does anyone know anything about this?

@pepper In my opinion you should not mark this thread as "SOLVED" because the issue is real and a proper solution has not been found.

Offline

#6 2021-12-12 13:57:11

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: [SOLVED] xfce locks the screen while watching videos on firefox

Are you sure about "recently updated and ever since" because this is an ongoing issue since years…
Does the xfce screensaver support the fdo protocol?

dbus-send --${BUS} --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | sed '/string/!d; s/^\s*string //g'

Offline

#7 2021-12-12 15:53:02

pepper
Member
Registered: 2017-12-09
Posts: 116

Re: [SOLVED] xfce locks the screen while watching videos on firefox

seth wrote:

Are you sure about "recently updated and ever since" because this is an ongoing issue since years…
Does the xfce screensaver support the fdo protocol?

dbus-send --${BUS} --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | sed '/string/!d; s/^\s*string //g'

I tried the command but it returns:

Usage: dbus-send [--help] [--system | --session | --bus=ADDRESS | --peer=ADDRESS] [--dest=NAME] [--type=TYPE] [--print-reply[=literal]] [--reply-timeout=MSEC] <destination object path> <message name> [contents ...]

I suppose the problem is the $BUS variable that is empty when I print it in the terminal

I don't know if it can help, but the previous command without "--${BUS}" returns:

"org.freedesktop.DBus"
"org.freedesktop.PowerManagement"
":1.7"
"org.freedesktop.Notifications"
":1.129"
"org.keepassxc.KeePassXC.MainWindow"
"org.freedesktop.network-manager-applet"
":1.8"
"org.freedesktop.portal.Desktop"
":1.9"
"org.freedesktop.systemd1"
"org.xfce.Terminal5"
"org.xfce.Xfconf"
"org.gtk.vfs.Daemon"
"org.pulseaudio.Server"
"org.freedesktop.impl.portal.desktop.gtk"
"org.xfce.Panel"
":1.192"
":1.84"
":1.62"
":1.63"
"org.gtk.vfs.UDisks2VolumeMonitor"
":1.41"
"org.a11y.Bus"
":1.64"
":1.42"
"org.xfce.ScreenSaver"
":1.20"
":1.65"
":1.43"
":1.21"
"org.gnome.keyring"
":1.66"
":1.44"
":1.22"
"org.mpris.MediaPlayer2.spotify"
":1.67"
":1.45"
":1.23"
":1.68"
":1.46"
":1.24"
":1.69"
":1.47"
"org.xfce.xfdesktop"
":1.25"
":1.48"
":1.26"
":1.49"
"org.xfce.PowerManager"
":1.136"
"org.xfce.FileManager"
":1.28"
":1.137"
"org.freedesktop.portal.Documents"
":1.29"
"ca.desrt.dconf"
":1.215"
":1.117"
"net.launchpad.plank"
"org.gtk.vfs.mountpoint_1279"
"org.ayatana.bamf"
"org.freedesktop.FileManager1"
"org.PulseAudio1"
"org.gtk.vfs.mountpoint_http"
"org.xfce.SessionManager"
"com.canonical.Unity"
":1.70"
":1.71"
"org.mozilla.firefox.ZGVmYXVsdC1yZWxlYXNl"
"org.freedesktop.impl.portal.desktop.gnome"
":1.50"
"org.xfce.Thunar"
":1.51"
"org.gtk.vfs.Metadata"
":1.74"
":1.52"
":1.75"
":1.53"
":1.76"
"org.freedesktop.impl.portal.PermissionStore"
":1.54"
":1.10"
":1.32"
":1.55"
":1.11"
":1.33"
"org.kde.StatusNotifierWatcher"
":1.12"
":1.34"
":1.57"
":1.0"
":1.58"
":1.14"
":1.36"
":1.101"
"org.freedesktop.secrets"
":1.37"
":1.15"
"org.xfce.SettingsDaemon"
":1.102"
":1.38"
":1.16"
":1.39"
":1.4"
":1.17"
":1.5"
":1.18"
":1.6"
":1.19"

Last edited by pepper (2021-12-12 15:55:16)

Offline

#8 2021-12-12 16:16:19

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: [SOLVED] xfce locks the screen while watching videos on firefox

Ah, copy-and-fail out of a local dbus script.

dbus-send --session --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | sed '/string/!d; s/^\s*string //g'

but you provided that and while there's

"org.freedesktop.PowerManagement"
"org.xfce.ScreenSaver"
"org.xfce.PowerManager"

there's no "org.freedesktop.ScreenSaver"

There's this 2 year old bug https://gitlab.xfce.org/xfce/xfce4-powe … /issues/65 but I can't see how wrt post #5 and the bug in the other, 5 year old thread, this can have ever worked.

dbus-send --session --print-reply --dest=org.xfce.ScreenSaver /org/xfce/ScreenSaver org.freedesktop.DBus.Introspectable.Introspect
seth wrote:

Offline

#9 2021-12-12 16:32:57

pepper
Member
Registered: 2017-12-09
Posts: 116

Re: [SOLVED] xfce locks the screen while watching videos on firefox

dbus-send --session --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | sed '/string/!d; s/^\s*string //g'
"org.freedesktop.DBus"
"org.freedesktop.PowerManagement"
":1.7"
"org.freedesktop.Notifications"
":1.129"
"org.keepassxc.KeePassXC.MainWindow"
"org.freedesktop.network-manager-applet"
":1.8"
"org.freedesktop.portal.Desktop"
":1.9"
"org.freedesktop.thumbnails.Manager1"
"org.freedesktop.systemd1"
"org.xfce.Terminal5"
"org.xfce.Xfconf"
"org.gtk.vfs.Daemon"
"org.pulseaudio.Server"
"org.freedesktop.thumbnails.Cache1"
"org.freedesktop.impl.portal.desktop.gtk"
"org.xfce.Panel"
":1.192"
":1.84"
":1.62"
":1.63"
"org.gtk.vfs.UDisks2VolumeMonitor"
":1.41"
"org.a11y.Bus"
":1.64"
":1.42"
"org.xfce.ScreenSaver"
":1.20"
":1.65"
":1.43"
":1.21"
"org.freedesktop.thumbnails.Thumbnailer1"
"org.gnome.keyring"
":1.66"
":1.44"
":1.22"
":1.67"
":1.45"
":1.23"
":1.68"
":1.46"
":1.24"
":1.69"
":1.47"
"org.xfce.xfdesktop"
":1.25"
":1.48"
":1.26"
"org.xfce.PowerManager"
"org.xfce.FileManager"
":1.28"
"org.freedesktop.portal.Documents"
":1.29"
"ca.desrt.dconf"
":1.117"
"net.launchpad.plank"
"org.gtk.vfs.mountpoint_1279"
"org.ayatana.bamf"
"org.freedesktop.FileManager1"
"org.PulseAudio1"
"org.gtk.vfs.mountpoint_http"
"org.xfce.SessionManager"
"com.canonical.Unity"
":1.70"
":1.71"
"org.mozilla.firefox.ZGVmYXVsdC1yZWxlYXNl"
"org.freedesktop.impl.portal.desktop.gnome"
":1.50"
"org.xfce.Thunar"
":1.51"
"org.gtk.vfs.Metadata"
":1.74"
":1.52"
":1.75"
":1.53"
":1.76"
"org.freedesktop.impl.portal.PermissionStore"
":1.54"
":1.10"
":1.32"
":1.11"
":1.33"
"org.kde.StatusNotifierWatcher"
":1.12"
":1.34"
":1.57"
":1.0"
":1.221"
":1.58"
":1.14"
":1.36"
":1.222"
":1.101"
"org.freedesktop.secrets"
":1.37"
":1.15"
"org.xfce.SettingsDaemon"
":1.102"
":1.38"
":1.16"
":1.39"
":1.4"
":1.17"
":1.225"
":1.5"
":1.18"
":1.6"
":1.19"

and

dbus-send --session --print-reply --dest=org.xfce.ScreenSaver /org/xfce/ScreenSaver org.freedesktop.DBus.Introspectable.Introspect
method return time=1639326424.482649 sender=:1.12 -> destination=:1.224 serial=141 reply_serial=2
   string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <interface name="org.freedesktop.DBus.Introspectable">
    <method name="Introspect">
      <arg name="data" direction="out" type="s"/>
    </method>
  </interface>
  <interface name="org.xfce.ScreenSaver">
    <method name="Lock">
    </method>
    <method name="Cycle">
    </method>
    <method name="SimulateUserActivity">
    </method>
    <method name="Inhibit">
      <arg name="application_name" direction="in" type="s"/>
      <arg name="reason" direction="in" type="s"/>
      <arg name="cookie" direction="out" type="u"/>
    </method>
    <method name="UnInhibit">
      <arg name="cookie" direction="in" type="u"/>
    </method>
    <method name="GetInhibitors">
      <arg name="list" direction="out" type="as"/>
    </method>
    <method name="Throttle">
      <arg name="application_name" direction="in" type="s"/>
      <arg name="reason" direction="in" type="s"/>
      <arg name="cookie" direction="out" type="u"/>
    </method>
    <method name="UnThrottle">
      <arg name="cookie" direction="in" type="u"/>
    </method>
    <method name="GetActive">
      <arg name="value" direction="out" type="b"/>
    </method>
    <method name="GetActiveTime">
      <arg name="seconds" direction="out" type="u"/>
    </method>
    <method name="SetActive">
      <arg name="value" direction="in" type="b"/>
    </method>
    <method name="ShowMessage">
      <arg name="summary" direction="in" type="s"/>
      <arg name="body" direction="in" type="s"/>
      <arg name="icon" direction="in" type="s"/>
    </method>
    <signal name="ActiveChanged">
      <arg name="new_value" type="b"/>
    </signal>
  </interface>
</node>
"

If I want to use another locker, should I disable the current one in some way in order to do a clean work (avoiding some sort of incompatibilities)?

Offline

#10 2021-12-12 16:59:21

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: [SOLVED] xfce locks the screen while watching videos on firefox

So org.xfce.ScreenSaver actually supports https://people.freedesktop.org/~hadess/ … /re01.html it just doesn't register the proper service… what's kinda odd because https://gitlab.xfce.org/xfce/xfce4-sess … eensaver.c suggests that it actually prefers the fdo service…

What if you kill xfce4-screensaver and restart it?
In doubt, look at /usr/share/dbus-1/services - copy the org.xfce.screensaver file to org.freedesktop.ScreenSaver and alter the content ("Name") accordingly.

Offline

#11 2021-12-14 14:39:11

pepper
Member
Registered: 2017-12-09
Posts: 116

Re: [SOLVED] xfce locks the screen while watching videos on firefox

it seems solved after the latest update, I can flag the topic as solved for the moment.

Last edited by pepper (2021-12-14 14:39:56)

Offline

#12 2021-12-30 03:55:29

uka
Member
Registered: 2011-10-25
Posts: 19

Re: [SOLVED] xfce locks the screen while watching videos on firefox

Reporting the same issue! Web video playing was working fine with Firefox and XFCE, but around end of November 2021 perhaps, it stopped working.  No related change on settings was done by me, but packages are always updated almost twice daily.

Curiously enough, the tray applet shows Firefox as inhibiting with the message "firefox is currently inhibiting power management" when playing videos, however, Firefox doesn't show when running:

 systemd-inhibit --list 

Weird thing is that mpv video player, doesn't show there when playing videos, but the screen doesn't get locked with that.  I resorted to manually use 'Presentation mode' in the power management tray applet like a caveman hehe, but this should be automatic as it was.  I can't pinpoint the exact moment or package update that triggered this issue, will try to dig into that, could be either xfce, xorg, firefox...

As for the listing requested in a previous comment, these are the relevant strings, sorted:

"ca.desrt.dconf"
"org.a11y.Bus"
"org.blueman.Applet"
"org.blueman.Tray"
"org.bluez.obex"
"org.freedesktop.DBus"
"org.freedesktop.FileManager1"
"org.freedesktop.IBus"
"org.freedesktop.IBus.Panel.Extension.Gtk3"
"org.freedesktop.network-manager-applet"
"org.freedesktop.Notifications"
"org.freedesktop.portal.IBus"
"org.freedesktop.PowerManagement"
"org.freedesktop.secrets"
"org.freedesktop.systemd1"
"org.gnome.keyring"
"org.gtk.vfs.Daemon"
"org.gtk.vfs.Metadata"
"org.gtk.vfs.mountpoint_4706"
"org.gtk.vfs.mountpoint_4712"
"org.gtk.vfs.mountpoint_4720"
"org.gtk.vfs.mountpoint_dnssd"
"org.gtk.vfs.mountpoint_http"
"org.gtk.vfs.MTPVolumeMonitor"
"org.gtk.vfs.UDisks2VolumeMonitor"
"org.kde.StatusNotifierWatcher"
"org.mozilla.firefox.ZGVmYXVsdC0xNDgxNjcwMTM1NzUy"
"org.mpris.MediaPlayer2.firefox.instance1173"
"org.PulseAudio1"
"org.pulseaudio.Server"
"org.xfce.FileManager"
"org.xfce.Panel"
"org.xfce.PowerManager"
"org.xfce.SessionManager"
"org.xfce.SettingsDaemon"
"org.xfce.Terminal5"
"org.xfce.Thunar"
"org.xfce.Xfconf"
"org.xfce.xfdesktop"

Offline

#13 2021-12-30 21:31:04

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: [SOLVED] xfce locks the screen while watching videos on firefox

seth wrote:

Are you sure about "recently updated and ever since" because this is an ongoing issue since years…

Yes, I am 100% sure, I watch hour long videos in Firefox without ever having to interact with the system. This was broken quite recently and ever since then I had to move my mouse every 5 minutes because the screen turns off due to power saving settings that I have set long ago when I first installed Arch.

I also use MPV to play local video files and it is correctly inhibiting power savings and the screen doesn't turn off when watching a video.

Looks like uka is experiencing the same and the time frame matches as well, I did not make any changes to the settings.

P.S Sorry about the late response, looks like I forgot to subscribe to the topic when posting my last reply.

Offline

#14 2022-01-13 09:42:43

bryteise
Member
Registered: 2022-01-13
Posts: 1

Re: [SOLVED] xfce locks the screen while watching videos on firefox

I got hit with this running upower though I was really setting things through xset dpms. Similar timeframe as TheDcoder and uka. I worked around the issue switching off upower and setting up xscreensaver to handle display power management.

Offline

#15 2022-01-13 11:47:10

toz
Member
Registered: 2011-10-28
Posts: 494

Re: [SOLVED] xfce locks the screen while watching videos on firefox

There is a merge request being worked on upstream to address this issue in xfce4-power-manager.

Online

#16 2022-01-13 11:51:45

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: [SOLVED] xfce locks the screen while watching videos on firefox

toz wrote:

There is a merge request being worked on upstream to address this issue in xfce4-power-manager.

Awesome, this man managed to fix issues in both Firefox and Xfce! I hope they merge the fix soon smile

Offline

#17 2022-07-30 17:57:52

uka
Member
Registered: 2011-10-25
Posts: 19

Re: [SOLVED] xfce locks the screen while watching videos on firefox

Just pinging the thread, seems the problem is still going on in a recently fully updated system.  I still use "Presentation mode" in XFCE's power manager tray app to watch long YouTube videos. Everybody else have the issue still?

Offline

#18 2022-07-31 06:04:52

cleanrock
Member
Registered: 2008-11-17
Posts: 109

Re: [SOLVED] xfce locks the screen while watching videos on firefox

Problem still exist. I use Caffeine as a workaround.

Offline

#19 2022-07-31 10:41:56

toz
Member
Registered: 2011-10-28
Posts: 494

Re: [SOLVED] xfce locks the screen while watching videos on firefox

The new version, containing the patch, hasn't been released yet. You can try xfce4-power-manager-git from the AUR to get the latest development build.

Online

#20 2022-07-31 13:47:14

DaveOB
Member
Registered: 2022-07-31
Posts: 1

Re: [SOLVED] xfce locks the screen while watching videos on firefox

I had this problem in Fedora but solved it by building power-manager from source. I think a similar solution can be used on any distro though. I left the Fedora specific commands below as I don't have an easy way of testing the Arch specific commands. (Honestly, I would try the AUR build first but here's another option in case anyone else stumbles upon this thread.)

cd ~
git clone https://gitlab.xfce.org/xfce/xfce4-power-manager.git
cd xfce4-power-manager/
./autogen.sh  --prefix=/usr #Generated list or errors of missing packages. Eventually got to this list:
sudo yum install xfce4-dev-tools libtool libXt-devel gtk3 gtk3-devel xfconf-devel libxfce4ui-devel libnotify-devel upower-devel -y
./autogen.sh --prefix=/usr  #Default uses /usr/local, fedora uses /usr so update prefix to use fedora path.
sudo make
sudo make install

# Exclude xfce4-power-manager from yum/dnf updates:
echo 'exclude=xfce4-power-manager' >> /etc/dnf/dnf.conf

When I first did this, I was getting an message about "authentication is needed to run [...]xfpm-power-backlight-helper' as the super user". I then reinstalled using the procedure above but needed to updated the path in the back-light helper in /usr/share/polkit-1/actions/org.xfce.power.policy. I think if you pass in --prefix to the ./autogen.sh the first time you won't have this problem.

Offline

#21 2022-08-01 04:09:45

uka
Member
Registered: 2011-10-25
Posts: 19

Re: [SOLVED] xfce locks the screen while watching videos on firefox

Thanks @DaveOB and @toz, indeed by building and installing xfce4-power-manager-git from AUR, I got rid of the problem, been watching YouTube for a while now, no DPMS has been triggered.  So, now we wait for the formal Xfce release.

Offline

Board footer

Powered by FluxBB