Bug 406672 - Application startup delay with KDE runtime
Summary: Application startup delay with KDE runtime
Status: RESOLVED FIXED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
: 407572 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-04-19 05:18 UTC by Peter Eszlari
Modified: 2019-09-28 06:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Eszlari 2019-04-19 05:18:03 UTC
OS: Kubuntu 19.04
xdg-desktop-portal-kde: 5.15.4

When I start a flatpak app that uses the KDE runtime, it takes quite a while until the window shows up. The same doesn't happen with Freedesktop or GNOME runtime based apps.

Under journalctl I see the following errors:

Apr 19 06:59:06 localhost polkitd(authority=local)[825]: Registered Authentication Agent for unix-process:4837:314908 (system bus name :1.312 [flatpak run org.shotcut.Shotcut], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale de_DE.UTF-8)
Apr 19 06:59:06 localhost systemd[1162]: Started flatpak-org.shotcut.Shotcut-4837.scope.
Apr 19 06:59:06 localhost polkitd(authority=local)[825]: Unregistered Authentication Agent for unix-process:4837:314908 (system bus name :1.312, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale de_DE.UTF-8) (disconnected from bus)
Apr 19 06:59:06 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings: ReadAll called with parameters:
Apr 19 06:59:06 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings:     groups:  ("org.kde.kdeglobals.*")
Apr 19 06:59:06 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings: Read called with parameters:
Apr 19 06:59:06 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings:     group:  "org.kde.kdeglobals.General"
Apr 19 06:59:06 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings:     key:  "menuFont"
Apr 19 06:59:06 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings: Key  "menuFont"  doesn't exist
Apr 19 06:59:06 localhost org.freedesktop.impl.portal.desktop.kde[1217]: QDBusMarshaller: cannot add a null QDBusVariant
Apr 19 06:59:06 localhost org.freedesktop.impl.portal.desktop.kde[1217]: QDBusConnection: error: could not send reply message to service "": Marshalling failed: Variant containing QVariant::Invalid passed in arguments
Apr 19 06:59:31 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings: Read called with parameters:
Apr 19 06:59:31 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings:     group:  "org.kde.kdeglobals.General"
Apr 19 06:59:31 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings:     key:  "font"
Apr 19 06:59:31 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings: Key  "font"  doesn't exist
Apr 19 06:59:31 localhost org.freedesktop.impl.portal.desktop.kde[1217]: QDBusMarshaller: cannot add a null QDBusVariant
Apr 19 06:59:31 localhost org.freedesktop.impl.portal.desktop.kde[1217]: QDBusConnection: error: could not send reply message to service "": Marshalling failed: Variant containing QVariant::Invalid passed in arguments
Apr 19 06:59:56 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings: Read called with parameters:
Apr 19 06:59:56 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings:     group:  "org.kde.kdeglobals.WM"
Apr 19 06:59:56 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings:     key:  "activeFont"
Apr 19 06:59:56 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings: Key  "activeFont"  doesn't exist
Apr 19 06:59:56 localhost org.freedesktop.impl.portal.desktop.kde[1217]: QDBusMarshaller: cannot add a null QDBusVariant
Apr 19 06:59:56 localhost org.freedesktop.impl.portal.desktop.kde[1217]: QDBusConnection: error: could not send reply message to service "": Marshalling failed: Variant containing QVariant::Invalid passed in arguments
Apr 19 07:00:21 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings: Read called with parameters:
Apr 19 07:00:21 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings:     group:  "org.kde.kdeglobals.General"
Apr 19 07:00:21 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings:     key:  "toolBarFont"
Apr 19 07:00:21 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings: Key  "toolBarFont"  doesn't exist
Apr 19 07:00:21 localhost org.freedesktop.impl.portal.desktop.kde[1217]: QDBusMarshaller: cannot add a null QDBusVariant
Apr 19 07:00:21 localhost org.freedesktop.impl.portal.desktop.kde[1217]: QDBusConnection: error: could not send reply message to service "": Marshalling failed: Variant containing QVariant::Invalid passed in arguments
Apr 19 07:00:46 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings: Read called with parameters:
Apr 19 07:00:46 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings:     group:  "org.kde.kdeglobals.General"
Apr 19 07:00:46 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings:     key:  "smallestReadableFont"
Apr 19 07:00:46 localhost org.freedesktop.impl.portal.desktop.kde[1217]: xdp-kde-settings: Key  "smallestReadableFont"  doesn't exist
Apr 19 07:00:46 localhost org.freedesktop.impl.portal.desktop.kde[1217]: QDBusMarshaller: cannot add a null QDBusVariant
Apr 19 07:00:46 localhost org.freedesktop.impl.portal.desktop.kde[1217]: QDBusConnection: error: could not send reply message to service "": Marshalling failed: Variant containing QVariant::Invalid passed in arguments
Comment 1 Peter Eszlari 2019-04-19 11:55:43 UTC
I tested this with an app (io.github.cloose.CuteMarkEd) that is using KDE runtime 5.9 and with this app, there is NO delay!
Comment 2 Peter Eszlari 2019-04-19 17:36:43 UTC
Now I tested this under GNOME with xdg-desktop-portal-gtk and there I have no delay at all, also with the 5.12 runtime.

So the problematic combination is: xdg-desktop-portal-kde + KDE runtime 5.12
Comment 3 Jan Grulich 2019-04-21 18:52:50 UTC
Git commit 045302b5292cb62da5843906825c04898d6656d7 by Jan Grulich.
Committed on 21/04/2019 at 18:52.
Pushed by grulich into branch 'Plasma/5.15'.

Settings portal: do not return QDBusVariant directly when calling Read() method

It seems it's not possible to return an empty QDBusVariant, which makes our portal
not to respond in time and delay application start. Instead of trying to return an
empty QDBusVariant, we are supposed to return a DBus error.

M  +54   -20   src/settings.cpp
M  +4    -2    src/settings.h

https://commits.kde.org/xdg-desktop-portal-kde/045302b5292cb62da5843906825c04898d6656d7
Comment 4 Jan Grulich 2019-05-16 06:17:37 UTC
*** Bug 407572 has been marked as a duplicate of this bug. ***