You are not logged in.

#1 2023-05-06 21:05:03

triantad
Member
Registered: 2022-01-13
Posts: 11

[Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

A couple of hours ago I did a system update and suddenly gtk apps and firefox started taking about 25 seconds to start. The two services mentioned above seem to be failing.

Pacman log:

[2023-05-06T21:38:02+0300] [PACMAN] Running 'pacman --sync -y -u --'
[2023-05-06T21:38:02+0300] [PACMAN] synchronizing package lists
[2023-05-06T21:38:10+0300] [PACMAN] starting full system upgrade
[2023-05-06T21:38:25+0300] [ALPM] transaction started
[2023-05-06T21:38:25+0300] [ALPM] upgraded adwaita-cursors (43-2 -> 44.0-1)
[2023-05-06T21:38:25+0300] [ALPM] upgraded xz (5.4.2-1 -> 5.4.3-1)
[2023-05-06T21:38:25+0300] [ALPM] upgraded adwaita-icon-theme (43-2 -> 44.0-1)
[2023-05-06T21:38:25+0300] [ALPM] upgraded debian-archive-keyring (2023.2-1 -> 2023.3-1)
[2023-05-06T21:38:25+0300] [ALPM] upgraded gnome-desktop-common (1:43.2-1 -> 1:44.0-1)
[2023-05-06T21:38:25+0300] [ALPM] upgraded gnome-desktop (1:43.2-1 -> 1:44.0-1)
[2023-05-06T21:38:25+0300] [ALPM] upgraded gcr (3.41.1-3 -> 3.41.1-4)
[2023-05-06T21:38:25+0300] [ALPM] upgraded gvfs (1.50.4-1 -> 1.50.4-2)
[2023-05-06T21:38:25+0300] [ALPM] upgraded evince (43.1-2 -> 44.1-1)
[2023-05-06T21:38:25+0300] [ALPM] upgraded file-roller (43.0-1 -> 43.0-2)
[2023-05-06T21:38:25+0300] [ALPM] upgraded gcr-4 (4.0.0-1 -> 4.1.0-1)
[2023-05-06T21:38:25+0300] [ALPM] upgraded gnome-calculator (43.0.1-1 -> 44.0-1)
[2023-05-06T21:38:25+0300] [ALPM] upgraded gnome-desktop-4 (1:43.2-1 -> 1:44.0-1)
[2023-05-06T21:38:25+0300] [ALPM] upgraded libgirepository (1.76.1-2 -> 1.76.1-3)
[2023-05-06T21:38:25+0300] [ALPM] upgraded gobject-introspection-runtime (1.76.1-2 -> 1.76.1-3)
[2023-05-06T21:38:25+0300] [ALPM] upgraded less (1:608-2 -> 1:633-1)
[2023-05-06T21:38:25+0300] [ALPM] upgraded libevdev (1.13.0-1 -> 1.13.1-1)
[2023-05-06T21:38:25+0300] [ALPM] upgraded libmalcontent (0.11.1-1 -> 0.11.1-2)
[2023-05-06T21:38:25+0300] [ALPM] upgraded libnautilus-extension (43.4-1 -> 44.1-2)
[2023-05-06T21:38:25+0300] [ALPM] upgraded libva-utils (2.18.0-1 -> 2.18.1-1)
[2023-05-06T21:38:26+0300] [ALPM] upgraded nautilus (43.4-1 -> 44.1-2)
[2023-05-06T21:38:26+0300] [ALPM] upgraded seahorse (1:43.0-1 -> 1:43.0-2)
[2023-05-06T21:38:26+0300] [ALPM] upgraded xdg-desktop-portal-gnome (43.1-1 -> 44.1-2)
[2023-05-06T21:38:26+0300] [ALPM] transaction completed
[2023-05-06T21:38:26+0300] [ALPM] running '30-systemd-tmpfiles.hook'...
[2023-05-06T21:38:26+0300] [ALPM] running '30-systemd-update.hook'...
[2023-05-06T21:38:26+0300] [ALPM] running '30-update-mime-database.hook'...
[2023-05-06T21:38:26+0300] [ALPM] running 'gio-querymodules.hook'...
[2023-05-06T21:38:26+0300] [ALPM] running 'glib-compile-schemas.hook'...
[2023-05-06T21:38:26+0300] [ALPM] running 'gtk-update-icon-cache.hook'...
[2023-05-06T21:38:26+0300] [ALPM] running 'gvfsd.hook'...
[2023-05-06T21:38:26+0300] [ALPM] running 'update-desktop-database.hook'...

Some output from systemctl:

systemctl --user --type=service
  UNIT                           LOAD   ACTIVE SUB     DESCRIPTION                              
  at-spi-dbus-bus.service        loaded active running Accessibility services bus
  dbus.service                   loaded active running D-Bus User Message Bus
  dconf.service                  loaded active running User preferences database
  flatpak-session-helper.service loaded active running flatpak session helper
  gvfs-daemon.service            loaded active running Virtual filesystem service
  pipewire-pulse.service         loaded active running PipeWire PulseAudio
  pipewire.service               loaded active running PipeWire Multimedia Service
  wireplumber.service            loaded active running Multimedia Service Session Manager
  xdg-desktop-portal-gtk.service loaded active running Portal service (GTK/GNOME implementation)
● xdg-desktop-portal.service     loaded failed failed  Portal service
  xdg-document-portal.service    loaded active running flatpak document portal service
  xdg-permission-store.service   loaded active running sandboxed app permission store

Note that xdg-desktop-portal-gnome does not even appear above, even if I use the --all option

systemctl --user status xdg-desktop-portal-gnome xdg-desktop-portal
○ xdg-desktop-portal-gnome.service - Portal service (GNOME implementation)
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-gnome.service; static)
     Active: inactive (dead)

May 06 22:38:43 dtr-pc systemd[517]: Dependency failed for Portal service (GNOME implementation).
May 06 22:38:43 dtr-pc systemd[517]: xdg-desktop-portal-gnome.service: Job xdg-desktop-portal-gnome.service/start failed with result 'dependency'.
May 06 22:43:23 dtr-pc systemd[517]: Dependency failed for Portal service (GNOME implementation).
May 06 22:43:23 dtr-pc systemd[517]: xdg-desktop-portal-gnome.service: Job xdg-desktop-portal-gnome.service/start failed with result 'dependency'.
May 06 22:48:08 dtr-pc systemd[517]: Dependency failed for Portal service (GNOME implementation).
May 06 22:48:08 dtr-pc systemd[517]: xdg-desktop-portal-gnome.service: Job xdg-desktop-portal-gnome.service/start failed with result 'dependency'.
May 06 23:11:56 dtr-pc systemd[517]: Dependency failed for Portal service (GNOME implementation).
May 06 23:11:56 dtr-pc systemd[517]: xdg-desktop-portal-gnome.service: Job xdg-desktop-portal-gnome.service/start failed with result 'dependency'.

× xdg-desktop-portal.service - Portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: failed (Result: timeout) since Sat 2023-05-06 23:13:26 EEST; 29min ago
    Process: 2612 ExecStart=/usr/lib/xdg-desktop-portal (code=killed, signal=TERM)
   Main PID: 2612 (code=killed, signal=TERM)
        CPU: 20ms

May 06 23:11:56 dtr-pc systemd[517]: Starting Portal service...
May 06 23:12:46 dtr-pc xdg-desktop-por[2612]: Failed to create settings proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gnome: Timeout wa>
May 06 23:13:11 dtr-pc xdg-desktop-por[2612]: Failed to create file chooser proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gnome: Timeou>
May 06 23:13:11 dtr-pc xdg-desktop-por[2612]: No skeleton to export
May 06 23:13:26 dtr-pc systemd[517]: xdg-desktop-portal.service: start operation timed out. Terminating.
May 06 23:13:26 dtr-pc systemd[517]: xdg-desktop-portal.service: Failed with result 'timeout'.
May 06 23:13:26 dtr-pc systemd[517]: Failed to start Portal service.

My .xinitrc file:

#!/bin/sh

userresources=$HOME/.config/X11/.Xresources
usermodmap=$HOME/.config/X11/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

export XDG_SESSION_TYPE=x11
export QT_SCREEN_SCALE_FACTORS=1.25

exec i3

Output of "ps aux | grep dbus":

dbus         476  0.0  0.0   9288  5248 ?        Ss   22:36   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
dtr          573  0.0  0.0   8704  4608 ?        Ss   22:38   0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
dtr         1036  0.0  0.0   8440  4480 ?        S    22:39   0:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 11 --address=unix:path=/run/user/1000/at-spi/bus_0
dtr         2984  0.0  0.0   6580  2560 pts/1    S+   23:50   0:00 grep dbus

Output of "echo $DBUS_SESSION_BUS_ADDRESS":

unix:path=/run/user/1000/bus

Last edited by triantad (2023-05-07 14:38:38)

Offline

#2 2023-05-07 00:48:47

xujiyong
Member
Registered: 2022-02-25
Posts: 2

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

same here.

journalctl log when starting the nautilus:

  May 07 08:36:16 thinkpad nautilus[7159]: Connecting to org.freedesktop.Tracker3.Miner.Files   
  May 07 08:36:16 thinkpad dbus-daemon[1820]: [session uid=1000 pid=1820] Activating via systemd: service name='org.freedesktop.portal.Desktop' unit='xdg-desktop-portal.service' requested by ':1.120' (uid=1000 pid=7159 comm="nautilus -w")
  May 07 08:36:17 thinkpad systemd[1791]: Starting Portal service...   
  May 07 08:36:17 thinkpad dbus-daemon[1820]: [session uid=1000 pid=1820] Activating via systemd: service name='org.freedesktop.impl.portal.desktop.gnome' unit='xdg-desktop-portal-gnome.service' requested by ':1.121' (uid=1000 pid=7179 comm="/usr/lib/xdg-desktop-portal") 
  May 07 08:36:17 thinkpad systemd[1791]: Current graphical user session is inactive.
  May 07 08:36:17 thinkpad systemd[1791]: Dependency failed for Portal service (GNOME implementation).
  May 07 08:36:17 thinkpad systemd[1791]: xdg-desktop-portal-gnome.service: Job xdg-desktop-portal-gnome.service/start failed with result 'dependency'.
  May 07 08:36:42 thinkpad rtkit-daemon[1173]: Supervising 6 threads of 3 processes of 1 users.
  May 07 08:36:42 thinkpad rtkit-daemon[1173]: Supervising 6 threads of 3 processes of 1 users.   
  May 07 08:36:42 thinkpad rtkit-daemon[1173]: Supervising 6 threads of 3 processes of 1 users.   
  May 07 08:37:07 thinkpad xdg-desktop-por[7179]: Failed to create settings proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gnome: Timeout was reached
  May 07 08:37:07 thinkpad dbus-daemon[758]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.176' (uid=1000 pid=7159 comm="nautilus -w")
  May 07 08:37:07 thinkpad dbus-daemon[1820]: [session uid=1000 pid=1820] Activating service name='org.gnome.DiskUtility' requested by ':1.120' (uid=1000 pid=7159 comm="nautilus -w")
  May 07 08:37:07 thinkpad dbus-daemon[1820]: [session uid=1000 pid=1820] Successfully activated service 'org.gnome.DiskUtility'
  May 07 08:37:07 thinkpad systemd[1]: Starting Hostname Service...
  May 07 08:37:07 thinkpad dbus-daemon[758]: [system] Successfully activated service 'org.freedesktop.hostname1'
  May 07 08:37:07 thinkpad systemd[1]: Started Hostname Service.

Offline

#3 2023-05-07 02:09:01

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 451

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

Do you have GTK_USE_PORTAL=1 or GDK_DEBUG=portals set?

Offline

#4 2023-05-07 07:57:16

ppascher
Member
Registered: 2019-05-27
Posts: 6

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

I get a different message after the upgrade but I am also having issues with programs taking a long time to start waiting for some fd poll timeout:

systemd[1595]: Starting Portal service (GNOME implementation)...
xdg-desktop-portal-gnome[87271]: error: Failed to initialize display server connection: Cannot invoke method; proxy is for the well-known name org.gnome.Mutter.ServiceChannel without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag
systemd[1595]: xdg-desktop-portal-gnome.service: Main process exited, code=exited, status=1/FAILURE
systemd[1595]: xdg-desktop-portal-gnome.service: Failed with result 'exit-code'.
systemd[1595]: Failed to start Portal service (GNOME implementation).

Downgrading xdg-desktop-portal-gnome package back to 43 version and the issue is gone. I am using wlroots/sway as my compositor if that matters?

Last edited by ppascher (2023-05-07 08:00:39)

Offline

#5 2023-05-07 08:26:02

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

https://bugzilla.redhat.com/show_bug.cgi?id=2176759
https://gitlab.gnome.org/GNOME/xdg-desk … /issues/74

But that doesn't fit the OPs i3

Even if you want need flatschpak, you don't require a specific portal implementation and as portal-gnome seems somewhat spellbound to mutter, just remove the package and use portal-gtk?

Offline

#6 2023-05-07 09:28:32

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 451

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

If you are using sway, why would you use Gnome's implementation?

https://wiki.archlinux.org/title/XDG_De … interfaces

Offline

#7 2023-05-07 09:46:53

ppascher
Member
Registered: 2019-05-27
Posts: 6

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

icar wrote:

If you are using sway, why would you use Gnome's implementation?

https://wiki.archlinux.org/title/XDG_De … interfaces

I installed it for the file picker and secret service dialog with seahorse which is not provided by xdg-desktop-portal-wlr.

Edit: I uninstalled xdg-desktop-portal-gnome and use xdg-desktop-portal-gtk for the file picker instead which still works fine.
Though this could probably still be an issue for machines where both gnome desktop and some other environment are in use?

Last edited by ppascher (2023-05-07 10:33:16)

Offline

#8 2023-05-07 10:59:03

triantad
Member
Registered: 2022-01-13
Posts: 11

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

icar wrote:

Do you have GTK_USE_PORTAL=1 or GDK_DEBUG=portals set?

No.

seth wrote:

Even if you want need flatschpak, you don't require a specific portal implementation and as portal-gnome seems somewhat spellbound to mutter, just remove the package and use portal-gtk?

You are correct. I was somehow under the impression that it was a dependency for newer GTK apps or something. I removed xdg-desktop-portal-gnome and the issue is gone. Probably installed this when I tried Gnome a while ago. It seems that the sole reason I need a portal at all is that one QT flatpak app I use (Viber) because I could not get the AppImage version to use a scaling factor...

Last edited by triantad (2023-05-07 11:40:31)

Offline

#9 2023-05-07 14:13:50

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

https://aur.archlinux.org/packages/viber

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#10 2023-05-07 14:40:02

triantad
Member
Registered: 2022-01-13
Posts: 11

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

Marking as solved although xujiyong has not replied yet, since there are solutions to be found here.

Offline

#11 2023-05-07 23:31:46

xujiyong
Member
Registered: 2022-02-25
Posts: 2

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

removing xdg-desktop-portal-gnome works for me, thanks.

Offline

#12 2023-05-08 23:52:22

KasTasMykolas
Member
Registered: 2022-10-27
Posts: 4

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

xujiyong wrote:

removing xdg-desktop-portal-gnome works for me, thanks.

Same here. It seems... something broke during last batch of updates.

Offline

#13 2023-05-09 01:00:41

imyxh
Member
Registered: 2018-05-27
Posts: 6

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

Upstream bug for reference: https://gitlab.gnome.org/GNOME/xdg-desk … /issues/74

Also here: https://github.com/flatpak/xdg-desktop-portal/pull/985 which has yet to make it to release.

Last edited by imyxh (2023-05-09 01:10:01)

Offline

#14 2023-05-09 01:08:55

imyxh
Member
Registered: 2018-05-27
Posts: 6

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

For now, we can just

systemctl --user mask xdg-desktop-portal-gnome

that way we don't need to uninstall GNOME entirely.

Offline

#15 2023-05-10 21:56:21

Japhir
Member
Registered: 2015-03-25
Posts: 10

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

This bug made my working computer really frustrating to work with. I had recently tried out the new GNOME DE, but this made nautilus and evince incredibly slow to start up. Switching back to swa and deleting the xdg-desktop-gnome package resolved the issue for me. Thanks for the quick resolve and finding the upstream issues! smile

Offline

#16 2023-05-11 16:40:25

Muncrief
Member
Registered: 2023-05-11
Posts: 1

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

Wow, thanks to everyone here for solving this perplexing problem. I run Arch with XFCE and I have no idea why xdg-desktop-portal-gnome was even installed, but it was indeed the culprit. I was able to completely uninstall it with no apparent system breakage, and afterwards the program delays were gone. 

I'm not sure if it can be uninstalled if you're running the Gnome DE though, but with XFCE it doesn't seem to be a requirement.

Offline

#17 2023-05-14 13:29:12

dalu
Member
Registered: 2014-04-16
Posts: 78

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

For me it's not resolved. Since there's another thread pointing at this thread for being the solution.

I use cinnamon, xdg-desktop-portal-gnome was never installed.
xdg-desktop-portal times out when starting

How can this issue be resolved?

Firefox takes forever to start and probably other programs as well.

You know what, I'll create a new thread.

Last edited by dalu (2023-05-14 13:32:14)

Offline

#18 2023-05-15 01:30:19

felipeflores
Member
Registered: 2023-05-15
Posts: 2

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

Had the same issue, this thread really saved my butt. Thank you!

Offline

#19 2023-05-15 18:18:56

SRG
Member
Registered: 2012-12-09
Posts: 22

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

So glad i found this thread - it made my day.

I've searched for HOURS in the past days about the same kind of symptoms :
- ~20 extra seconds of delay when starting apps like "gnome-calculator" or "evince"
- impossible anymore to launch settings like "gnome-extensions-app"

Only errors i was seeing were DBUS related (timeouts).

(and it's very difficult to find online issues with that kind of symptoms...)

Whereas i'm running an up-to-date ARCH system with gnome-shell ...
Removing the "xdg-desktop-portal-gnome" also corrected the issue for me.

Offline

#20 2023-05-15 19:54:16

nathanb
Member
Registered: 2011-11-28
Posts: 101
Website

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

I use cinnamon, and the above solution worked for me. @dalu, maybe double-check (I never explicitly installed `xdg-desktop-portal-gnome` either).

Offline

#21 2023-05-16 09:38:49

kokurou
Member
Registered: 2023-05-16
Posts: 1

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

Thanks for this thread. I was really worried why most of my applications were starting up so slow, and what was going wrong with xdg-desktop-portal-gnome. It was not happening on Gnome so i thought if there is some issue with i3.

Offline

#22 2023-05-29 20:01:08

Skingrende
Member
Registered: 2020-09-01
Posts: 1

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

Thanks for the thread! I removed the xdg-desktop-portal-gnome package because it is not required anymore as a dependency - everything works again as expected :-)

Offline

#23 2023-05-29 22:28:18

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [Solved] xdg-desktop-portal and xdg-desktop-portal-gnome fail

That's enough "me too" posts. Closing this solved topic.

Offline

Board footer

Powered by FluxBB