Bug 2176759 - Some apps take much longer to start in Plasma in F38 than F37 if xdg-desktop-portal-gnome is installed
Summary: Some apps take much longer to start in Plasma in F38 than F37 if xdg-desktop-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xdg-desktop-portal-gnome
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David King
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedFreezeException Accepted0Day
: 2182191 (view as bug list)
Depends On:
Blocks: F38FinalBlocker F38FinalFreezeException
TreeView+ depends on / blocked
 
Reported: 2023-03-09 07:41 UTC by Matt Fagnani
Modified: 2023-07-24 17:41 UTC (History)
23 users (show)

Fixed In Version: xdg-desktop-portal-gnome-44.0-2.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-04-11 22:33:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Gitlab GNOME xdg-desktop-portal-gnome issues 74 0 None opened xdg-desktop-portal-gnome 44 causes delays in non-GNOME desktops 2023-03-31 15:28:57 UTC
GNOME Gitlab GNOME xdg-desktop-portal-gnome merge_requests 78 0 None opened systemd: Launch after gnome-session-initialized.target 2023-03-31 15:29:17 UTC
Github flatpak xdg-desktop-portal pull 985 0 None open portal-impl: Only return found implementation if it launched 2023-03-31 15:29:17 UTC

Description Matt Fagnani 2023-03-09 07:41:29 UTC
Description of problem:

I upgraded a Fedora 37 KDE Plasma installation to Fedora 38. After the upgrade completed, I started Plasma 5.27.2 on Wayland. Firefox 110.0 and 112.0a1 took about 15-20 seconds to start in F38 while they took about 1 second to start in F37. The same delays occurred for Thunderbird 102.8 and 112.0a1. GNOME Boxes 44-rc took 1-2 minutes to start in F38 instead of 1 second in F37. gnome-abrt took 15-20 seconds to start in F38 instead of 1 second in F37. 

journalctl showed that xdg-desktop-portal.service and xdg-desktop-portal-gnome.service started right after Firefox, Thunderbird, GNOME Boxes, gnome-abrt, and then xdg-desktop-portal.service and xdg-desktop-portal-gnome.service timed out after about 45-60 seconds. Starting Firefox 110.0 on Wayland showed the following xdg-desktop-portal.service and xdg-desktop-portal-gnome.service timeouts.

Mar 09 00:27:28 systemd[1446]: Started app-firefox\x2dwayland-07301048b6e741fc9bd3accbedeb483c.scope - Firefox on Wayland - Web Browser.
Mar 09 00:27:29 systemd[1446]: Starting xdg-desktop-portal.service - Portal service...
Mar 09 00:27:29 systemd[1446]: Starting xdg-desktop-portal-gnome.service - Portal service (GNOME implementation)...
Mar 09 00:27:30 plasmashell[1669]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:286: Unable to assign [undefined] to QString
Mar 09 00:27:55 systemd[1]: Started pcscd.service - PC/SC Smart Card Daemon.
Mar 09 00:27:55 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=pcscd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 09 00:27:57 rtkit-daemon[862]: Successfully made thread 3776 of process 3572 (/usr/lib64/firefox/firefox) owned by '1000' RT at priority 10.
Mar 09 00:28:14 systemd[1446]: xdg-desktop-portal.service: start operation timed out. Terminating.
Mar 09 00:28:14 systemd[1446]: xdg-desktop-portal-gnome.service: start operation timed out. Terminating.
Mar 09 00:28:14 systemd[1446]: xdg-desktop-portal.service: Failed with result 'timeout'.
Mar 09 00:28:14 systemd[1446]: Failed to start xdg-desktop-portal.service - Portal service.
Mar 09 00:28:14 systemd[1446]: xdg-desktop-portal-gnome.service: Failed with result 'timeout'.
Mar 09 00:28:14 systemd[1446]: Failed to start xdg-desktop-portal-gnome.service - Portal service (GNOME implementation).

Starting Thunderbird 102.8.0 on Wayland showed the same kinds of timeouts.

Mar 09 00:28:24 systemd[1446]: Started app-mozilla\x2dthunderbird\x2dwayland-1dc660e0d6f341b2875b41f516737fb9.scope - Thunderbird on Wayland - Email.
Mar 09 00:28:27 systemd[1446]: Starting xdg-desktop-portal.service - Portal service...
Mar 09 00:28:27 systemd[1446]: Starting xdg-desktop-portal-gnome.service - Portal service (GNOME implementation)...
Mar 09 00:28:40 plasmashell[1669]: kf.service.services: KApplicationTrader: mimeType "x-scheme-handler/file" not found
Mar 09 00:28:40 systemd[1446]: Started app-org.kde.kinfocenter-7180dbc6bee24be4937c4528c9423507.scope - Info Center - Info Center.
Mar 09 00:28:40 kinfocenter[4003]: kf.xmlgui: cannot find .rc file "kinfocenterui.rc" for component "kinfocenter"
Mar 09 00:28:40 kinfocenter[4003]: file:///usr/lib64/qt5/qml/org/kde/kirigami.2/ScrollablePage.qml:200:9: QML MouseArea: Binding loop detected for property "width"
Mar 09 00:28:40 kinfocenter[4003]: file:///usr/lib64/qt5/qml/org/kde/kirigami.2/ScrollablePage.qml:200:9: QML MouseArea: Binding loop detected for property "width"
Mar 09 00:28:41 kinfocenter[4003]: QQmlEngine::setContextForObject(): Object already has a QQmlContext
Mar 09 00:28:41 kinfocenter[4003]: file:///usr/lib64/qt5/qml/org/kde/kirigami.2/ScrollablePage.qml:200:9: QML MouseArea: Binding loop detected for property "implicitHeight"
Mar 09 00:28:41 kinfocenter[4003]: file:///usr/lib64/qt5/qml/org/kde/kirigami.2/ScrollablePage.qml:200:9: QML MouseArea: Binding loop detected for property "implicitHeight"
Mar 09 00:28:41 kinfocenter[4003]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Mar 09 00:28:41 systemd[1]: Created slice system-dbus\x2d:1.12\x2dorg.kde.kinfocenter.dmidecode.slice - Slice /system/dbus-:1.12-org.kde.kinfocenter.dmidecode.
Mar 09 00:28:41 systemd[1]: Started dbus-:1.12-org.kde.kinfocenter.dmidecode.
Mar 09 00:28:41 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.12-org.kde.kinfocenter.dmidecode@0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 09 00:28:48 kinfocenter[4003]: QQmlEngine::setContextForObject(): Object already has a QQmlContext
Mar 09 00:28:48 kinfocenter[4003]: Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Mar 09 00:28:48 kinfocenter[4003]: Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Mar 09 00:28:48 kinfocenter[4003]: Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Mar 09 00:28:50 kinfocenter[4003]: QQmlEngine::setContextForObject(): Object already has a QQmlContext
Mar 09 00:28:51 systemd[1]: dbus-:1.12-org.kde.kinfocenter.dmidecode: Deactivated successfully.
Mar 09 00:28:51 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.12-org.kde.kinfocenter.dmidecode@0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 09 00:28:56 rtkit-daemon[862]: Successfully made thread 4198 of process 3938 (/usr/lib64/thunderbird/thunderbird) owned by '1000' RT at priority 10.
Mar 09 00:29:06 systemd[1446]: app-mozilla\x2dthunderbird\x2dwayland-1dc660e0d6f341b2875b41f516737fb9.scope: Consumed 12.318s CPU time.
Mar 09 00:29:12 systemd[1446]: xdg-desktop-portal-gnome.service: start operation timed out. Terminating.
Mar 09 00:29:12 systemd[1446]: xdg-desktop-portal.service: start operation timed out. Terminating.
Mar 09 00:29:12 systemd[1446]: xdg-desktop-portal-gnome.service: Failed with result 'timeout'.
Mar 09 00:29:12 systemd[1446]: Failed to start xdg-desktop-portal-gnome.service - Portal service (GNOME implementation).
Mar 09 00:29:12 systemd[1446]: xdg-desktop-portal.service: Failed with result 'timeout'.
Mar 09 00:29:12 systemd[1446]: Failed to start xdg-desktop-portal.service - Portal service.

Similar timeouts happened with GNOME Boxes and gnome-abrt.

xdg-desktop-portal-gnome failed to start during boot in F38 with the error Failed to initialize display server connection: Unsupported or missing session type ''

Mar 09 00:16:44 systemd[1055]: Starting xdg-desktop-portal.service - Portal service...
Mar 09 00:16:45 sddm-helper-start-wayland[1120]: "No backend specified, automatically choosing drm\n"
Mar 09 00:16:45 systemd[1055]: Starting xdg-document-portal.service - flatpak document portal service...
Mar 09 00:16:45 systemd[1055]: Starting xdg-permission-store.service - sandboxed app permission store...
Mar 09 00:16:45 systemd[1055]: Started xdg-permission-store.service - sandboxed app permission store.
Mar 09 00:16:45 systemd[1055]: Started xdg-document-portal.service - flatpak document portal service.
Mar 09 00:16:45 xdg-document-portal[1133]: Ignoring invalid max threads value 4294967295 > max (100000).
Mar 09 00:16:45 systemd[1055]: Starting xdg-desktop-portal-gnome.service - Portal service (GNOME implementation)...
Mar 09 00:16:45 systemd[1]: Created slice system-dbus\x2d:1.12\x2dorg.freedesktop.problems.slice - Slice /system/dbus-:1.12-org.freedesktop.problems.
Mar 09 00:16:45 systemd[1]: Started dbus-:1.12-org.freedesktop.problems.
Mar 09 00:16:45 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.12-org.freedesktop.problems@0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 09 00:16:45 xdg-desktop-portal-gnome[1152]: Failed to initialize display server connection: Unsupported or missing session type ''
Mar 09 00:16:45 systemd[1055]: xdg-desktop-portal-gnome.service: Main process exited, code=exited, status=1/FAILURE
Mar 09 00:16:45 systemd[1055]: xdg-desktop-portal-gnome.service: Failed with result 'exit-code'.
Mar 09 00:16:45 systemd[1055]: Failed to start xdg-desktop-portal-gnome.service - Portal service (GNOME implementation).
Mar 09 00:16:45 systemd[1055]: Starting xdg-desktop-portal-gnome.service - Portal service (GNOME implementation)...
Mar 09 00:16:45 xdg-desktop-portal-gnome[1162]: Failed to initialize display server connection: Unsupported or missing session type ''
Mar 09 00:16:45 systemd[1055]: xdg-desktop-portal-gnome.service: Main process exited, code=exited, status=1/FAILURE
Mar 09 00:16:45 systemd[1055]: xdg-desktop-portal-gnome.service: Failed with result 'exit-code'.
Mar 09 00:16:45 systemd[1055]: Failed to start xdg-desktop-portal-gnome.service - Portal service (GNOME implementation).
Mar 09 00:16:45 systemd[1055]: Starting xdg-desktop-portal-gtk.service - Portal service (GTK/GNOME implementation)...

In about:config in Firefox 112.0a1, I changed widget.use-xdg-desktop-portal.file-picker, widget.use-xdg-desktop-portal.location, widget.use-xdg-desktop-portal.mime-handler, widget.use-xdg-desktop-portal.open-uri, widget.use-xdg-desktop-portal.settings from their default value of 2 to 0 which from what I could find make Firefox use its built-in file-picker, etc. instead of xdg-desktop-portal. Firefox started after about 1 second after I made those changes as did Thunderbird 112.0a1. The startup slowdowns appear to be related to the xdg-desktop-portal and xdg-desktop-portal-gnome timeouts.

Version-Release number of selected component (if applicable):
xdg-desktop-portal-1.16.0-2.fc38.x86_64
xdg-desktop-portal-gnome-44~rc-1.fc38.x86_64
firefox-110.0-3.fc38.x86_64
thunderbird-102.8.0-1.fc38.x86_64
gnome-boxes-44~rc-1.fc38.x86_64
gnome-abrt-1.4.2-4.fc38.x86_64
plasma-workspace-5.27.2-1.fc38.x86_64
kf5-plasma-5.103.0-1.fc38.x86_64
qt5-qtbase-5.15.8-6.fc38.x86_64

How reproducible:
The slowed starting of Firefox, Thunderbird, GNOME Boxes, gnome-abrt and the xdg-desktop-portal and xdg-desktop-portal-gnome timeouts happened each of many times in Plasma in F38

Steps to Reproduce:
1. Boot a Fedora 38 KDE Plasma installation updated to 2023-3-9 with updates-testing enabled updated from a F37 installation
2. Start Plasma 5.27.2 on Wayland
3. Start Firefox
4. Install Thunderbird, GNOME Boxes, gnome-abrt if they aren't already with sudo dnf install thunderbird gnome-boxes gnome-abrt
5. Start Thunderbird on Wayland
6. Start GNOME Boxes
7. Start gnome-abrt

Actual results:
Firefox, Thunderbird, GNOME Boxes and gnome-abrt take much longer to start in Plasma in F38 than F37 involving xdg-desktop-portal.service and xdg-desktop-portal-gnome.service timing out

Expected results:
Firefox, Thunderbird, GNOME Boxes and gnome-abrt would start about as quickly in Plasma in F38 as in F37

Additional info:
KDE programs don't appear to have this problem.

Comment 1 Matt Fagnani 2023-03-09 16:38:09 UTC
I have GNOME installed in the F38 installation. I prevented xdg-desktop-portal-gnome from running with systemctl mask xdg-desktop-portal-gnome --user Firefox, Thunderbird, GNOME Boxes and gnome-abrt started after 1-2 seconds after masking xdg-desktop-portal-gnome. The problem appears to involve xdg-desktop-portal-gnome being run in Plasma when it shouldn't be and then timing out. This problem doesn't seem to affect Fedora-KDE-Live-x86_64-38_Beta-1.3.iso which doesn't have xdg-desktop-portal-gnome installed.

Comment 2 David Koppelman 2023-03-11 22:23:28 UTC
I am having similar problems with xdg-desktop-portal in Plasma
Wayland, though not in Plasma X. In X both xdg-desktop-portal and
xdg-desktop-portal-gnome are running without problems.

In Wayland:

    [koppel@dmk-laptop-21 ~]$ systemctl --user status xdg-desktop-portal
    ● xdg-desktop-portal.service - Portal service
         Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
         Active: activating (start) since Sat 2023-03-11 16:09:08 CST; 24s ago
       Main PID: 6160 (xdg-desktop-por)
          Tasks: 4 (limit: 18156)
         Memory: 1.6M
            CPU: 23ms
         CGroup: /user.slice/user-1000.slice/user/session.slice/xdg-desktop-portal.service
                 └─6160 /usr/libexec/xdg-desktop-portal

    Mar 11 16:09:08 dmk-laptop-21 systemd[6053]: Starting xdg-desktop-portal.ser…...
    Hint: Some lines were ellipsized, use -l to show in full.
    [koppel@dmk-laptop-21 ~]$ systemctl --user restart xdg-desktop-portal

The command above hangs. Later:

    systemctl -l --user status xdg-desktop-portal
    × xdg-desktop-portal.service - Portal service
         Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
         Active: failed (Result: timeout) since Sat 2023-03-11 16:10:31 CST; 35s ago
        Process: 7717 ExecStart=/usr/libexec/xdg-desktop-portal (code=killed, signal=TERM)
       Main PID: 7717 (code=killed, signal=TERM)
            CPU: 38ms

    Mar 11 16:09:46 dmk-laptop-21 systemd[6053]: Starting xdg-desktop-portal.service - Portal service...
    Mar 11 16:10:18 dmk-laptop-21 xdg-desktop-por[7717]: Failed to create settings proxy: Error al llamar StartSereviceByName para org.freedesktop.impl.portal.desktop.gnome: Se alcanzó el tiempo de expiración
    Mar 11 16:10:31 dmk-laptop-21 systemd[6053]: xdg-desktop-portal.service: start operation timed out. Terminating.
    Mar 11 16:10:31 dmk-laptop-21 systemd[6053]: xdg-desktop-portal.service: Failed with result 'timeout'.
    Mar 11 16:10:31 dmk-laptop-21 systemd[6053]: Failed to start xdg-desktop-portal.service - Portal service.


    systemctl -l --user status xdg-desktop-portal-gnome
    × xdg-desktop-portal-gnome.service - Portal service (GNOME implementation)
         Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-gnome.service; static)
         Active: failed (Result: timeout) since Sat 2023-03-11 16:10:38 CST; 2min 1s ago
        Process: 7725 ExecStart=/usr/libexec/xdg-desktop-portal-gnome (code=killed, signal=TERM)
       Main PID: 7725 (code=killed, signal=TERM)
            CPU: 13ms

    Mar 11 16:09:53 dmk-laptop-21 systemd[6053]: Starting xdg-desktop-portal-gnome.service - Portal service (GNOME implementation)...
    Mar 11 16:10:38 dmk-laptop-21 systemd[6053]: xdg-desktop-portal-gnome.service: start operation timed out. Terminating.
    Mar 11 16:10:38 dmk-laptop-21 systemd[6053]: xdg-desktop-portal-gnome.service: Failed with result 'timeout'.
    Mar 11 16:10:38 dmk-laptop-21 systemd[6053]: Failed to start xdg-desktop-portal-gnome.service - Portal service (GNOME implementation).


But in X no problem with either service:

    [koppel@dmk-laptop-21 ~]$ systemctl --user -l status xdg-desktop-portal
    ● xdg-desktop-portal.service - Portal service
         Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
         Active: active (running) since Sat 2023-03-11 16:15:13 CST; 1min 19s ago
       Main PID: 9212 (xdg-desktop-por)
          Tasks: 7 (limit: 18156)
         Memory: 2.8M
            CPU: 75ms
         CGroup: /user.slice/user-1000.slice/user/session.slice/xdg-desktop-portal.service
                 └─9212 /usr/libexec/xdg-desktop-portal

    Mar 11 16:15:11 dmk-laptop-21 systemd[8880]: Starting xdg-desktop-portal.service - Portal service...
    Mar 11 16:15:13 dmk-laptop-21 systemd[8880]: Started xdg-desktop-portal.service - Portal service.

    [koppel@dmk-laptop-21 ~]$ systemctl --user -l status xdg-desktop-portal-gnome
    ● xdg-desktop-portal-gnome.service - Portal service (GNOME implementation)
         Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-gnome.service; static)
         Active: active (running) since Sat 2023-03-11 16:15:12 CST; 1min 25s ago
       Main PID: 9254 (xdg-desktop-por)
          Tasks: 12 (limit: 18156)
         Memory: 24.9M
            CPU: 234ms
         CGroup: /user.slice/user-1000.slice/user/app.slice/xdg-desktop-portal-gnome.service
                 └─9254 /usr/libexec/xdg-desktop-portal-gnome

    Mar 11 16:15:12 dmk-laptop-21 systemd[8880]: Starting xdg-desktop-portal-gnome.service - Portal service (GNOME implementation)...
    Mar 11 16:15:12 dmk-laptop-21 systemd[8880]: Started xdg-desktop-portal-gnome.service - Portal service (GNOME implementation).

Comment 3 Alessandro Astone 2023-03-31 13:47:52 UTC
*** Bug 2182191 has been marked as a duplicate of this bug. ***

Comment 4 Alessandro Astone 2023-03-31 13:49:01 UTC
I'll add here some of my comments from the duplicate bug:

In GNOME 44.0 the xdg-desktop-portal-gnome depends on mutter if the session is Wayland.
Upon starting it waits for mutter on the session dbus. If mutter never started, systemd makes xdg-desktop-portal-gnome time out.
At the same time, the generic xdg-desktop-portal.service was waiting for xdg-desktop-portal-gnome to start and it too times out and gets terminated, so no other desktop-specific portal can be used

Upstream issue: https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/74

Note that the upstream issue states that the only problem is a 2min delay in portal-related actions, but that is not the case in fedora, where the xdg-desktop-portal.service gets killed after timeout so is unusable.

Comment 5 Fedora Blocker Bugs Application 2023-03-31 13:53:08 UTC
Proposed as a Freeze Exception for 38-final by Fedora user aleasto using the blocker tracking app because:

 Widespread issue: any user upgrading from F37 KDE to F38 KDE will be impacted.
Very visible impact: GTK applications may take up to 2 minutes to start (namely Firefox), all portal operations won't work (namely screen sharing, or anything to do with flatpaks)

Comment 6 Adam Williamson 2023-03-31 15:18:45 UTC
I'm not convinced this is really a bug in the GNOME portal itself; it's more about why it gets run in Plasma. I'm not exactly sure whose fault that is, though. Let's CC the KDE usual suspects...

Comment 7 Adam Williamson 2023-03-31 15:19:27 UTC
(well, hmm, I guess my comment begs a few questions; I guess we need someone who knows more about the whole portal thing in general to decide what's wrong and what needs fixing)

Comment 8 Alessandro Astone 2023-03-31 15:22:40 UTC
It is a bug in xdg-desktop-portal-gnone, it's being tracked upstream as i linked.

You can have all portals running because the system is designed to not interfere with one another. In facts, it used to be necessary to have the -gnome service running in Plasma for some functionality (i don't remember what, maybe gtk fonts). Nowdays it's not required anymore, but it was shipped by default Fedora KDE images up until F37. It's ow removed, but you will hit this issue when upgrading.

Comment 10 Adam Williamson 2023-03-31 15:28:36 UTC
Shall we go ahead and backport those, then? Or wait for more discussion/review?

Comment 11 Jonas Ådahl 2023-03-31 15:34:14 UTC
> Shall we go ahead and backport those, then? Or wait for more discussion/review?

If not a backport immediately, scratch builds for wider testing wouldn't hurt.

Comment 12 Matt Fagnani 2023-03-31 18:39:21 UTC
GTK programs are probably more likely to result in xdg-desktop-portal-gnome being started than others, but the problem isn't specific to them and not all of them are affected by this problem. VLC which uses Qt installed in a flatpak from flathub took about 2 minutes to start due to the xdg-desktop-portal and xdg-desktop-portal-gnome timeouts happening 3 times each in Plasma in my F38 KDE Plasma installation when it normally started in a second. The SELinux Troubleshooter program sealert which uses GTK started normally in 2 seconds in the same enviroment, and no xdg-desktop-portal-gnome timeouts were shown. The problem might depend on whether the program starting results in xdg-desktop-portal-gnome being started and timing out in Plasma instead of whether they're GTK-based or otherwise. Thanks.

Comment 13 Adam Williamson 2023-03-31 23:39:01 UTC
Scratch builds:
https://koji.fedoraproject.org/koji/taskinfo?taskID=99381518 (xdg-desktop-portal)
https://koji.fedoraproject.org/koji/taskinfo?taskID=99381568 (xdg-desktop-portal-gnome)
Can folks try those and see how they go? Thanks!

Comment 14 David Koppelman 2023-04-01 00:22:13 UTC
It fixed the problem for me, which is different than the OP (see
Comment 2). In my case I'm connecting to the portal via dbus from
within Emacs under KDE/Wayland.

(dbus-call-method
            :session
            "org.freedesktop.portal.Desktop"
            "/org/freedesktop/portal/desktop"
            "org.freedesktop.portal.Settings"
            "Read"
            :timeout 100
            "org.freedesktop.appearance" "color-scheme")

With the two scratch builds xdg-desktop-portal is returning promptly
on Wayland. (There was never a problem on X.)

Comment 15 Matt Fagnani 2023-04-01 01:15:51 UTC
Firefox, Thunderbird, GNOME Boxes, gnome-abrt, and VLC had normal startup times with xdg-desktop-portal-1.16.0-2.1.awb.2176759.x86_64 and xdg-desktop-portal-gnome-44.0-1.1.awb.2176759.x86_64. There was a different xdg-desktop-portal-gnome failure when logging into Plasma which repeated.

Mar 31 20:54:12 systemd[1257]: Starting xdg-desktop-portal-gnome.service - Portal service (GNOME implementation)...
Mar 31 20:54:12 wireplumber[1324]: GetManagedObjects() failed: org.freedesktop.DBus.Error.NameHasNoOwner
Mar 31 20:54:12 kwin_wayland[1320]: No backend specified, automatically choosing drm
Mar 31 20:54:12 xdg-desktop-portal-gnome[1370]: 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
Mar 31 20:54:12 systemd[1257]: xdg-desktop-portal-gnome.service: Main process exited, code=exited, status=1/FAILURE
Mar 31 20:54:12 systemd[1257]: xdg-desktop-portal-gnome.service: Failed with result 'exit-code'.
Mar 31 20:54:12 systemd[1257]: Failed to start xdg-desktop-portal-gnome.service - Portal service (GNOME implementation).

The same type of xdg-desktop-portal-gnome failure happened when starting GNOME Boxes and VLC.

Mar 31 20:54:23 plasmashell[1473]: QString::arg: 2 argument(s) missing in org.gnome.Boxes
Mar 31 20:54:23 systemd[1257]: Started dbus-:1.2-org.gnome.Boxes.
...
Mar 31 20:54:24 xdg-desktop-portal-kde[1513]: xdp-kde-settings: Namespace  "org.gnome.desktop.a11y.interface"  is not supported
Mar 31 20:54:24 systemd[1257]: Starting xdg-desktop-portal-gnome.service - Portal service (GNOME implementation)...
Mar 31 20:54:24 xdg-desktop-portal-gnome[2255]: 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
Mar 31 20:54:24 systemd[1257]: xdg-desktop-portal-gnome.service: Main process exited, code=exited, status=1/FAILURE
Mar 31 20:54:24 systemd[1257]: xdg-desktop-portal-gnome.service: Failed with result 'exit-code'.
Mar 31 20:54:24 systemd[1257]: Failed to start xdg-desktop-portal-gnome.service - Portal service (GNOME implementation).
...
Mar 31 20:55:08 plasmashell[1473]: QString::arg: 2 argument(s) missing in org.videolan.VLC
Mar 31 20:55:08 systemd[1257]: Started app-org.videolan.VLC-9760a316056347f4bdef53497091a09d.scope - VLC media player - Media player.
Mar 31 20:55:08 systemd[1257]: Starting flatpak-session-helper.service - flatpak session helper...
Mar 31 20:55:08 systemd[1257]: Started flatpak-session-helper.service - flatpak session helper.
Mar 31 20:55:09 systemd[1257]: Started app-flatpak-org.videolan.VLC-2370.scope.
Mar 31 20:55:09 plasmashell[2390]: [00005616911f8710] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Mar 31 20:55:09 systemd[1257]: Starting xdg-desktop-portal-gnome.service - Portal service (GNOME implementation)...
Mar 31 20:55:09 xdg-desktop-portal-gnome[2398]: 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
Mar 31 20:55:09 systemd[1257]: xdg-desktop-portal-gnome.service: Main process exited, code=exited, status=1/FAILURE
Mar 31 20:55:09 systemd[1257]: xdg-desktop-portal-gnome.service: Failed with result 'exit-code'.
Mar 31 20:55:09 systemd[1257]: Failed to start xdg-desktop-portal-gnome.service - Portal service (GNOME implementation).
Mar 31 20:55:09 xdg-desktop-por[1334]: Failed to ReadAll() from Settings implementation: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not activate remote peer: startup job failed.
Mar 31 20:55:10 plasmashell[2390]: kf.notifications: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOP
Mar 31 20:55:10 plasmashell[2390]: [0000561691294520] main playlist: playlist is empty
Mar 31 20:55:12 kwin_wayland[1320]: This plugin does not support raise()

Those errors didn't happen when starting Firefox, Thunderbird, or gnome-abrt. Thanks.

Comment 16 Alessandro Astone 2023-04-02 16:58:04 UTC
Indeed xdg-desktop-portal-gnome now immediatly fails to start instead of waiting 2 minutes for Mutter to show up on dbus. So xdg-desktop-portal can go on with the other desktop-specific portals.

Comment 17 Ben Cotton 2023-04-03 15:53:54 UTC
Scratch builds restore expected behavior for me

Comment 18 Geoffrey Marr 2023-04-03 20:36:35 UTC
Discussed during the 2023-04-03 blocker review meeting: [0]

The decision to classify this bug as an "AcceptedFreezeException (Final)" was made as it is a noticeable issue that cannot be fixed with an update.

[0] https://meetbot.fedoraproject.org/fedora-blocker-review/2023-04-03/f38-blocker-review.2023-04-03-16.01.txt

Comment 19 Cristian Ciupitu 2023-04-05 14:50:00 UTC
(In reply to Adam Williamson from comment #13)

Hijacking a bit this bug report: I've installed the scratch builds and now Google Chrome works properly [1].
Though I'm still getting:

    xdg-desktop-portal-gnome[17716]: Failed to initialize display server connection: Unsupported or missing session type ''

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=2183622#c4

Comment 20 Scott Beamer 2023-04-07 14:46:00 UTC
I'm experiencing 2 to 2 1/2-minute startup times with GTK apps (installed with DNF) in Plasma.

Flatpak apps are an issue as well (BOTH GTK and Qt apps - in fact in the case of flatpak, Qt apps are the slowest).

This only cropped up several weeks ago.  It wasn't an issue in F38 prior to that time.

I've been running F38 on bare metal since a few days after it branched from Rawhide.

Comment 21 Gerald Cox 2023-04-10 11:03:54 UTC
Does anyone know when this will be fixed?  Having to wait for 5 minutes for apps to start is kind of annoying, and apparently it's not easy to
remove without potential causing other issues:

dnf remove xdg-desktop-portal-gnome
Error: 
 Problem: The operation would result in removing the following protected packages: gnome-shell

Comment 22 David King 2023-04-10 11:47:05 UTC
(In reply to Gerald Cox from comment #21)
> Does anyone know when this will be fixed?  Having to wait for 5 minutes for
> apps to start is kind of annoying…

Merging of the patches upstream are still waiting on review. Please try the scratch builds in comment #13 and report back if they work for you.

Comment 23 Ivan Mironov 2023-04-10 12:01:06 UTC
(In reply to David King from comment #22)
> Merging of the patches upstream are still waiting on review. Please try the
> scratch builds in comment #13 and report back if they work for you.

$ rpm -qa | grep awb
xdg-desktop-portal-1.16.0-2.1.awb.2176759.x86_64
xdg-desktop-portal-gnome-44.0-1.1.awb.2176759.x86_64

Works for me.

By the way, this bug is not limited to GTK applications. Telegram Desktop (uses Qt) installed via flatpak takes more than 10 minutes to start.

Comment 24 Scott Beamer 2023-04-10 14:41:51 UTC
(In reply to Ivan Mironov from comment #23)
> By the way, this bug is not limited to GTK applications. Telegram Desktop
> (uses Qt) installed via flatpak takes more than 10 minutes to start.

See comment #20.

Comment 25 Adam Williamson 2023-04-10 15:52:21 UTC
agh, shoot. Sorry, I lost track of this and forgot to do official builds/update. This probably won't make 38 Final now, but I'll do builds and put them in updates-testing at least.

Comment 26 Gerald Cox 2023-04-10 16:45:11 UTC
(In reply to Adam Williamson from comment #25)
> agh, shoot. Sorry, I lost track of this and forgot to do official
> builds/update. This probably won't make 38 Final now, but I'll do builds and
> put them in updates-testing at least.

Thanks Adam!

Comment 27 Fedora Update System 2023-04-10 17:09:57 UTC
FEDORA-2023-d44b42a891 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-d44b42a891

Comment 28 Fedora Blocker Bugs Application 2023-04-10 21:40:11 UTC
Proposed as a Blocker for 38-final by Fedora user bcotton using the blocker tracking app because:

 This is a arguably a conditional violation of the final criterion "All elements of the default panel (or equivalent) configuration in all release-blocking desktops must function correctly in typical use."

It applies in cases where a user upgrades from F36 or F37 to F38. One could oppose this on the grounds that the menu does its job. It's just that a no-longer-default package fails. Arguably, that's a meaningless distinction from the user perspective .

Comment 29 Geraldo Simião 2023-04-10 22:04:54 UTC
(In reply to Adam Williamson from comment #25)
> agh, shoot. Sorry, I lost track of this and forgot to do official
> builds/update. This probably won't make 38 Final now, but I'll do builds and
> put them in updates-testing at least.

Adam, this is already accepted FE, it can be on the next RC 1.2?

Comment 30 Geraldo Simião 2023-04-10 22:07:41 UTC
Oh, sorry, my mistake. This packages don't even get shipped at the iso.

Comment 31 Fedora Update System 2023-04-11 02:26:42 UTC
FEDORA-2023-d44b42a891 has been pushed to the Fedora 38 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-d44b42a891

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 32 Kamil Páral 2023-04-11 14:26:37 UTC
(In reply to Fedora Update System from comment #31)
> FEDORA-2023-d44b42a891 has been pushed to the Fedora 38 testing repository.

Fixes the timeout issue in my testing.

Comment 33 Adam Williamson 2023-04-11 18:29:08 UTC
+6 blocker/0-day votes in https://pagure.io/fedora-qa/blocker-review/issue/1133 , marking Accepted0Day - as a reminder, that means this fix does not need to go on the media, but needs to be pushed stable before release day. (Note we probably *will* include it in the compose anyhow, since we're going to need an RC-1.2 compose, but for the record).

Comment 34 Fedora Update System 2023-04-11 22:33:58 UTC
FEDORA-2023-d44b42a891 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 35 philip 2023-07-24 17:22:30 UTC
I think I had this exact problem, but "reversed", with plasma-xdg-desktop-portal-kde preventing apps to start "fast" on Gnome.

`systemctl --user mask plasma-xdg-desktop-portal-kde.service` resolved the issue.

Should I open a separate issue?

Thanks a lot already.

Comment 36 Kamil Páral 2023-07-24 17:41:09 UTC
(In reply to philip from comment #35)

Yes, please. And add it to the Links section here, thanks.


Note You need to log in before you can comment on or make changes to this bug.