[Pkg-utopia-maintainers] Bug#994865: Delayed start due to Pipewire not running

Vincent Bernat bernat at debian.org
Thu Sep 23 14:36:17 BST 2021


 ❦ 23 September 2021 10:08 +01, Simon McVittie:

>> Since upgrading to 1.10.1-1, xdg-desktop-portal service takes a lot of
>> time to start on a desktop not using Pipewire.
>
> Looking at the diff, I don't understand why this particular upgrade
> would trigger this: the only Pipewire-related change was to add a 10
> second timeout on some operations, instead of waiting indefinitely.
>
> Are you sure this is triggered by upgrading xdg-desktop-portal, and not
> by upgrading some related package - perhaps x-d-p-gtk or pipewire?

I don't have Pipewire installed (but it was installed at some point). I
see that on a previous boot, the same error was here but did not
introduce a delay.

> The 25 second delay you reported is the default timeout for D-Bus method
> calls, so I suspect what you are seeing here is a D-Bus method call that
> never gets a reply and times out.
>
> I'm less confident than you are that the missing Pipewire service is the
> root cause here. I think the log you reported is equally consistent with
> some unrelated D-Bus method call starting, timing out 25 seconds later,
> and then x-d-p proceeding through its remaining startup tasks, one of
> which is to try to talk to Pipewire to decide whether it can provide
> video-related portals (screen-sharing and remote-desktop).
>
> It might be helpful to run
>
>     /usr/libexec/xdg-desktop-portal --verbose --replace
>
> or even
>
>     G_MESSAGES_DEBUG=all /usr/libexec/xdg-desktop-portal --verbose --replace
>
> and report what the output is, and where in the output the 25 second delay
> happened.

Unfortunately, it seems the problem only happens on boot. I have added
--verbose for the next boot and I'll keep you posted.

> Doing the same for xdg-desktop-portal-gtk (or whatever other backend you
> are using, if not -gtk) could also provide useful information; or watching
> the output of `dbus-monitor --session` might also be helpful, although
> there will be a lot of noise from unrelated D-Bus operations in that.

xdg-desktop-portal-gtk started without delay and its log does not have
any error.

>> In turn, this seems to delay many other things that rely on this
>> service. For example, VTE terminals are delayed.
>
> I would have expected xdg-desktop-portal to start up at most once per
> GUI login session, so I would have expected you to only see a delay
> once.

Yes, the delay happens only once.

> If you're seeing a delay in opening VTE terminals, one possible reason
> is that when /etc/profile.d/flatpak.sh runs
> `GIO_USE_VFS=local flatpak --installations`, it might be doing IPC to some
> service that takes a long time.
>
> If you run
>
>     G_MESSAGES_DEBUG=all flatpak --installations -vv
>
> is that also delayed, and are there any clues in its output?

The terminal window does is not displayed. The delay is related to the
fact that VTE terminals (like Gnome Terminal) are "GTK apps" and they
synchronize with DBus to find an existing instance if any. For some
reason, this requires a desktop portal.

So, I'll reboot before the end of the week and I'll tell you what's in
the logs.
-- 
Test programs at their boundary values.
            - The Elements of Programming Style (Kernighan & Plauger)



More information about the Pkg-utopia-maintainers mailing list