xdg-desktop-portal-gtk
xdg-desktop-portal-gtk copied to clipboard
Blocking ScreenSaver doesn't work. Spam in logs
Hi, I noticed the portal spams the following message in logs :
Backend call failed: Cannot invoke method; proxy is for the well-known name org.freedesktop.ScreenSaver without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag
I tried to investigate with dbus-monitor. It seems linked to a "Disabling ScreenSaver when an action is performed" case. I can reproduce it just by pressing play on a YouTube video. It seems it's trying to prevent ScreenSaver to happen while watching the video, but fail to do so.
Did I miss some dependency or something ?
SystemInfo: OS: Arch Linux Kernel: 6.7.9-zen1-1-zen WM: sway 1:1.9-1
local/xdg-desktop-portal 1.18.2-1 local/xdg-desktop-portal-gtk 1.15.1-1 local/xdg-desktop-portal-wlr 0.7.0-2
This is the dbus.log of the isolated case:
dbus.log
signal time=1710411777.395876 sender=org.freedesktop.DBus -> destination=:1.104 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.104"
signal time=1710411777.395895 sender=org.freedesktop.DBus -> destination=:1.104 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
string ":1.104"
method call time=1710411780.889222 sender=:1.53 -> destination=org.freedesktop.DBus serial=407 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=StartServiceByName
string "org.freedesktop.portal.Desktop"
uint32 0
method return time=1710411780.889237 sender=org.freedesktop.DBus -> destination=:1.53 serial=4294967295 reply_serial=407
uint32 2
signal time=1710411780.889358 sender=:1.53 -> destination=(null destination) serial=408 path=/org/mpris/MediaPlayer2; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.mpris.MediaPlayer2.Player"
array [
dict entry(
string "PlaybackStatus"
variant string "Playing"
)
]
array [
]
signal time=1710411780.889440 sender=:1.53 -> destination=(null destination) serial=409 path=/org/mpris/MediaPlayer2; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.mpris.MediaPlayer2.Player"
array [
dict entry(
string "Metadata"
variant array [
dict entry(
string "mpris:trackid"
variant object path "/org/mpris/MediaPlayer2/firefox"
)
dict entry(
string "xesam:title"
variant string "DOCTOR Explains Akira Toriyama's Death | Subdural Haematoma Explained"
)
dict entry(
string "xesam:album"
variant string ""
)
dict entry(
string "xesam:artist"
variant array [
string "doc.offcall"
]
)
]
)
]
array [
]
method call time=1710411780.889790 sender=:1.53 -> destination=org.freedesktop.DBus serial=410 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
string "org.freedesktop.portal.Desktop"
method return time=1710411780.889799 sender=org.freedesktop.DBus -> destination=:1.53 serial=4294967295 reply_serial=410
string ":1.13"
method call time=1710411780.890504 sender=:1.53 -> destination=:1.13 serial=411 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.portal.Inhibit; member=Inhibit
string "firefox"
uint32 8
array [
dict entry(
string "reason"
variant string "video-playing"
)
]
method call time=1710411780.890881 sender=:1.13 -> destination=org.freedesktop.DBus serial=742 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
string "type='signal',sender='org.freedesktop.impl.portal.desktop.gtk',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path='/org/freedesktop/portal/desktop/request/1_53/t/2770971525',arg0='org.freedesktop.impl.portal.Request'"
method return time=1710411780.890889 sender=org.freedesktop.DBus -> destination=:1.13 serial=4294967295 reply_serial=742
method call time=1710411780.890891 sender=:1.13 -> destination=org.freedesktop.DBus serial=743 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
string "type='signal',sender='org.freedesktop.impl.portal.desktop.gtk',interface='org.freedesktop.impl.portal.Request',path='/org/freedesktop/portal/desktop/request/1_53/t/2770971525'"
method return time=1710411780.890894 sender=org.freedesktop.DBus -> destination=:1.13 serial=4294967295 reply_serial=743
method call time=1710411780.890896 sender=:1.13 -> destination=org.freedesktop.DBus serial=744 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=StartServiceByName
string "org.freedesktop.impl.portal.desktop.gtk"
uint32 0
method return time=1710411780.890900 sender=org.freedesktop.DBus -> destination=:1.13 serial=4294967295 reply_serial=744
uint32 2
method call time=1710411780.891009 sender=:1.13 -> destination=org.freedesktop.DBus serial=745 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
string "org.freedesktop.impl.portal.desktop.gtk"
method return time=1710411780.891015 sender=org.freedesktop.DBus -> destination=:1.13 serial=4294967295 reply_serial=745
string ":1.23"
method call time=1710411780.891115 sender=:1.13 -> destination=:1.23 serial=746 path=/org/freedesktop/portal/desktop/request/1_53/t/2770971525; interface=org.freedesktop.DBus.Properties; member=GetAll
string "org.freedesktop.impl.portal.Request"
error time=1710411780.891237 sender=:1.23 -> destination=:1.13 error_name=org.freedesktop.DBus.Error.UnknownMethod reply_serial=746
string "Object does not exist at path “/org/freedesktop/portal/desktop/request/1_53/t/2770971525”"
method return time=1710411780.891515 sender=:1.13 -> destination=:1.53 serial=747 reply_serial=411
object path "/org/freedesktop/portal/desktop/request/1_53/t/2770971525"
method call time=1710411780.891522 sender=:1.13 -> destination=:1.20 serial=748 path=/org/freedesktop/impl/portal/PermissionStore; interface=org.freedesktop.impl.portal.PermissionStore; member=Lookup
string "inhibit"
string "inhibit"
error time=1710411780.891709 sender=:1.20 -> destination=:1.13 error_name=org.freedesktop.portal.Error.NotFound reply_serial=748
string "No entry for inhibit"
method call time=1710411780.891872 sender=:1.13 -> destination=:1.23 serial=749 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.impl.portal.Inhibit; member=Inhibit
object path "/org/freedesktop/portal/desktop/request/1_53/t/2770971525"
string ""
string "firefox"
uint32 8
array [
dict entry(
string "reason"
variant string "video-playing"
)
]
method return time=1710411780.892079 sender=:1.23 -> destination=:1.13 serial=220 reply_serial=749
signal time=1710411780.892226 sender=:1.13 -> destination=:1.53 serial=750 path=/org/freedesktop/portal/desktop/request/1_53/t/2770971525; interface=org.freedesktop.portal.Request; member=Response
uint32 0
array [
]
signal time=1710411780.992974 sender=:1.53 -> destination=(null destination) serial=412 path=/org/mpris/MediaPlayer2; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.mpris.MediaPlayer2.Player"
array [
dict entry(
string "Metadata"
variant array [
dict entry(
string "mpris:trackid"
variant object path "/org/mpris/MediaPlayer2/firefox"
)
dict entry(
string "xesam:title"
variant string "DOCTOR Explains Akira Toriyama's Death | Subdural Haematoma Explained"
)
dict entry(
string "xesam:album"
variant string ""
)
dict entry(
string "xesam:artist"
variant array [
string "doc.offcall"
]
)
dict entry(
string "mpris:artUrl"
variant string "file:///home/vince/.mozilla/firefox/firefox-mpris/2507_11.png"
)
]
)
]
array [
]
method call time=1710411781.283432 sender=:1.53 -> destination=org.freedesktop.DBus serial=413 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=StartServiceByName
string "org.freedesktop.portal.Desktop"
uint32 0
method return time=1710411781.283445 sender=org.freedesktop.DBus -> destination=:1.53 serial=4294967295 reply_serial=413
uint32 2
signal time=1710411781.283692 sender=:1.53 -> destination=(null destination) serial=414 path=/org/mpris/MediaPlayer2; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.mpris.MediaPlayer2.Player"
array [
dict entry(
string "PlaybackStatus"
variant string "Paused"
)
]
array [
]
method call time=1710411781.283721 sender=:1.53 -> destination=org.freedesktop.DBus serial=415 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
string "org.freedesktop.portal.Desktop"
method return time=1710411781.283724 sender=org.freedesktop.DBus -> destination=:1.53 serial=4294967295 reply_serial=415
string ":1.13"
method call time=1710411781.283905 sender=:1.53 -> destination=:1.13 serial=416 path=/org/freedesktop/portal/desktop/request/1_53/t/2770971525; interface=org.freedesktop.portal.Request; member=Close
method call time=1710411781.284113 sender=:1.13 -> destination=:1.23 serial=751 path=/org/freedesktop/portal/desktop/request/1_53/t/2770971525; interface=org.freedesktop.impl.portal.Request; member=Close
method return time=1710411781.284286 sender=:1.23 -> destination=:1.13 serial=221 reply_serial=751
method return time=1710411781.284406 sender=:1.13 -> destination=:1.53 serial=752 reply_serial=416
Hello,
I've found the same issue to be true for my installation on Void Linux.
But the difference is that I use X11/Xorg.
SystemInfo: OS: Void Linux Kernel: 6.8.2_1 WM: i3wm WS: xorg-server-21.1.11_1
local/xdg-desktop-portal 1.18.2-1 local/xdg-desktop-portal-gtk 1.15.1-1
Error from $HOME/.xsession-errors:
(xdg-desktop-portal-gtk:2461): xdg-desktop-portal-gtk-WARNING **: 12:25:44.077: Backend call failed: Cannot invoke method; proxy is for the well-known name org.freedesktop.ScreenSaver without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag
@guilty-p01nt3r, maybe change the title to make clear that blocking the screensaver is not working?
This isn't really actionable.
Yes you need a service that handles org.freedesktop.ScreenSaver
. Every desktop should have one, but more custom setups may not.
Although we could probably remove G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START
if you do have one, its just not running.
Seems kinda stupid to have so much indirection in a simple action of inhibition, why call xdp if you can just directly call that fdp dbus handle? that ofc probably just calls systemd inhibit's dbus api or perhaps the wayland one...so much unnecessary complexity, zero added benefit, just breaks things when the 5 or so different apps aren't exactly on the same page.
Seems kinda stupid to have so much indirection in a simple action of inhibition, why call xdp if you can just directly call that fdp dbus handle?
Because you can't. This is required for sandboxed applications.
Same issue on openSUSE Tumbleweed on Xorg + i3 setup. Not your regular "heavy" desktop environment.
I also have the same issue in my Xorg + i3 setup. Screen automatically goes to sleep after about 5-10 minutes and xautolock handles the screen locking so I have no need for any other screensaver service.