After upgrading to 23.05, gnome applications take a long time to start

Hi there!

I’ve upgraded to nixos 23.05 a few days ago and noticed how all Gnome applications take something like a minute or two until they start. The hardware is the same as before, and other applications start as quickly as before the upgrade. I use i3 as a desktop environment with a bunch of Gnome apps (Nautilus, Evolution, Evince, …).

When starting an application via a terminal, I get this as an output:

** Message: 15:04:11.713: Connecting to org.freedesktop.Tracker3.Miner.Files

** (org.gnome.Nautilus:21983): WARNING **: 15:05:02.198: destroyed file has call_when_ready pending

The second line only appears once nautilus is launched, not sure if that’s related.

People in the arch wiki suggest clearing Tracker caches but that did not solve the problem for me.

I have a similar problem with Nautilus but I haven’t found a solution yet.
I’m using it with qtile so not a full Gnome environment either.

If it is 30 seconds delay, it might be D-Bus timeout.

You can see what services are being called using dbus-monitor --session or using Bustle command. (Note that the output may contain private information like Evolution calendar info or evolution data server credentials, or gnome-keyring secrets so do not post it here in full).

Do you have tracker installed services.gnome.tracker.enable = true? Other services that might be potentially necessary are gvfs or udisks2.

1 Like

Not sure what I’m looking at, there are a lot of messages from dbus. I noticed one error right before the application (tested with nautlius) actually opens:

method call time=1686494982.048351 sender=:1.615 -> destination=org.freedesktop.DBus serial=36 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
   string "com.feralinteractive.GameMode"
error time=1686494982.048365 sender=org.freedesktop.DBus -> destination=:1.615 error_name=org.freedesktop.DBus.Error.NameHasNoOwner reply_serial=36
   string "Could not get owner of name 'com.feralinteractive.GameMode': no such name"

Not sure if that’s related.

Anything specific to filter for?

It took ~50 seconds for nautilus to open, does not look like a usual timeout value.

I don’t have tracker, gvfs or udisks2 enabled explicitly. From grepping my nix config, I have nautilus, services.gnome.gnome-keyring.enable = true;, evince, eog, gnome-calculator, evolution and services.gnome.evolution-data-server.enable = true.

I also have the same issue, also using gnome services with i3, also have services.gnome.gnome-keyring.enable = true;

I tried it with both tracker and udisks2 enabled, doesn’t change much.
At least not for the first run.

I’ve enabled the gnome DE (using i3 otherwise) and the start of these apps was still slow, but only the first time I started them. I think that rules out some service not being installed? But maybe it is not started with the DE?

EDIT: I’ve tried pinning gnome apps back to 22.11 (multiple at a time, doing something like a binary search) and after going back and forth, everything starts as fast as expected under the gnome DE. Just not when starting the same application under i3.

Is there a way we can figure out which services the gnome DE includes / starts and then enable them when using gnome applications with other DEs?

Here’s my output from dbus-monitor --session: If I’m interpreting this right, it’s hanging while querying org.freedesktop.impl.portal.desktop.gnome?

it also needs a new xdg-desktop-portal 1.16 relaes.
-merge request author

It is possible that these fixes have not fully made their way into NixOS. Arch, for example, has their own patched version of xdg-desktop-portal last released in May, while the official release (and NixOS’s) dates back to December. is part of x-d-p-gnome 44.1, which is available on both NixOS unstable and 23.05. x-d-p is up to date as well.

It looks like Arch backports an extra patch for x-d-p:

Might make sense for us to apply it as well.

Is there a way to easily test this patch? I wouldn’t know where to start patching it in tbh.

You can use something like the following overlay:

(final: prev: {
  xdg-desktop-portal = prev.xdg-desktop-portal.overrideAttrs (attrs: {
    patches = attrs.patches or [] ++ [
      (prev.fetchpatch2 {
        url = "";
        hash = "";

Thank you! @jtojnar !
I tried the overlay you suggested:

  nixpkgs.overlays = [
    (final: prev: {
      xdg-desktop-portal = prev.xdg-desktop-portal.overrideAttrs (attrs: {
        patches = attrs.patches or [] ++ [
          (prev.fetchpatch2 {
            url = "";
            hash = "sha256-ErART0enms5yBm+ALKH+znHUJ2Jptgu9JgpnYEYcsfU=";

However, all gnome apps are still slow to load, no change.

Adding link to issue mentioned in the Arch patch: