| by Arround The Web | No comments

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

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

Share Button

Source: UbuntuHandbook

Leave a Reply