Firefox tips for Fedora 31

Fedora 31 Workstation comes with a Firefox backend moved from X11 to Wayland by default. That’s just another step in the ongoing effort of moving to Wayland. This affects GNOME on Wayland only. This article helps you understand some changes and extra steps you may wish to take depending on your preferences.

There is a firefox-wayland package available to activate the Wayland backend on KDE and Sway desktop environments.

The Wayland architecture is completely different than X11. The team merged various aspects of Firefox internals to the new protocol where possible. However, some X11 features are missing completely. For such cases you can install and run firefox-x11 package as a fallback.

If you want to run the Flash plugin, you must install the firefox-x11 package, since Flash requires X11 and GTK 2. Wayland also has a slightly different drag and drop behavior and strict popup window hierarchy.

Generally, if you think Firefox is not behaving like you want, try the firefox-x11 package. In this case, ideally you should report the misbehavior in Bugzilla.

The Wayland architecture comes with many benefits, and overcomes many limitations of X11. For instance, it can deliver smoother rendering and better HiDPI and screen scale support. You can also enable EGL hardware acceleration on Intel and AMD graphics cards. This decreases your power consumption and also gives you partially accelerated video playback. To enable it, navigate to about:config, and search for layers.acceleration.force-enabled. Set this option to true and restart Firefox.

Brave users may wish to try the Firefox next-generation renderer, called WebRender, written in Rust. To do that, search for gfx.webrender.enabled and gfx.webrender.all in about:config. Set them to true, then cross your fingers and restart Firefox.

But don’t worry — even if Firefox crashes at start after these experiments, you can launch it in safe mode to reset these options. Start Firefox from a terminal using the following command:

$ firefox -safe-mode
Fedora Project community

51 Comments

  1. Anony

    Sadly Firefox on Wayland feels way too slow and stutters all the time for me… (no matter if ran on XWayland or natively)

    • Martin Stransky

      We surely want to investigate it – do you mind to file a bug at bugzilla.redhat.com and attach content of about:support there?
      Thanks.

    • Baptiste Mille-Mathias

      Sadly Firefox on Wayland feels way too slow and stutters all the time for me… (no matter if ran on XWayland or natively)

      Did you report that to Firefox or Fedora developers ?

  2. Baptiste Mille-Mathias

    Hi Martin,

    I take the opportunity of your post to thank you warmly about the work you’ve put in the last years on Wayland integration in Firefox.

    • John O'Dwyer

      Just want to echo the comments above from Baptiste.

      Great to have firefox running natively on Wayland. I find the performance is fantastic and it looks great on HIDPI.

      Thank you Martin!

      • Jan Vlug

        Yes, thanks for the work to make Firefox running on Wayland. I really appreciate this work on HIDPI with fractional scaling. Thank you Martin.

  3. Baptiste Mille-Mathias

    The Firefox logo is the old old one (not used since 2017) according https://fr.wikipedia.org/wiki/Logos_de_Mozilla_Firefox (Page only in French)

  4. Ph0zzy

    What about Firefox’s flatpack? Does it also use Wayland? Is it also possible to have a hardware acceleration there?

  5. Heinrich

    Is there anything similar coming for Thunderbird?

  6. Vinod Pukale

    Whether it is possible for Firefox to post .rpm or .deb files directly in their website once new update gets released? Because google chrome/chrome immediately update gets released in repositories as soon as update is released from Google/Chrome respectively.

    But in case of Firefox we need to wait until update gets released in repositories

    • Martin Stransky

      Yes it’s due to fedora update system. But you can download them from testing by:
      dnf update firefox –enablerepo=updates-testing

  7. If I run Firefox Nightly on Fedora 29 and I turn on WebRender, my entire Firefox window is transparent and I don’t know how to fix that. LOL

    If I set layers.acceleration.force-enabled to true, the text looks horrible until I go to the Nvidia X Server Settings and set AntiAliasing to 16x (4xSS,4xMS).

    Intel I7-7700K, 32GB DDR4, 500GB SSD, Nvidia RTX 2070 w/ 435.21 drivers

    • Luke

      This post is about “Firefox tips for Fedora 31“.

      But this is your setup:

      Firefox Nightly (daily development branch unstable)
      Fedora 29 (deprecated, 2 releases old)
      nVidia GPU (infamously bad Wayland support especially on very old OS stack)

      and you complain about Wayland?! What is wrong with you?

  8. Mehdi

    Any plans to host a repo for Firefox Developer Edition?

  9. Mehdi

    Does Firefox use Wayland even if one has switched to Gnome on Xorg?

  10. I just turned on all the speeds πŸ™‚

    It works.

    Thank You for the tips and informations.

  11. Constantine

    I’m still on Fedora 30. I have “Firefox” and “Firefox on Wayland”. I use “Firefox on Wayland” under Gnome-Wayland.
    After upgrade it will be “Firefox” (Firefox on Wayland) and “Firefox X-11” (Firefox) or what?

    • Martin Stransky

      After upgrade:
      firefox – auto-configured, on Wayland under Gnome/Wayland, X11 otherwise
      firefox-wayland – always wayland if wayland is available (KDE/sway…)
      firefox-x11 – always X11 is X11 is available

  12. G. Fernandes

    Auto fill has stopped working in Firefox. I now have to cut and paste the user-name/password from KeePass, into the fields on the web-site.

    Previously, the KeePass key-combination: Cntrl-Shift-V would auto-fill the login form for me.

  13. bwat47

    For touchpad users I would also suggest enabling apz.gtk.kinetic_scroll.enabled in about:config

    If you’re using wayland, this will enable kinetic touchpad scrolling in firefox (so it behaves like scrolling in native gtk apps like epiphany)

  14. Rohan

    Hey, I tried firefox on wayland but my keepassxc auto-type doesnt seem to work with firefox wayland, is there any fix for it? I tried googling but no solutions

  15. Ivan

    In my case dropdown menu “>>” is not working under Wayloand. It just doesn’t open.

  16. Talib Pierson

    Firefox takes a long time to start up, I can no longer drag tabs into new windows, and new windows take a long time to open on a mostly fresh install.

  17. Ananda Amatya

    Will Firefox- x11 work on fedora 30 in 32 bit architecture like the IBM Thinkpad T43? I would like to experiment with it before trying it on my Fedora 31 in 64 bit Lenovo Thinkpad. If so where can I find information on doing so.

    • Luke

      Firefox in Fedora 30 is “Firefox-x11”.
      On F31 Gnome “Firefox-wayland” became Firefox (default one)

      You can safely experiment with different Firefox settings (and different Firefox builds like -x11 on your new laptop and new Fedora).
      If anything goes wrong you can just run

      firefox -safe-mode

      from terminal and revert your config changes or reset entirely to defaults (about:support -> Refresh firefox)

    • I guess you’re limited by RAM on such box, 4GB may be a minimum to use it somehow.

  18. Derek

    On a fresh Fedora 31 install with KDE plasma, Firefox 70 freezes the entire machine after a few seconds. The screen, all keys, mouse, everything frozen and a power-cycle is necessary.

    This article says “There is a firefox-wayland package available to activate the Wayland backend on KDE and Sway desktop environments.” So that makes me think I need to find that package and install, but Google won’t reveal the location of the mysterious firefox-wayland package.

    I’m a bit surprised that the browser could take down the entire machine…so not sure if this is a Fedora issue or a Firefox issue.

    • You can install it by ‘dnf install firefox-wayland’ and there may be something in your log (use journalctl -b -1 on terminal to see log from your last boot).

  19. In case someone wants to apply the

    about:config

    tweaks from

    bash

    , one may use the following:

    printf "user_pref('layers.acceleration.force-enabled', true);\nuser_pref('gfx.webrender.enabled', true);\nuser_pref('gfx.webrender.all', true);" >> ~/.mozilla/firefox/*.default-release/prefs.js
  20. Luke

    Default Firefox (Wayland on Wayland Gnome) works wonderfully. Never seen such smooth Linux desktop. Firefox scrolling is Apple smooth now!

    Waiting for default OpenGL+WebRender

  21. Amazing work! The new scrolling mechanism is way better than the old one with Wayland.

  22. Luya Tshimbalanga

    Firefox on Wayland with both hardware acceleration and webrender enabled runs well with both use of touch screen and stylus. One needed enhancement is the menu and interface which automatically adjust the space item upon touching.

  23. david

    FIREFOX TIP NO.1 – the most important and NOT even mentioned! (see below)

    SAVE YOUR SANITY!!! (SOLUTION HERE) – browser not playing or supporting MP4 / H.264 videos “not supported” .

    I upgraded to Fedora 31, and I have had so much trouble with Firefox and chromium – playing videos in YouTube and various other sites.

    For now, let me save you sometime and sanity.

    Ignore all the nonsense people are posting about solutions for your browser not playing YouTube videos, HTML5, MP4 etc blah blah.

    Just install ‘ VLC PLAYER ‘ .. directions and easy install info is here > https://www.videolan.org/vlc/download-fedora.html (very easy linux install)

    It will install all necessary codecs and all browsers will now play all VIDEOS! YES EVEN MP4 ! …yeesh.

    I tried so many stupid ‘solutions’ all over the internet, and they did not work. Luckily a bright chap mentioned this and it works!

    I am really angry at this latest Fedora update to 31 … not only did it utterly destroy my system and I had to do an emergency reinstall and wipe, lost private PGP keys, lost access to my encrypted master files.. and more… but hey that is for another time…

    … and then all this carry on with browsers.

    What a mess!

    I have serious doubts about fedora now, the past few months have been utter hell! (and this come from a guy who works in IT)

  24. arthas

    Are there any plans for adding smooth gestures like Safari has (on Mac) or Chromium browsers have (on Windows and Mac). Smooth gestures like swipe to go back and forward, pinch zooming and so on? Considering that we get such gestures in other native GNOME apps on Wayland, can the same be done on Firefox as well?

    • Martin Stransky

      I have very little knowledge about this area and what’s needed. Please file it at bugzilla.redhat.com for tracking and we can work on that later.

  25. Andre Charlier

    I have installed both Fedoras 30 and 31 on my HP N15 laptop computer, and I tried them one at a time.
    In both F 30 and F 31, the Boot Image always crashed at bootup.
    Both F 30 and F 31 got into a habit of crashing frequently. The crashes were recoverable, but annoying. They were in both programs traced to Kernel 5.
    I have tried and used other programs which use Kernel 5, for instance MX Linux 19, Open SUSE 15, and Ubuntu 19. There have been no crashes whatsoever.
    I want to point out that I have never had any problem with Fedora 29 WS, which I deem the best Fedora ever

  26. young_voter

    How come this Wayland stuff takes so long to completely implement properly. It should just be done and just works. No need for any workaround or tutorial.

Comments are Closed

The opinions expressed on this website are those of each author, not of the author's employer or of Red Hat. Fedora Magazine aspires to publish all content under a Creative Commons license but may not be able to do so in all cases. You are responsible for ensuring that you have the necessary permission to reuse any work on this site. The Fedora logo is a trademark of Red Hat, Inc. Terms and Conditions