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.
Native Wayland for Firefox
Since Firefox 121.0, it uses Wayland by default if available, but NOT for pre-installed Firefox Snap package in my case.
To enable it for Snap package, either open terminal and start Firefox with Wayland from terminal:
env MOZ_ENABLE_WAYLAND=1 /snap/bin/firefox
Or, open “Files” (Nautilus file browser), press Ctrl+H then find out and edit the .profile file.
When the file opens in text editor, add the line below in the end and save it.
export MOZ_ENABLE_WAYLAND=1
To apply the change, you need to log out and back in.
Thank you for the article
Can you please, make guide on – How to create a own web browser using Chromium source in Ubuntu.
this one helped me out. i had an issue where the ctrl+s menu would become unclosable, but doing this fixed it.