Enable Wayland Support for Firefox/Chrome in Ubuntu 22.04 for Better Experience

Last updated: September 9, 2022 — 2 Comments

Running Ubuntu 22.04 with the default Wayland session? You can switch your web browser’s backend to get even faster and smoother experience.

Firefox, Google Chrome and Chromium based web browsers do have native Wayland support, but they still use X11 as backend in Ubuntu desktop.

Since Ubuntu 22.04 by default logs into Wayland session, user can also change the web browser’s backend to get faster and smoother browsing experiences. I didn’t run any benchmark. But after switching to Wayland, my browser now has:

  • obviously better touchpad scrolling
  • 2-finger spread/pinch gestures to zoom in/out

Enable Wayland for Chrome/Chromium

For Google Chrome, Chromium and their based web browsers, e.g., Edge, Vivaldi, just type chrome://flags/ in address bar and hit Enter.

When the page opens, search for Preferred Ozone platform and use the dropdown menu to set it value to “Wayland“. Finally, click “Relaunch” button to apply change by restarting the web browser.

Chrome enable wayland

Native Wayland for Firefox

For firefox web browser, user need to edit the “/etc/environment” config file.

First, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to open the file via gedit text editor:

sudo gedit /etc/environment

Replace gedit with your favorite text editor, such as gnome-text-editor for next Ubuntu 22.10 & Fedora.

When the file opens in text editor, just add a new line:

MOZ_ENABLE_WAYLAND=1

As the screenshot shows, you can also add more rules into this config file:

  • MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 – to fix a slightly laggy, slightly sloppy mouse response issue.
  • CLUTTER_PAINT=disable-dynamic-max-render-time to get a smoother frame rate.

After saving the changes in the config file, restart your computer to take effect!

via: Ubuntu Discourse

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to remind me outdated tutorial! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1

2 responses to Enable Wayland Support for Firefox/Chrome in Ubuntu 22.04 for Better Experience

  1. Thank you for the article

  2. Can you please, make guide on – How to create a own web browser using Chromium source in Ubuntu.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.