Wayland
Wayland is a display server protocol. It is aimed to become the successor of the X Window System. You can find a comparison between Wayland and Xorg on Wikipedia.
Display servers using the Wayland protocol are called compositors because they also act as compositing window managers. Below you can find a list of Wayland compositors.
For compatibility with native X11 applications to run them seamlessly, XWayland can be used, which provides an X Server in Wayland.
Requirements
Most Wayland compositors only work on systems using Kernel mode setting. Wayland by itself does not provide a graphical environment; for this you also need a compositor (see the following section), or a desktop environment that includes a compositor (e.g. GNOME or KDE).
For the GPU driver and Wayland compositor to be compatible they must support the same buffer API. There are two main APIs: GBM and EGLStreams.
Buffer API | GPU driver support | Wayland compositor support |
---|---|---|
GBM | All except NVIDIA < 495* | All |
EGLStreams | NVIDIA | GNOME, Weston (with a third-party patch) |
* NVIDIA ≥ 495 supports both EGLStreams and GBM.[1]
Since NVIDIA introduced GBM support, many compositors (including Mutter and KWin) started using it by default for NVIDIA ≥ 495. GBM is generally considered better with wider support, and EGLStreams only had support because NVIDIA did not provide any alternative way to use their GPUs under Wayland with their proprietary drivers. Furthermore, KWin dropped support for EGLStreams after GBM was introduced into NVIDIA.
If you use a popular desktop environment/compositor and a GPU still supported by NVIDIA, you are most likely already using GBM backend. To check, run journalctl -b 0 —grep «renderer for» . To force GBM as a backend, set the following environment variables:
Compositors
See Window manager#Types for the difference between Tiling and Stacking.
Tiling
- Cagebreak — Based on cage, inspired by ratpoison.
- Cardboard — Scrolling compositor, inspired by PaperWM, based on wlroots.
- dwl — dwm-like Wayland compositor based on wlroots.
- Hyprland — A dynamic tiling Wayland compositor that does not sacrifice on its looks.
- japokwm — Dynamic Wayland tiling compositor based around creating layouts, based on wlroots.
- newm — Wayland compositor written with laptops and touchpads in mind (currently unmaintained).
- Qtile — A full-featured, hackable tiling window manager and Wayland compositor written and configured in Python.
- river — Dynamic tiling Wayland compositor inspired by dwm and bspwm.
- Sway — i3-compatible Wayland compositor based on wlroots.
- Velox — Simple window manager based on swc, inspired by dwm and xmonad.
- Vivarium — A dynamic tiling Wayland compositor using wlroots, with desktop semantics inspired by xmonad.
Stacking
- Enlightenment — See Enlightenment#Manually. More Info: [2][3]
- hikari — wlroots-based compositor inspired by cwm which is actively developed on FreeBSD but also supports Linux.
- KDE KWin — See KDE#Starting Plasma.
- Liri Shell — Part of Liri, built using QtQuick and QtCompositor as a compositor for Wayland.
- labwc — wlroots-based compositor inspired by Openbox.
- Mutter — See GNOME#Starting.
- wayfire — 3D compositor inspired by Compiz and based on wlroots.
- Weston — Wayland compositor designed for correctness, reliability, predictability, and performance.
- wio — wlroots-based compositor that aims to replicate the look and feel of Plan 9’s Rio desktop.
Other
- Cage — Displays a single fullscreen application like a kiosk.
- nwg-shell — A GTK-based shell for the sway Wayland compositor.
- kiwmi — A fully programmable Wayland Compositor.
Some of the above may support display managers. Check /usr/share/wayland-sessions/compositor.desktop to see how they are started.
Display managers
Display managers listed below support launching Wayland compositors.
Name | Runs itself on Wayland? | Description |
---|---|---|
GDM | Yes | GNOME display manager. |
greetd | Wayland greeter available | Minimal and flexible login daemon. |
LightDM | No | Cross-desktop display manager. |
Ly | No | TUI display manager written in C |
SDDM | Only with sddm-git AUR | QML-based display manager. |
tbsm | No | Simple CLI session launcher written in pure bash. |
XWayland
XWayland is an X server that runs under Wayland and provides compatibility for native X11 applications that are yet to provide Wayland support. To use it, install the xorg-xwayland package.
XWayland is started via a compositor, so you should check the documentation for your chosen compositor for XWayland compatibility and instructions on how to start XWayland.
- Security: XWayland is an X server, so it does not have the security features of Wayland
- Performance: XWayland has a nearly identical performance to that of X11. In some cases you might notice degraded performance, especially on NVIDIA cards.
- Compatibility: XWayland isn’t fully backward compatible with X11. Some applications may not work properly under XWayland.
NVIDIA driver
Enabling DRM KMS is required. There may be additional information in the official documentation regarding your display manager (e.g. GDM).
Kwin Wayland debug console
If you use kwin , execute the following to see which windows use Xwayland or native Wayland, surfaces, input events, clipboard contents, and more.
Detect Xwayland applications visually
To determine whether an application is running via Xwayland, you can run extramaus AUR . Move your mouse pointer over the window of an application. If the red mouse moves, the application is running via Xwayland.
Alternatively, you can use xorg-xeyes and see if the eyes are moving, when moving the mouse pointer over an application window.
An other option is to run xwininfo (from xorg-xwininfo ) in a terminal window: when hovering over an Xwayland window the mouse pointer will turn into a + sign. If you click the window it will display some information and end, but it will not do anything with native Wayland windows.You can use Ctrl+C to end it.
GUI libraries
The gtk3 and gtk4 packages have the Wayland backend enabled. GTK will default to the Wayland backend, but it is possible to override it to Xwayland by modifying an environment variable: GDK_BACKEND=x11 .
To enable Wayland support in Qt 5 or 6, install the qt5-wayland or qt6-wayland package, respectively.
To run a Qt application with the Wayland plugin [4], use -platform wayland or QT_QPA_PLATFORM=wayland environment variable. To force the usage of X11 on a Wayland session, use QT_QPA_PLATFORM=xcb . This might be necessary for some proprietary applications that do not use the system’s implementation of Qt, such as zoom AUR . QT_QPA_PLATFORM=»wayland;xcb» allows Qt to use the xcb (X11) plugin instead if Wayland is not available.[5]
On some compositors, for example sway, Qt applications running natively might have missing functionality. For example, KeepassXC will be unable to minimize to tray. This can be solved by installing qt5ct and setting QT_QPA_PLATFORMTHEME=qt5ct before running the application.
Clutter
The Clutter toolkit has a Wayland backend that allows it to run as a Wayland client. The backend is enabled in the clutter package.
To run a Clutter application on Wayland, set CLUTTER_BACKEND=wayland .
To run an SDL2 application on Wayland, set SDL_VIDEODRIVER=wayland . SDL_VIDEODRIVER=»wayland,x11″ allows SDL2 to use the x11 video driver instead if Wayland is not available.[6]
To use GLFW with the Wayland backend, install the glfw-wayland package (instead of glfw-x11 ).
The glew-wayland AUR package currently still does not work with a lot of GLEW-based applications, so the only option is to use glew with Xwayland. See FS#62713.
EFL has complete Wayland support. To run a EFL application on Wayland, see Wayland project page.
winit
Winit is a window handling library in Rust. It will default to the Wayland backend, but it is possible to override it to Xwayland by modifying an environment variable: WINIT_UNIX_BACKEND=x11 .
Electron
Wayland support can be activated either using per-application command line flags or more globally using a configuration file.
Command line flags
To use electron -based applications natively under Wayland, the following flags need to be added to your application exec command line (for Electron 20): —ozone-platform-hint=auto .
Missing top bars can be solved by additionally using the following flag: —enable-features=WaylandWindowDecorations . This will typically be necessary under GNOME (supported since electron17).
Use —enable-webrtc-pipewire-capturer to solve electron screen capture problem on Wayland. The capture is based on xdg-desktop-portal .
You can do this for instance by modifying the .desktop file and adding the flags to the end of the Exec= line.
Configuration file
Create or edit the file $
/.config/electron-flags.conf if $
Older Electron versions
electron-flags.conf applies only to the latest version of Electron. Older versions of Electron can be configured using their own electron<version>-flags.conf file. Versioned files can be soft-linked to $
Older versions may also require different flags, depending on the corresponding Chromium version. For example, the following flags work on Electron 13:
The open source implementation of the Java platform OpenJDK, does not yet have native support for Wayland. Until Wakefield, the project that aims to implement Wayland in OpenJDK, is available, XWayland can be used.
Starting with OpenJDK 16, the JRE can dynamically load GTK3 (which has Wayland support), it appears this might be supported according to this discussion. The _JAVA_AWT_WM_NONREPARENTING environment variable can be set to «1» to fix misbehavior where the application starts with a blank screen.
Tips and tricks
Automation
-
( ydotool ) — Generic command-line automation tool (not limited to wayland). Enable/start the ydotool.service user unit. See ydotoold(8) , ydotoold(1) . ( wtype ) — xdotool type for wayland. See wtype(1) . — Python library that works on Windows and Linux with experimental OS X support. Also see the mouse library. ( wlrctlAUR ) — A command line utility for miscellaneous wlroots extensions (supports the foreign-toplevel-management, virtual-keyboard, virtual-pointer)
Remap keyboard or mouse keys
Screencast Wayland windows with X11 applications
alt=»Tango-go-next.png» width=»48″ height=»48″ />This article or section is a candidate for moving to Screen capture#Wayland. alt=»Tango-go-next.png» width=»48″ height=»48″ />
You can share native Wayland windows (or the whole screen/workspace) to the X11 application. For this you need to use xwaylandvideobridge-bin AUR . See Fixing Wayland: Xwayland screen casting for details.
Troubleshooting
Color correction
Slow motion, graphical glitches, and crashes
Gnome-shell users may experience display issues when they switch to Wayland from X. One of the root cause might be the CLUTTER_PAINT=disable-clipped-redraws:disable-culling set by yourself for Xorg-based gnome-shell. Just try to remove it from /etc/environment or other rc files to see if everything goes back to normal.
Remote display
- wlroots (used by sway) offers a VNC backend via wayvnc since version 0.10. RDP backend has been removed [7].
- mutter has now remote desktop enabled at compile time, see [8] and gnome-remote-desktop for details.
- There was a merge of FreeRDP into Weston in 2013, enabled via a compile flag. The weston package has it enabled since version 6.0.0.
- waypipeAUR (or waypipe-gitAUR ) is a transparent proxy for Wayland applications, with a wrapper command to run over SSH
Input grabbing in games, remote desktop and VM windows
In contrast to Xorg, Wayland does not allow exclusive input device grabbing, also known as active or explicit grab (e.g. keyboard, mouse), instead, it depends on the Wayland compositor to pass keyboard shortcuts and confine the pointer device to the application window.
This change in input grabbing breaks current applications’ behavior, meaning:
- Hotkey combinations and modifiers will be caught by the compositor and will not be sent to remote desktop and virtual machine windows.
- The mouse pointer will not be restricted to the application’s window which might cause a parallax effect where the location of the mouse pointer inside the window of the virtual machine or remote desktop is displaced from the host’s mouse pointer.
Wayland solves this by adding protocol extensions for Wayland and XWayland. Support for these extensions is needed to be added to the Wayland compositors. In the case of native Wayland clients, the used widget toolkits (e.g GTK, Qt) needs to support these extensions or the applications themselves if no widget toolkit is being used. In the case of Xorg applications, no changes in the applications or widget toolkits are needed as the XWayland support is enough.
These extensions are already included in wayland-protocols , and supported by xorg-xwayland .
The related extensions are:
Supporting Wayland compositors:
- Mutter, GNOME’s compositor since release 3.28
- wlroots supports relative-pointer and pointer-constraints
- Kwin
Supporting widget toolkits:
- GTK since release 3.22.18.
GTK themes not working
Avoid loading NVIDIA modules
Add __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json as environment variable before launching a Wayland compositor like sway.
Magnifying/surface scaling
Screen magnifying is not solved yet, a pull request was merged mid-2022 providing the protocol wp-surface-scale.
Wayland на замену X Window System
В предыдущем посте мы узнали, почему X Window System — один из самых успешных проектов с открытым кодом в истории, пора заменить на новое решение для графического окружения Linux. В этой же статье мы узнаем, каков из себя Wayland — наиболее вероятный кандидат на замену X.
Глоссарий Wayland
Имеет смысл сначала разобраться с некоторыми определениями и терминологией.
Compositor — Композитный оконный менеджер является одним из центральных понятий Wayland и вокруг него. Нигде толком не определено, что это такое, но термин этот используется так, как будто все всё знают. Во всяком случае на русском языке никакого определения я так и не нашел. К счастью примеры-таки проясняют суть дела. Вот их список в контексте Wayland:
- KWin — дисплейный сервер KDE,
- Mutter — дисплейный сервер GNOME,
- Weston — эталонный композитный менеджер для Wayland,
- Enlightenment — графическая оболочка рабочего стола,
- Marco — оконный менеджер MATE.
Как мы видим, это не что иное как знакомые нам оконные менеджеры, хотя на самом деле нет. Это дисплейные сервера, которые все-таки отличаются по своему функционалу от WM. Первые взаимодействуют с пользовательскими устройствами ввода-вывода, с железом, управляют потоком данных клиентских программ. Вторые же отвечают за отображение окон и их размещение в системе оконного интерфейса.
Иллюстрация со страницы в википедии.
Но сказать, что есть четкая смысловая и терминологическая граница между всему этими серверами, менеджерами и композиторами , было бы обманом. Например KWin является и дисплейным сервером и WM, точно так же как и Enlightenment . Для данной статьи композитный оконный менеджер (в сокращении КОМ) и дисплейный сервер будут эквивалентами термина Compositor.
Композитный менеджер, он же дисплейный сервер может обозначаться еще как композитный оконный менеджер.
Weston — Эталонный дисплейный сервер протокола Wayland. Недавно вышла вторая версия КОМ-а.
EGL — платформонезависимый эквивалент программных интерфейсов OpenGL GLX/AGL/WGL, разрабатываемый Khronos Group. EGL предоставляет инфраструктурный набор для быстрой настройки приложения и инициализации сцены.
- Механизмы для создания областей рендеринга (окно, пиксельная карта, пиксельный буфер), чтобы клиентские API могли на них рисовать и разделять их.
- Создание графического контекста для клиентских API.
- Синхронизация отрисовки клиентскими API а также родными API рендеринга платформы.
EGL в отличие от GLX/AIGLX умеет выполнять лишь direct rendering, в котором приложения через DRI2/DRI3 могут безопасно и быстро получать доступ к видеоаппаратуре минуя X сервер.
GLES — Подмножество OpenGL, разработанное специально для встраиваемых систем — мобильных телефонов, планшетов, компьютеров, игровых консолей.
Архитектура Wayland
Итак, что представляет собой Wayland? Так же как и в случае с X Window System, речь идет о протоколе и его реализации. Wayland — это протокол взаимодействия между КОМ и клиентами, а также его библиотечная реализация в Си. В роли клиента может выступать пользовательское приложение, X сервер или другой дисплейный сервер.
- Цель: радикально упростить графическую среду Linux по сравнению с иксами.
- Использует Unix Domain Sockets, сетевой прозрачности нет.
- Главным образом использует EGL и DRI.
- Устройства ввода-вывода управляются полностью из ядра.
- Распределение буфера и отрисовка полностью на стороне клиента.
На самом нижнем уровне протокола клиент и КОМ синхронизируют сообщения, обмениваются упорядоченными объектами, используя средства IPC библиотек libwayland-client и libwayland-server . На этом уровне не определены способы управления оконным интерфейсом — только сообщения, передаваемые через Unix Domain Sockets, объекты и события.
Объекты создаваемые клиентом представлены структурой wl_proxy , содержащей идентификатор сообщения передаваемого серверу через сокет, void указатель данных и указатель на статичный объект wl_interface . Отправляются сообщения с помощью структуры wl_proxy_marshal .
Wayland — асинхронный протокол, объектно ориентированный и нацеленный на обработку сообщений. Сообщение, передаваемое от клиента серверу, есть вызов, а в обратную сторону — событие. Каждое сообщение состоит из 32-битных слов, значения представлены в порядке следования байтов хоста.
Как взаимодействуют эти блоки?
- Ядро регистрирует событие и отправляет КОМ-у.
- КОМ в своем графе сцены находит окно, которому следует доставить данное событие и он точно знает какой тип трансформации следует применить к объекту. КОМ транслирует экранные координаты в локальные для данного окна путем обратной трансформации.
- Клиент, отрабатывает событие, обновляя область графического интерфейса, производит рендеринг и извещает КОМ об изменениях.
- КОМ собирает с клиентов все данные по территориям, в которых содержимое зависимого буфера отлично от участка поверхности, и затем перекомпонует экран. Далее, дисплейный сервер подгружает новую страницу, с помощью ioctl вызова адресованного KMS.
А как происходит рендеринг? Клиенты самостоятельно производят отрисовку своих окон в отдельном буфере, передавая информацию об обновлениях дисплейному серверу, который комбинирует содержимое буферов разных приложений для формирования итогового вывода с учетом возможных нюансов, таких как перекрытие окон и прозрачность.
Использование Linux с Wayland? Что нужно знать
Многие аспекты Linux дистрибутивов постоянно меняются, но некоторые компоненты существуют уже десятилетия. Одним из таких компонентов является X Window System (известной прежде всего как X), не один год ведется работа по созданию замены, которая будет более быстрой и безопасной. Эта замена — Wayland.
Wayland уже давно появился и некоторые операционные системы на базе ядра Linux приняли его в качестве протокола дисплея по умолчанию. Если у вас еще нет, есть шанс, что это случится совсем скоро. Вот что значит использовать Linux с Wayland.
Что такое Wayland?
Wayland — это протокол, который сообщает программам, как они должны отображаться на вашем экране, основываясь на ваших действиях (таких как перемещение окна или нажатие кнопки). Технически, Wayland не является заменой X-сервера сам по себе — Wayland определяет только способ, которым такой дисплей-сервер должен взаимодействовать с этими приложениями.
Wayland полагается на стороннего разработчика, известного как композитор Wayland, который будет выполнять роль сервера дисплея. Примеры включают в себя Mutter и KWin (соответственно, рабочих столов GNOME и KDE Plasma). Wayland пытается упростить связь с сервером отображения, делая дальнейшую разработку проще и быстрее.
Х существует уже давно и неуклонно продолжает строится. Что касается Wayland, как и многие технологии «будущего», у него есть некоторые недоработки, но наряду с дисплейными серверами, которые его реализуют, Wayland набирает свои обороты. На данный момент, есть несколько вещей, которые нужно знать, чтобы сделать его гораздо более плавным.
Избегайте GTK+ 2 или Qt 4 приложений на Wayland
Большинство приложений Linux, с которыми вы общаетесь ежедневно, написаны для одного из двух графических наборов инструментов: GTK+ и Qt. Эти платформы выступают в роли клиентов для сервера отображения, запрашивая объекты, которые будут отображаться на вашем экране. Тем не менее, эти запросы должны быть поняты в первую очередь и это зависит от набора инструментов.
В результате на рабочих столах Wayland могут работать только некоторые типы программ. Например, программы GTK+ 3 также могут работать правильно. То же самое может быть написано в Qt 5 (инструментарий, на котором основан рабочий стол Plasma).
При этом, если вы попытаетесь открыть, скажем, приложение Qt 4, у вас будет хороший шанс его запустить. Wayland делает это, запуская X-сервер за кулисами, чтобы слушать приложения, которые он не может понять. Однако это может привести к более высокому использованию памяти и немного более низким скоростям. Плюс, есть некоторые вещи, которые этот подход просто не может сделать в данный момент.
Некоторые приложения несовместимы с Wayland
Wayland и X разработаны по-разному, поэтому некоторые приложения, которые работают с X, просто не смогут работать на Wayland.
Рассмотрим приложения, изменяющие цвет экрана, такие как Redshift и f.lux. Эти приложения фильтруют синий свет от вашего дисплея в зависимости от времени суток. Они работают с использованием расширений X, таких как RandR, который предоставляет программам простой способ попросить X изменить отображение вашего экрана.
В то время как Wayland предоставляет средства для воссоздания этой способности, он зависит от каждого композитора Wayland, чтобы фактически реализовать её. Это означает, что хотя одна среда рабочего стола может поддерживать что-то вроде Redshift (например, функцию GNOME Night Light, показанную выше), эта функциональность не обязательно доступна в другом месте.
Вы можете столкнуться с подобными проблемами с программным обеспечением для записи экрана. В качестве функции безопасности сервер отображения Wayland блокирует приложения от записи экрана. Нельзя сказать, что запись экрана на Wayland принципиально невозможна. Разработчики работают над реализацией этой функции другим способом.
Композитор — это необходимость
Композиция — это метод, который помогает предотвратить разрыв экрана и артефакты. Это делается путем сохранения копий вашего дисплея в памяти, обычно с помощью вашей видеокарты. Таким образом, даже если приложения перестают отвечать на запросы, вашему серверу отображения все равно будет с чем работать. Компоновка также обеспечивает анимацию окон и тени.
Wayland разработан, чтобы сделать этот процесс намного более эффективным, чем X, сделав его обязательным. X имеет композитинг в качестве дополнительной функции, через расширение под названием Xcomposite. Но из-за того, как это реализовано, это занимает немного больше времени по сравнению с Wayland.
При этом, композитинг может привести к некоторым проблемам. Композиция приводит к немного более низкой производительности программ, таких как игры. В X большинство рабочих столов выключают композитинг, когда приложение работает в полноэкранном режиме. Но многим Wayland-композиторам все еще нужно это реализовать. Если вы заинтересованы в использовании графически увесистых программ на рабочем столе Wayland, это очень важно иметь в виду.
Nvidia может не работать с Wayland
Более конкретно, если вы используете собственный графический драйвер Nvidia, Wayland, вероятно, не будет работать для вас. Это связано с проблемой композитинга выше. Чтобы заставить этот процесс работать, ваш графический драйвер должен определенным образом общаться с компиляторами Wayland.
Видеокарты Intel и AMD не имеют этой проблемы, поскольку они используют ожидаемый стандарт, называемый GBM (Generic Buffer Management). Nvidia считает, что их способ общения с Wayland, называемый EGL, лучше и поэтому они придерживается этого.
Эта проблема может быть решена двумя способами: драйверы Nvidia реализуют GBM или композиторы Wayland реализуют EGLStreams. В настоящее время Nvidia, похоже, не заинтересована в поиске первого решения.
Как использовать Wayland
На данный момент большинство дистрибутивов Linux дают вам возможность установить Wayland, но по-прежнему используют X по умолчанию. Вы можете выполнить поиск Wayland в репозиториях вашего дистрибутива, выйти из рабочего стола и выбрать Wayland при повторном входе.
Fedora была одним из первых дистрибутивов, которые воспользовались этой тенденцией и уже несколько лет используют Wayland по умолчанию. Fedora известна тем, что использует новейшие технологии, которые могут предложить Linux дистрибутивы и в то же время, весьма удобна в использовании. Но Fedora не одна.
Некоторые дистрибутивы, которые предоставляют Wayland по умолчанию
- Fedora
- Debian
- openSUSE Tumbleweed
- PureOS
- Red Hat Enterprise Linux
- SUSE Enterprise Linux
Почему больше дистрибутивов не переключились? Многие ждут решения еще нескольких вопросов. Многие люди рассчитывают использовать собственный графический драйвер Nvidia, чтобы получить наиболее оптимальный игровой опыт. Некоторые хотят записать свой экран для создания подкастов или потокового видео в интернете.
Учитывая, что сервер отображения не является чем-то, что большинство из нас замечает, дистрибутивы не стремятся создавать такие заметные проблемы в обмен на выгоды, которые, хотя и реальны, существуют в основном за кулисами.
What’s Wayland? Linux’s “New” Display Server
Wayland is the shiny next-generation display server protocol that finally lets the Linux desktop move away from the cludgy abomination that is X. Although it was initially released in 2008, it’s only recently that it has matured enough to the point that Linux distributions have begun to default to it.
History
Ever since 1984, Unix-like operating systems have used the X Window System in order to output contents to a display.
38 years later, it’s still alive and kicking in most Linux computers with all of its outdated features, such as slow compositing, built-in easy keylogging, and a lot of overhead just in case you want to operate your computer over the internet! Even with piled on extension (xrandr) after extension (xrender) and extension (composite), all of the bloat accumulated over time to the point that most of the X.Org server team moved to work on Wayland. As of today, X.Org is in maintenance mode, with few contributions and even fewer contributors because of all of the legacy code and practices that have to be worked with.
And that’s exactly why Wayland was created — to be a simple, modern, and fast display protocol that narrows its scope to focus entirely on displaying windows efficiently and securely. Secondary priorities such as remote desktop, screen sharing, and screen tearing were implemented much later on.
No longer can any window catch every keypress without asking the user! No longer does shutting down the compositor crash nearly every program! No longer can any application decide to take over your screen and wreak havoc because it’s allowed to do literally everything! No longer is workaround after workaround needed to maintain a research project that was never meant to be globally deployed!
Not to mention that because Wayland was designed from the ground up, it supports modern display technologies that X simply isn’t able to due to technical limitations, such as different variable refresh rates over different displays at different resolutions.
Adoption
Both Firefox and Chromium natively support Wayland. The GTK+, Qt, Electron, and SDL toolkits do too, letting thousands of applications “just work” by updating their dependencies.
In fact, the biggest desktop environments already support Wayland and all of its benefits:
- GNOME and KDE Plasma both have great support and even default to it on some distros. is a drop-in replacement for the i3 window manager, if you’re into tiling WMs.
- The Steam Deck uses Wayland to contain and sandbox games in its Gamescope compositor.
In addition, even for legacy apps such as games that can never be updated to support Wayland, a built-in compatibility layer called XWayland is there to run X applications in their very own contained X server. Even so, limitations in XWayland prevent it from being a one-size-fits-all solution to every X application.