Bug 2176759 - 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
Summary: Firefox, Thunderbird, GNOME Boxes and gnome-abrt take much longer to start in...
Keywords:
Status: NEW
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:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-09 07:41 UTC by Matt Fagnani
Modified: 2023-03-11 22:23 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

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).


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