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

Simon McVittie smcv at debian.org
Thu Sep 23 10:08:29 BST 2021


Control: tags -1 + moreinfo

On Wed, 22 Sep 2021 at 09:54:43 +0200, Vincent Bernat wrote:
> 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?

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.

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.

After running one of these services with --replace, you can terminate it
with Ctrl+C and a replacement will be started in the background by D-Bus
activation the next time it is needed.

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

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?

    smcv



More information about the Pkg-utopia-maintainers mailing list