xdg-desktop-portal-gnome 44 causes delays in non-GNOME desktops

Bug #2013116 reported by Jeremy Bícha
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
xdg-desktop-portal (Ubuntu)
Fix Released
High
Unassigned
Lunar
Won't Fix
Undecided
Unassigned
xdg-desktop-portal-gnome (Ubuntu)
Fix Released
High
Unassigned
Lunar
Won't Fix
Undecided
Unassigned

Bug Description

Test Case
---------

- Install xdg-desktop-portal-gnome 44.beta
- Log out, then log into a non-GNOME desktop like MATE
- Open an app that uses portals, like the Firefox Snap
- From the app, open the Open dialog

What Happens
------------
Nothing for 2 minutes or however long the service timeout takes.
After that initial timeout, the filechooser dialogs open like normal.

Other Info
----------
This is a regression compared to xdg-desktop-portal-gnome 43.
My understanding is that xdg-desktop-portal currently attempts to load the portal backends in alphabetical order. By coincidence, this happens to do what we would expect (gnome, then gtk, kde, lxqt, wlr).
It is expected that systems with multiple desktop environments installed will have multiple portal backends installed. These backends should work in any of the desktops. (For instance, maybe MATE users want to have the GTK 4.10 icon view filechooser for their Flatpak/Snap web browser.)

Upstream
-------
https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/74
https://github.com/flatpak/xdg-desktop-portal/pull/985
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2154665

https://www.bassi.io/articles/2023/05/29/configuring-portals/

Tags: lunar
Jeremy Bícha (jbicha)
Changed in xdg-desktop-portal (Ubuntu):
status: New → Triaged
importance: Undecided → High
description: updated
Changed in xdg-desktop-portal-gnome (Ubuntu):
milestone: none → ubuntu-23.04
Graham Inggs (ginggs)
Changed in xdg-desktop-portal-gnome (Ubuntu Lunar):
status: New → Triaged
milestone: none → lunar-updates
Changed in xdg-desktop-portal (Ubuntu Lunar):
status: New → Triaged
milestone: none → lunar-updates
Changed in xdg-desktop-portal (Ubuntu Mantic):
milestone: none → ubuntu-23.10-beta
Changed in xdg-desktop-portal-gnome (Ubuntu Mantic):
milestone: ubuntu-23.04 → ubuntu-23.10
milestone: ubuntu-23.10 → ubuntu-23.10-beta
Jeremy Bícha (jbicha)
description: updated
Revision history for this message
Jeremy Bícha (jbicha) wrote :

I have tested on Ubuntu 23.10 with xdg-desktop-portal-gnome 44.2 and xdg-desktop-portal 1.16.0-3ubuntu1 and the delay is still about 25 seconds. The delay goes away if xdg-desktop-portal-gnome is not installed.

Revision history for this message
Oleg (in-limbo) wrote :

I run Arch Linux, but not Ubuntu, but maybe this solution will work for you: for xdg-desktop-portal-gnome 44.2, I edited /usr/lib/systemd/user/xdg-desktop-portal-gnome.service and replaced every mention of graphical-session.target with default.target. I also added Environment=XDG_SESSION_TYPE=wayland to the file. After I did that, I stopped experiencing any delays and slowdowns when launching gnome via a tty, instead of gdm.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Presumably the wayland environment variable could be a workaround for any desktop that doesn't use Wayland which is all the official desktop flavors of Ubuntu except for KDE Plasma.

Revision history for this message
Oleg (in-limbo) wrote :

If we are talking specifically about version 44.2 of xdg-desktop-portal-gnome with its xdg-desktop-portal-gnome.service file in its original form, then I only experienced delays in one situation: when I was using dbus-daemon, instead of dbus-broker, for system and user session management. With dbus-broker, all problems went away even when xdg-desktop-portal-gnome.service stayed in its original form.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

I can no longer duplicate this bug with xdg-desktop-portal-gnome 44.2 (currently in Mantic) along with xdg-desktop-portal 1.17.0 (but I can with xdg-desktop-portal 1.16.0-3ubuntu1).

Therefore, I'm packaging xdg-desktop-portal 1.17.0 now for Mantic.

Unfortunately, I'm not comfortable preparing a stable update for Ubuntu 23.04 for this (too much code changes), but Ubuntu 23.10 "Mantic" will be released in October without this bug.

no longer affects: xdg-desktop-portal-gnome (Ubuntu Mantic)
no longer affects: xdg-desktop-portal (Ubuntu Mantic)
Changed in xdg-desktop-portal-gnome (Ubuntu):
status: Triaged → Fix Released
Changed in xdg-desktop-portal (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdg-desktop-portal - 1.17.2-1ubuntu1

---------------
xdg-desktop-portal (1.17.2-1ubuntu1) mantic; urgency=medium

  * Merge from Debian. Remaining changes:
    - Import https://github.com/flatpak/xdg-desktop-portal/pull/705 as a
      distro-patch (add a portal for managing WebExtensions native messaging
      servers, LP: #1968215)
      + debian/patches/webextensions-portal.patch
    - Keep alternative dependency to libgdk-pixbuf2.0-dev for easier backports
      to Ubuntu 20.04 LTS or 18.04 LTS
  * Update webextension portal patch with latest version proposed upstream

xdg-desktop-portal (1.17.2-1) unstable; urgency=medium

  * New upstream release
  * Release to unstable

xdg-desktop-portal (1.17.1-1) experimental; urgency=medium

  * New upstream release
    - d/patches: Drop all patches, applied in new release
  * d/control, d/x-d-p.manpages: Build and install portals.conf(5)
  * d/NEWS: Add a NEWS file to direct users to portals.conf(5)
  * d/p/debian/portal-impl-Hard-code-x-d-p-gtk-as-a-last-resort-fallback.patch:
    Add patch to fall back to x-d-p-gtk if nothing better can be found.
    This is a temporary measure to give desktop environment maintainers
    a chance to add a portals.conf(5) for their desktop, and should be
    removed later.

xdg-desktop-portal (1.17.0-1) experimental; urgency=medium

  * Team upload
  * New upstream release
    - Fixes portal delay with x-d-p-gnome 44 and non-GNOME desktops
      (LP: #2013116) (Closes: #1032584)
  * debian/control: Build-Depend on python3-dbusmock & python3-pytest
    for build tests
  * Drop all patches: applied in new release
  * Cherry-pick 3 bug fixes from upstream repo

 -- Jeremy Bícha <email address hidden> Tue, 05 Sep 2023 13:08:18 -0400

Changed in xdg-desktop-portal (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Jeremy Bícha (jbicha) wrote :

I'm closing the Lunar tasks based on comment #5 to be realistic that fixing this issue for Lunar isn't something we are working on.

Changed in xdg-desktop-portal-gnome (Ubuntu Lunar):
status: Triaged → Won't Fix
Changed in xdg-desktop-portal (Ubuntu Lunar):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.