Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nautilus navigates folders very slowly and ignores theming #197188

Closed
con-f-use opened this issue Oct 22, 2022 · 28 comments
Closed

nautilus navigates folders very slowly and ignores theming #197188

con-f-use opened this issue Oct 22, 2022 · 28 comments
Labels
0.kind: bug 6.topic: GNOME GNOME desktop environment and its underlying platform

Comments

@con-f-use
Copy link
Contributor

con-f-use commented Oct 22, 2022

The latest unstable version of nautilus is opening folders very slowly for me and also ignores system theming. I'm using dwm and lightdm. The problem appeared between fd54651 and 3209689.

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.74, NixOS, 22.11 (Raccoon), 22.11.20221018.3209689`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.0`
 - channels(root): `"nix-ld, nixos, nixos-hardware, nixos_21.11-21.11, unstable"`
 - nixpkgs: `/nix/store/9kmadlrpp8w5vqk76nrcf948lsx2b1k1-source`
@Ashe
Copy link

Ashe commented Oct 22, 2022

Getting this issue too, it's really bad as nautilus is meant to be my trusty and reliable file manager. The theme looks nice and modern, maybe that was the change, but the fact it's not coloured and very slow and buggy means I can't use it anymore.

❯ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.0.2, NixOS, 22.11 (Raccoon), 22.11.20221019.db25c4d`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.4pre20211001_4f49615`
 - channels(root): `"nixos-22.05pre368234.fd364d26885"`
 - channels(ashe): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

@veprbl veprbl added the 6.topic: GNOME GNOME desktop environment and its underlying platform label Oct 25, 2022
@asbachb
Copy link
Contributor

asbachb commented Oct 30, 2022

I have the same problem: sway/wayland. It's really annoying.

@con-f-use
Copy link
Contributor Author

con-f-use commented Nov 8, 2022

The performance issue seems to have been fixed disappeared for some (at least I'm at eabc382 and don't have performance problems anymore).
However, the theming issue still persists.

@sveitser
Copy link
Contributor

sveitser commented Nov 9, 2022

I still experience both issues (slow opening of folders, ignoring theming) on nixos-unstable, 667e558, using xmonad.

The time it takes to open a folder seems to be roughly proportional to the number of files in the folder.

@jtojnar
Copy link
Member

jtojnar commented Nov 9, 2022

If you want to switch to Dark theme, see #195985 (comment).

For the slowness, please try killing nautilus and opening a debug inspector:

pkill nautilus
GTK_DEBUG=interactive nautilus

Then, in it, you find a CSS section at the top. Click it and paste the following CSS snippet. You may need to toggle the ⏸️ button for it to apply:

.view picture {filter: none;}

@p4block
Copy link

p4block commented Nov 10, 2022

Getting this on my NixOS laptop and on a friend's Arch Linux desktop, but not on my main Arch Linux desktop or his laptop.

The setups are extremely similar with sway, but I cannot pinpoint what is causing this to happen.

The CSS thing made it go much faster but still very slow compared to before whatever is happening started happening.

@jtojnar
Copy link
Member

jtojnar commented Nov 11, 2022

One difference might be the lack of icon cache on NixOS when not using X server. Could you try enabling gtk.iconCache.enable NixOS option? Also make sure that the icons are installed using environment.systemPackages otherwise it might not work.

@p4block
Copy link

p4block commented Nov 11, 2022

It's always been enabled on my laptop :(

More friends are reporting the same issue yet I cannot find anything on the internet except this thread, weird af. Slowness though, theming is not a problem, nautilus is just a gtk4 app now

@asbachb
Copy link
Contributor

asbachb commented Nov 18, 2022

I'd consider this as a blocker for 22.11 (#194208). Nautilus is almost unusable at this state. Opening nautilus and opening home folder takes about 20 seconds.

@jtojnar
Copy link
Member

jtojnar commented Nov 18, 2022

Would be useful if someone who can reproduce it was able to create a minimal NixOS config that exhibits the issue.

@asbachb
Copy link
Contributor

asbachb commented Nov 19, 2022

I have some additional logging:

Window is painted at home folder with no visible files at (+4s):
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:24.296: change_fast

Window is fully painted with all files at (+16s):
** (org.gnome.Nautilus:417794): DEBUG: 22:34:40.420: end_location_change: ../src/nautilus-window-slot.c:2096: Finished loading window for uri file:///home/asbachb

asbachb@nixos-t14s  ~  ls -la ~ | wc -l
108
 asbachb@nixos-t14s  ~  G_MESSAGES_DEBUG="all" NAUTILUS_DEBUG="Window" nautilus
(org.gnome.Nautilus:417794): GLib-GIO-DEBUG: 22:34:19.987: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
(org.gnome.Nautilus:417794): GLib-GIO-DEBUG: 22:34:19.991: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ?gio-vfs?
(org.gnome.Nautilus:417794): Tracker-DEBUG: 22:34:20.003: Loading ontologies from database.
(org.gnome.Nautilus:417794): Tracker-DEBUG: 22:34:20.004: Applying ontologies from /nix/store/idfhdsirvs0x6zw7l6qx6f18znlx97kd-nautilus-43.0/share/nautilus/ontology to existing database
(org.gnome.Nautilus:417794): Tracker-DEBUG: 22:34:20.005: Current and DB locales match: 'C'
(org.gnome.Nautilus:417794): GLib-GIO-DEBUG: 22:34:20.007: _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.007: watch_fast: "/org/gnome/desktop/interface/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.007: watch_fast: "/org/gnome/desktop/peripherals/mouse/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.007: watch_fast: "/org/gnome/desktop/sound/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.007: watch_fast: "/org/gnome/desktop/privacy/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.007: watch_fast: "/org/gnome/desktop/wm/preferences/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.007: watch_fast: "/org/gnome/desktop/a11y/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.007: watch_fast: "/org/gnome/desktop/a11y/interface/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.008: watch_established: "/org/gnome/desktop/interface/" (establishing: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.008: watch_established: "/org/gnome/desktop/peripherals/mouse/" (establishing: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.008: watch_established: "/org/gnome/desktop/sound/" (establishing: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.008: watch_established: "/org/gnome/desktop/privacy/" (establishing: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.008: watch_established: "/org/gnome/desktop/wm/preferences/" (establishing: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.008: watch_established: "/org/gnome/desktop/a11y/" (establishing: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.008: watch_established: "/org/gnome/desktop/a11y/interface/" (establishing: 1)
(org.gnome.Nautilus:417794): Gtk-DEBUG: 22:34:20.011: Connecting to session manager
(org.gnome.Nautilus:417794): Gtk-DEBUG: 22:34:20.011: Failed to get the GNOME session proxy: The name org.gnome.SessionManager is not owned
(org.gnome.Nautilus:417794): Gtk-DEBUG: 22:34:20.011: Failed to get the Xfce session proxy: The name org.xfce.SessionManager is not owned
(org.gnome.Nautilus:417794): Gtk-DEBUG: 22:34:20.013: Failed to get an inhibit portal proxy: The name org.freedesktop.portal.Desktop is not owned
(org.gnome.Nautilus:417794): Adwaita-DEBUG: 22:34:20.039: Portal not found: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files
(org.gnome.Nautilus:417794): Adwaita-DEBUG: 22:34:20.040: Portal not found: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files
(org.gnome.Nautilus:417794): Adwaita-DEBUG: 22:34:20.041: Portal not found: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.041: watch_fast: "/org/gnome/desktop/interface/" (establishing: 0, active: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.041: watch_fast: "/org/gnome/desktop/a11y/interface/" (establishing: 0, active: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.060: watch_fast: "/org/gnome/nautilus/preferences/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.060: watch_fast: "/org/gnome/nautilus/compression/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.060: watch_fast: "/org/gnome/nautilus/window-state/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.060: watch_fast: "/org/gnome/nautilus/icon-view/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.060: watch_fast: "/org/gnome/nautilus/list-view/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.060: watch_fast: "/org/gtk/gtk4/settings/file-chooser/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.060: watch_fast: "/org/gnome/desktop/lockdown/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.060: watch_fast: "/org/gnome/desktop/interface/" (establishing: 0, active: 2)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.060: watch_fast: "/org/gnome/desktop/privacy/" (establishing: 0, active: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.061: watch_established: "/org/gnome/nautilus/preferences/" (establishing: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.061: watch_established: "/org/gnome/nautilus/compression/" (establishing: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.061: watch_established: "/org/gnome/nautilus/window-state/" (establishing: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.061: watch_established: "/org/gnome/nautilus/icon-view/" (establishing: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.061: watch_established: "/org/gnome/nautilus/list-view/" (establishing: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.061: watch_established: "/org/gtk/gtk4/settings/file-chooser/" (establishing: 1)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:20.061: watch_established: "/org/gnome/desktop/lockdown/" (establishing: 1)
(org.gnome.Nautilus:417794): GLib-GIO-DEBUG: 22:34:20.732: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:24.296: change_fast
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:24.296: change_notify: /org/gnome/nautilus/preferences/search-filter-time-type
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:24.296: change_fast
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:24.296: change_notify: /org/gnome/nautilus/preferences/search-filter-time-type
** (org.gnome.Nautilus:417794): DEBUG: 22:34:24.338: nautilus_window_set_active_slot: ../src/nautilus-window.c:1700: Setting new slot 0x856480 as active, old slot inactive (nil)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:25.330: change_fast
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:25.584: watch_fast: "/org/gnome/desktop/thumbnailers/" (establishing: 0, active: 0)
(org.gnome.Nautilus:417794): dconf-DEBUG: 22:34:25.584: watch_established: "/org/gnome/desktop/thumbnailers/" (establishing: 1)
** (org.gnome.Nautilus:417794): DEBUG: 22:34:40.420: end_location_change: ../src/nautilus-window-slot.c:2096: Finished loading window for uri file:///home/asbachb
(org.gnome.Nautilus:417794): Tracker-DEBUG: 22:34:50.406: Freed 1 readonly interfaces

(I wonder if we're all talking about the same issue)

@jtojnar
Copy link
Member

jtojnar commented Nov 19, 2022

Thanks, it would be helpful if others also describe the slowness in more detail, as could just mean anything. Ideally in the form of:

  1. Run the nautilus command
  2. Wait x seconds.
  3. Window will appear.

Or

  1. In the home directory, double click a folder icon.
  2. View will become empty with “Loading…” in the status bar
  3. After y seconds, the icons for the directory will appear.

@asbachb In your case it seems to be closer to the second example. Is there a “Loading…” in the status bar in between the two states you describe? Does it happen for other directories than home? Or when you refresh the HOME directory with F5? Do you use SSD or HDD? Do you have any custom icon theme installed?

@asbachb
Copy link
Contributor

asbachb commented Nov 19, 2022

Just to clarify:

  1. Run nautilus
  2. Nothing happens for 4s
  3. Nautilus window is drawn with normal, but home folder is empty, right bottom there's "Loading...", the indicator is not moving
  4. After 14s the home folder icons are present

F5 -> Seems to be the same time as 4.
Switching the folder is slow as well, but it seems to be connected to the folder content. Folders with less content open faster, folders with more content open slower.

I use a NVMe SSD. I have gnome.adwaita-icon-theme in systemPackages.

@asbachb
Copy link
Contributor

asbachb commented Nov 19, 2022

If you want to switch to Dark theme, see #195985 (comment).

For the slowness, please try killing nautilus and opening a debug inspector:

pkill nautilus
GTK_DEBUG=interactive nautilus

Then, in it, you find a CSS section at the top. Click it and paste the following CSS snippet. You may need to toggle the pause_button button for it to apply:

.view picture {filter: none;}

Tried that without any success. Also enabled gtk icon cache, with no success and removed all icons without success.

@jtojnar
Copy link
Member

jtojnar commented Nov 19, 2022

I tried a minimal VM rm nixos.qcow2; nixos-rebuild build-vm -I nixos-config=nautilus-minimal.nix -I nixpkgs=$PWD && ./result/bin/run-*-vm:

{ pkgs, config, ... }: {
  environment.systemPackages = with pkgs; [
    bustle
    strace
    gdb
    gnome.nautilus
    gnome.metacity
  ];

  services.xserver = {
    enable = true;
    layout = "cz";
    xkbVariant = "qwerty";

    desktopManager.xterm.enable = true;
    displayManager.lightdm.enable = true;
  };

  services.openssh.enable = true;

  programs.dconf.enable = true;
  services.gnome.tracker.enable = true;

  users.extraUsers.jtojnar = {
    isNormalUser = true;
    uid = 1000;
    extraGroups = [ "wheel" "networkmanager" ];
    password = "";
    openssh.authorizedKeys.keys = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYbOlZydfRRCGCT08wdtPcpfSrgxMc6weDx3NcWrnMpVgxnMs3HozzkaS/hbcZUocn7XbCOyaxEd1O8Fuaw4JXpUBcMetpPXkQC+bZHQ3YsZZyzVgCXFPRF88QQj0nR7YVE1AeAifjk3TCODstTxit868V1639/TVIi5y5fC0/VbYG2Lt4AadNH67bRv8YiO3iTsHQoZPKD1nxA7yANHCuw38bGTHRhsxeVD+72ThbsYSZeA9dBrzACpEdnwyXclaoyIOnKdN224tu4+4ytgH/vH/uoUfL8SmzzIDvwZ4Ba2yHhZHs5iwsVjTvLe7jjE6I1u8qY7X8ofnanfNcsmz/ jtojnar@kaiser"];
  };
  imports = [
    <nixpkgs/nixos/modules/virtualisation/qemu-vm.nix>
  ];

  environment.enableDebugInfo = true;
  nixpkgs.config.allowUnfree = true;
  virtualisation.memorySize = 2048;
  virtualisation.diskSize = 8192;
  virtualisation.qemu.options = [ "-device intel-hda" "-device hda-duplex" ];
  virtualisation.forwardPorts = [
    # forward local port 2222 -> 22, to ssh into the VM
    { from = "host"; host.port = 2222; guest.port = 22; }
  ];
}

And I can see unusable slowness but it behaves differently from what you see:

  • There is about 30 seconds between running nautilus and the window appearing.
  • Even after the window appears, the “Loading…” will remain in status bar indefinitely.
  • Refreshing with F5 is immediate in the empty home of the VM.

Looking at Session Bus with Bustle, I see repeated org.a11y.Bus.GetAddress calls. If I install accessibility bus with

  services.gnome.at-spi2-core.enable = true;

the window will appear just after ~4 seconds, though the unending loading persists (though it does not seem to when I do not start the metacity WM 😵‍💫).

Will try to install the other services I can see accessed in Bustle.

@coreyberla
Copy link

coreyberla commented Nov 19, 2022

There's a bunch of performance improvements for list view here. I wouldn't have expected performance (in 43.0) to be as bad as some are seeing in this thread.

https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/988

It would be interesting to hear whether the problems in this thread are in Grid View, List View, or both.

@asbachb
Copy link
Contributor

asbachb commented Nov 19, 2022

@coreyberla Grid View seems to be much faster for my use case:

  • Grid View (5s for opening home)
  • List View (13s for opening home)

@coreyberla
Copy link

That branch should bring the List View / Grid View performance roughly in line. In 43.0 we are creating tons of unnecessary objects for the invisible columns in List View.

5 seconds is still slower than I'd expect. For me launching nautilus (completely fresh) takes 1 second. I'm opening straight into a large folder of 500 items.

You can use nautilus -q to quit any existing sessions (instead of killing the process)

@asbachb
Copy link
Contributor

asbachb commented Nov 19, 2022

I assume there's something else going on. I made a video for clarification: https://www.youtube.com/watch?v=tlY5D2fSWFQ

@jtojnar
Copy link
Member

jtojnar commented Nov 19, 2022

@asbachb Could you try enabling

services.gnome.at-spi2-core.enable = true;

@asbachb
Copy link
Contributor

asbachb commented Nov 19, 2022

@asbachb Could you try enabling

services.gnome.at-spi2-core.enable = true;

That works for me!

@svobot
Copy link

svobot commented Nov 19, 2022

I think I'm also experiencing this issue, my view turns empty, but there is no "Loading..." status message. My Adwaita-themed mouse cursor has the spin wheel though. While waiting for the folder view to populate, btop is reporting a CPU spike on a command: /nix/store/niilird1fzdny4w6rmc0agw2gnm7dh9z-dbus-1.14.4/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only. Hope this can be helpful.

@jtojnar
Copy link
Member

jtojnar commented Nov 19, 2022

@svobot Could you try running dbus-monitor --session (or bustle for a more clean view) of the D-Bus traffic?

@svobot
Copy link

svobot commented Nov 19, 2022

Running dbus-monitor --session and opening a folder with 50 items in a nautilus window results in thousands (circa 4000) errors like this:

method call time=1668901279.916648 sender=:1.25 -> destination=org.a11y.Bus serial=120174 path=/org/a11y/bus; interface=org.a11y.Bus; member=GetAddress
error time=1668901279.916670 sender=org.freedesktop.DBus -> destination=:1.25 error_name=org.freedesktop.DBus.Error.ServiceUnknown reply_serial=120174
   string "The name org.a11y.Bus was not provided by any .service files"

I can see that's the error mentioned in the description of the services.gnome.at-spi2-core.enable option.

Here's also Bustle recording of the same thing:
bustle recording.zip

@jtojnar
Copy link
Member

jtojnar commented Nov 20, 2022

@svobot Then please try to enable services.gnome.at-spi2-core.enable = true;

And I would ask everyone else to do the same.

I discovered one more issue that could be causing it (possibly related to mesa/llvmpipe driver in qemu) but hopefully, for most of you all, it will be just the accessibility bus.

@p4block
Copy link

p4block commented Nov 20, 2022

Enabling service fixes the issue on my NixOS laptop. I used to use NO_AT_BRIDGE=1 to supress the missing accessibility bridge errors various gnome apps spewed to cli when running, seemes like it doesn't work anymore in Gnome 43. Got renamed(?)

@con-f-use
Copy link
Contributor Author

con-f-use commented Oct 29, 2023

just wanted to say, that my theming-issue was not fixed with 2fedbba (performance is fine now) and that I can circumvent the theming problem by running:

nautilus -q
env GTK_THEME=Arc-Dark nautilus   # (or any other name of an installed gtk theme)

Following message from nautilus in terminal might be related:

(org.gnome.Nautilus:271638): Adwaita-WARNING **: 22:08:04.440: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead.

alternate workaround: in dconf-editor set org.gnome.desktop.interface color-scheme to prefer-dark and gtk-theme to the theme's name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 6.topic: GNOME GNOME desktop environment and its underlying platform
Projects
None yet
Development

No branches or pull requests

9 participants