You are not logged in.
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
https://bbs.archlinux.org/viewtopic.php?id=233104 …
Try a different locker, eg. https://wiki.archlinux.org/title/Session_lock#xss-lock
Offline
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
The only way to fix it seems to use caffeine..
Offline
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
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
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
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
Try a different locker, eg. https://wiki.archlinux.org/title/Session_lock#xss-lock
Offline
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
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
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
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
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
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
There is a merge request being worked on upstream to address this issue in xfce4-power-manager.
Offline
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
Offline
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
Problem still exist. I use Caffeine as a workaround.
Offline
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.
Offline
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
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
here's a simple python3 script that I run in the background. It uses dbus to see if firefox/vlc are playing a video, and if so it will tell dbus to inhibit power management (auto activate "presentation mode").
It works for me for both VLC and firefox, neither of which will inhibit on their own. In this example it iterates on a 5 second interval, which is probably excessive. it just needs to be less than your screen timeout.
#!/usr/bin/env python3
import subprocess
import threading
from pydbus import SessionBus, SystemBus
import sys
bus = SessionBus()
db = bus.get(".DBus")
pm_inhibit = bus.get(".PowerManagement", "Inhibit")
vn = "org.mpris.MediaPlayer2"
vp = "/" + vn.replace(".", "/")
inhid = None
def interval():
list=[i for i in db.ListNames() if i.startswith(vn)]
global inhid
playing=None
for n in list:
vlc=None
try:
vlc = bus.get(n,vp)
except:
continue
print(n, vlc.PlaybackStatus, vlc.CanPlay, pm_inhibit.GetInhibitors())
if vlc.PlaybackStatus == 'Playing':
playing=n
break
if playing and not inhid:
inhid = pm_inhibit.Inhibit(playing, "just because")
elif not playing and inhid:
pm_inhibit.UnInhibit(inhid)
inhid=None
t = threading.Timer(5, interval)
t.start()
interval()
Offline