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
Firefox stutters when not set as default browser #94502
Comments
I should mention nixos-unstable-small is not a good choice for user of a graphical environment. This is because the tests that run in order for that channel to advance are much fewer, and while this makes it advance faster (and nixos-unstable can be frequently blocked), this means tests like the gnome3 tests could fail and the environment could be broken. Just thought I should mention this. |
I just recently started using NixOS and am running into the same issue, except it still occurs even when my default browser is set to Firefox. |
Also, good that you specified the wayland session. I wonder what session @vorot93 was using. Anyways, I will try to reproduce this with those versions. |
happens to me even on X. Firefox is set as my default browser but the checkbox is greyed out because my "configuration is mangered by [my] organization" (configured via home-manager) . |
I have this issue as well (running on gnome3, both X11 and Wayland). I found that when the freeze happens Firefox runs The code that does this check when running on Gnome is here. The code only runs xdg-settings if Firefox is running as a snap, which is determined by checking if the SNAP_NAME env var is set to "firefox". I tried removing SNAP_NAME from the Firefox environment, and this stopped any calls being made to xdg-settings. This is one possible workaround but I don't know if it will break something else. I tried setting "browser.shell.checkDefaultBrowser" to false in about:config, which should stop Firefox from performing the default browser check on startup. However, this did not seem to work. Possibly related #65679 . I found that xdg-settings is calling xdg-mime, and this command is very slow on my system:
I enabled debug logging with XDG_UTILS_DEBUG_LEVEL=2, which shows xdg-mime is searching about 100 files, running grep on each one of them. This is probably why it is slow. The first file searched is ~/.config/mimeapps.list, which on my system has no entries. If you open Gnome3 Settings -> Default Applications, then change your default web browser to anything other than Firefox, then change it back to Firefox, entries will be added to ~/.config/mimeapps.list like this:
After doing this, xdg-mime completes in 0.01 seconds, and the freezes in Firefox are gone. To reproduce this issue I suggest deleting ~/.config/mimeapps.list then checking how long |
Firefox kept freezing on startup, opening preferences, interacting with address bar, etc.
Profiler output:
https://share.firefox.dev/2PhbAqx
Apparently freezes happened because of code responsible for checking default browser.
After setting Firefox as default browser the freezes went away.
After deleting
~/.config/mimeapps.list
Firefox started freezing again.nixos-unstable-small, Firefox 79, GNOME 3.36.4
The text was updated successfully, but these errors were encountered: