121 words
1 minute
Using Google Chrome/Chromium with native Wayland backend in Arch Linux
Updates
- Oct. 28, 2021: The bug mentioned in the Sep. 22 update has been fixed.
- Sep. 22, 2021: There was a bug affecting Wayland Chrome/Chromium/Electron in the latest Sway/wlroots (i.e., the latest git commit). See https://github.com/swaywm/wlroots/issues/3168 and https://bugs.chromium.org/p/chromium/issues/detail?id=1246834. Before the bug was resolved, the workaround was to use the released versions of Sway/wlroots or just wait.
In the past, we may need to use XWayland when using Google Chrome or Chromium under the Wayland environment. But now (as of 01/04/2021), it’s possible to use native Wayland with Google Chrome/Chromium and even Electron-based apps if they are installed through the official repository or AUR. Just launch Google Chrome/Chromium with two additional flags:
$ google-chrome-stable --enable-features=UseOzonePlatform --ozone-platform=waylandor
chromium --enable-features=UseOzonePlatform --ozone-platform=waylandIt’s the same for Electron-based apps:
<app executable> --enable-features=UseOzonePlatform --ozone-platform=wayland
Written content, images, and videos in this post are licensed under CC BY-NC-SA 4.0
. Code snippets are licensed separately under BSD 3-Clause
.