8

After upgrading from Ubuntu 24.04 LTS to 24.10, Nautilus (Files) has stopped working entirely on X11. It still runs fine on Wayland, but using Wayland with an NVIDIA setup causes a host of other issues for me, so I'd prefer to stick with X11.

Here’s the error message I get when I try to launch Nautilus on X11:

aras@aero:~$ nautilus
** Message: 02:17:54.912: Connecting to org.freedesktop.Tracker3.Miner.Files

(org.gnome.Nautilus:8208): Adwaita-WARNING **: 02:17:54.981: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead. MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:763: FINISHME: support YUV colorspace with DRM format modifiers MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:794: FINISHME: support more multi-planar formats with DRM modifiers

(org.gnome.Nautilus:8208): Gdk-WARNING **: 02:17:55.190: The program 'org.gnome.Nautilus' received an X Window System error. This probably reflects a bug in the program. The error was 'BadMatch (invalid parameter attributes)'. (Details: serial 1128 error_code 8 request_code 149 (unknown) minor_code 4) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.)

So far, I’ve tried the following steps without success:

  1. Deleted Nautilus config and cache:
rm -rf ~/.config/nautilus
rm -rf ~/.local/share/nautilus
  1. Reinstalled Nautilus:
sudo apt install --reinstall nautilus
sudo apt --fix-broken install
  1. Removed and purged Nautilus, then reinstalled:
sudo apt remove --purge nautilus
sudo apt install nautilus
  1. Reset Nautilus settings:
dconf reset -f /org/gnome/nautilus/
  1. Reset ownership of the home directory:
sudo chown -R $USER:$USER ~

Here is a snippet from journalctl -xe | grep nautilus that may offer more context:

Oct 16 02:15:07 aero nautilus[6384]: Connecting to org.freedesktop.Tracker3.Miner.Files
Oct 16 02:15:32 aero nautilus[6384]: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead.
Oct 16 02:15:32 aero gnome-shell[5939]: DING: GNOME nautilus 47.0
Oct 16 02:17:44 aero nautilus[7866]: Connecting to org.freedesktop.Tracker3.Miner.Files
Oct 16 02:17:44 aero dbus-daemon[5168]: [session uid=1000 pid=5168] Activating via systemd: service name='org.freedesktop.portal.Desktop' unit='xdg-desktop-portal.service' requested by ':1.115' (uid=1000 pid=7866 comm="/usr/bin/nautilus --gapplication-service" label="nautilus (unconfined)")
Oct 16 02:17:44 aero nautilus[7866]: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead.
Oct 16 02:17:44 aero nautilus[7866]: The program 'org.gnome.Nautilus' received an X Window System error.
Oct 16 02:24:12 aero nautilus[12984]: Connecting to org.freedesktop.Tracker3.Miner.Files
Oct 16 02:24:12 aero nautilus[12984]: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead.
Oct 16 02:24:12 aero nautilus[12984]: The program 'org.gnome.Nautilus' received an X Window System error.

Edit: I just noticed App Center (snap-store) doesn't work either, with the following error:

Unable to create a GL context

aras@aero:~$ snap-store
Gtk-Message: 04:21:24.771: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.

(snap-store:13004): Gtk-WARNING **: 04:21:24.826: GTK+ module /snap/snap-store/1218/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded. GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported. Gtk-Message: 04:21:24.826: Failed to load module "canberra-gtk-module"

(snap-store:13004): Gtk-WARNING **: 04:21:24.827: GTK+ module /snap/snap-store/1218/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded. GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported. Gtk-Message: 04:21:24.827: Failed to load module "canberra-gtk-module"

(snap-store:13004): Gdk-CRITICAL **: 04:21:24.859: gdk_gl_context_make_current: assertion 'GDK_IS_GL_CONTEXT (context)' failed

** (snap-store:13004): WARNING **: 04:21:24.859: Failed to initialize GLArea: Unable to create a GL context

** (snap-store:13004): CRITICAL **: 04:21:26.243: void fl_keyboard_manager_sync_modifier_if_needed(FlKeyboardManager *, guint, double): assertion 'FL_IS_KEYBOARD_MANAGER(self)' failed

Save and download dialogs in Chrome and Brave don't show up.

I am currently using Nvidia 560.35.03 open which is recommended by Ubuntu. If I switch to Intel graphics using sudo prime-select intel then everything is fine, so I am pretty sure this is Nvidia related.

Edit (Oct 25) As a temporary workaround we can force Gnome to use software rendering for Nautilus, of course this is not the solution but at least with this we should be able to use Nautilus and File Dialog in Chrome and Brave: Add this line to the end of /etc/environment file: GSK_RENDERER=cairo

Any ideas on what could be causing this and how to fix it? Thanks in advance!

Aras
  • 81
  • I have the same problem. Files lags too much to be usable, but Thunar file manager works perfectly with X11. My research at Ask Ubuntu suggested that Wayland + NVIDIA graphics is compatible in Ubuntu 24.10 only with the nvidia-driver-560 proprietary graphics driver from the default Ubuntu repositories. nvidia-smi command will show you what NVIDIA driver version you are currently using. ubuntu-drivers devices will tell you if the nvidia-driver-560 proprietary graphics driver is compatible with your graphics card – karel Oct 16 '24 at 02:30
  • 1
    Thanks @karel . I added more information to the question. There is a noticeable delay right after boot for pretty much everything, including launching the terminal. I possibly can not switch to Wayland because I have 2 monitors and Wayland opens the Pandora's box to a whole new set of issues. This is the first time after 15 years that my upgrade fails like this, it's sad to see Ubuntu in the current situation, release after release. – Aras Oct 16 '24 at 02:31
  • Same here. journalctl --no-pager --grep nautilus; shows NVRM: Xid (PCI:0000:07:00): 13, pid=24365, name=nautilus, Graphics Exception: ChID 0015, Class 0000c997, Offset 00000000, Data 00000000. Very frustrating. Sometimes when I open nautilus, it freezes and I have to force exit. – Matheus Oct 16 '24 at 12:50
  • 2
    Does nautilus work if you do nautilus -q then GSK_RENDERER=cairo nautilus? – Khalid Abu Shawarib Oct 22 '24 at 20:41
  • @KhalidAbuShawarib Yes it does! and after executing GSK_RENDERER=cairo nautilus the weird bug mentioned for Chrome and Brave are gone too. Thank you so much! What is going on? I think I should set this as default somehow. – Aras Oct 23 '24 at 19:09
  • 1
    Either your drivers are messed up or GTK is choosing a wrong backend. Try to start with GSK_DEBUG=renderer GDK_DEBUG=vulkan,misc VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation nautilus after quitting with nautilus -q and show the output. – Khalid Abu Shawarib Oct 23 '24 at 20:41
  • @Aras I have exactly this problem after upgrading too, down to the Gdk dump message. If you file a bug on Launchpad, please let me know and I'll thumb it up! – Keeley Hoek Oct 24 '24 at 03:04
  • @KeeleyHoekI will add a workaround in my original post for now and wait for a week, if this issue doesn't get resolve we can file a bug report on Launchpad or Gnome's platform, or NVIDIA. – Aras Oct 24 '24 at 23:22
  • I have the exact same problem. I've been trying to use Nightly in parallel to see if the fix is coming. It seems more stable but still crashes occasionally. The mainline Files seems to freeze up regularly after resuming from suspend. – Dan Oct 31 '24 at 21:57
  • Any news on this problem??? – FedKad Nov 22 '24 at 14:25
  • 1
    @FedKad sadly no fix so far, I have installed all the available updates to involved components in this problem and there are no improvements. – Aras Nov 24 '24 at 16:24
  • 1
    Unfortunately, I have not found a solution for this either and it's becoming very frustrating. If I don't kill -9 my nautilus after using it, the window will be frozen after an extended period of time. Did anybody file a bug for this yet? I'd like to follow it. – Dan Jan 23 '25 at 21:20
  • @Dan we haven't reported the bug yet, I think we should. – Aras Jan 27 '25 at 22:46
  • 1
    I've been doing some testing with GSK_RENDERERs. The bug exists with "ngl" and "vulkan". It's gone with "gl" and "cairo". Unfortunately, the performance hit in games is too large to use those last two so I'm still searching for a solution. – Dan Jan 28 '25 at 23:53
  • Yes, the problem exists only when hardware rendering is activated. Software rendering is just too slow. For gaming for for everything else. – Aras Feb 02 '25 at 15:41
  • Reported bug: https://bugs.launchpad.net/snapd/+bug/2088456 – Aras Feb 02 '25 at 15:59
  • This one looks similar https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/2084309 – Alexander K Feb 05 '25 at 22:03
  • The xorg startup delays after login you mentioned are in launchpad bug 2042301. You can join that bug, if you wish. Have you tried the Nvidia 565 driver (from the graphics-drivers ppa)? – ubfan1 Feb 10 '25 at 03:34

3 Answers3

2

I have the same problem. Files file manager lags too much to be usable, but Thunar file manager works perfectly on X11.

To install Thunar:

sudo apt install Thunar

To show the current default file manager for opening directories:

xdg-mime query default inode/directory

To set Thunar as the default file manager:

xdg-mime default thunar.desktop inode/directory
karel
  • 122,695
  • 134
  • 305
  • 337
  • If Thunar doesn't work please comment. I wrote my own minimalistic GUI file manager, but Thunar works better so I use Thunar. I can show you the code for my file manager which is in my opinion is useful only as a diagnostic tool to determine whether any GUI file manager works properly on your Ubuntu. – karel Oct 16 '24 at 02:40
  • I didn't uninstall the Files app, but I don't use it anymore because it still doesn't work properly in my system. – karel Oct 16 '24 at 03:08
  • I really don't want to install another file manager because this is an issue that needs to be solved, I noticed App Center doesn't work and the download/save option in the Brave browser doesn't show anything. – Aras Oct 16 '24 at 14:18
  • 1
    I think all apps that use Flutter don't work, with the same error mentioned in my question. – Aras Oct 16 '24 at 14:39
  • You don't have to actually use Thunar. Just install Thunar, check if it works properly, and then uninstall it. Otherwise you'll never know how many problems you have. Maybe you have three different problems, maybe only one, and if you don't know it, then we don't know it either. – karel Oct 17 '24 at 11:16
  • I did install Thunar after all because I needed a functioning file manager, all other mentioned issues in my main message still exist. – Aras Oct 17 '24 at 17:07
  • I think maybe I can help with the Brave browser problem. Opera web browser (sudo snap install opera) does just about everything that Brave does plus it is bundled with a free VPN for security, adblock enabled by default, and its own Aria AI chatbot. Try it. If it works maybe I'll be able to answer the next issue on the list. – karel Oct 18 '24 at 00:24
2

I have the same problem with Nautilus in Xorg.

Three workarounds... pick one...

  • run NVIDIA in On-Demand mode in Xorg

  • install Nemo and switch prefs in the "Desktop Icons NG" (DING) extension to use Nemo in Xorg

  • use Wayland with NVIDIA in Performance Mode.

heynnema
  • 73,937
  • 1- When I run NVIDIA in On-Demand mode I can not get 144hz on my second monitor. 2- Yes as a workaround for the file manager you can use anything else, including Thunar, but all the other issues are still there. 3- Wayland is too laggy and unstable, on my 144hz monitor it runs on ~30hz, it's simply unusable.

    I will edit my post and add a temporary workaround that forces Gnome to use software rendering for most programs, that solves the issue with Nautilus and File Dialog for now.

    – Aras Oct 24 '24 at 23:20
  • @Aras I also find that in Xorg, with NVIDIA set to Performance Mode, PLEX (plex-desktop) doesn't work, and Security Center doesn't work. – heynnema Oct 24 '24 at 23:26
  • Any apps implemented using Flutter doesn't work, App Center, Firmware Updater, Security Center... – Aras Oct 24 '24 at 23:29
  • @Aras Is there a way to tell which apps use Flutter? – heynnema Oct 25 '24 at 01:14
  • I don't really know, but they have a specific feel and look. Btw I just learned that Flutter apps on Linux enforce using hardware rendering. I tried FLUTTER_RENDERER=software snap-store but didn't work for me. – Aras Oct 25 '24 at 23:14
0

After GDK_BACKEND=x11 nautilus --no-desktop I got this -

GDK_BACKEND=x11 nautilus --no-desktop
** Message: 15:15:37.858: Connecting to org.freedesktop.Tracker3.Miner.Files

(org.gnome.Nautilus:89106): Gdk-WARNING **: 15:15:38.503: The program 'org.gnome.Nautilus' received an X Window System error. This probably reflects a bug in the program. The error was 'BadMatch (invalid parameter attributes)'. (Details: serial 1005 error_code 8 request_code 149 (unknown) minor_code 4) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.)

After running through ChatGPT it suggested:

It appears that you are still encountering the same BadMatch error when running Nautilus with the GDK_BACKEND=x11 variable set. This error suggests there is a compatibility issue with the GTK (GDK) version, the X11 server or Nautilus itself.

karel
  • 122,695
  • 134
  • 305
  • 337