Manjaro wayland nvidia kde

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.

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.
  • 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.
  • waymonad — Wayland compositor inspired by xmonad written in Haskell.

Stacking

  • Enlightenment — See Enlightenment#Manually. More Info: [2][3]
  • Greenfield — Runs in a web browser and can display remote applications.
  • Grefsen — Qt/Wayland compositor providing a minimal desktop environment.
  • 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 — reference implementation of a Wayland compositor.
  • 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.
  • Maze Compositor — Renders windows in a 3D maze using Qt.
  • Motorcar — Wayland compositor to explore 3D windowing using virtual reality.
  • nwg-shell — A GTK-based shell for the sway Wayland compositor.
  • kiwmi — A fully programmable Wayland Compositor.

Display managers

Display managers listed below support launching Wayland compositors.

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.

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 a SDL2 application on Wayland, set SDL_VIDEODRIVER=wayland .

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

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 $/electron-flags.conf (defaults to .config/electron-flags.conf if $ is unset) and add the previously mentioned flags (one option per line, with no empty lines):

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 -flags.conf file. Versioned files can be soft-linked to $/electron-flags.conf .

The open source implementation of the Java platform OpenJDK, does not yet have native support for Wayland. Until Wakefield, which is the project that aims to implement Wayland in OpenJDK, XWayland can be used.

XWayland

XWayland is an X server that runs under Wayland and provides backwards compatibility for legacy X11 applications. 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.

Nvidia driver

Enabling DRM KMS is required. There may be additional information in the official documentation regarding your display manager (e.g. GDM).

Tips and tricks

Automation

  • ydotool ( ydotoolAUR ) — Generic command-line automation tool (not limited to wayland). Enable/start the ydotool.service user unit. See ydotoold(8) , ydotoold(1) .
  • wtype ( wtype ) — xdotool type for wayland. See wtype(1) .
  • keyboard — Python library that works on Windows and Linux with experimental OS X support. Also see the mouse library.

Kwin Wayland debug console

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.

Remap keyboard or mouse keys

Troubleshooting

Color correction

Slow motion, graphical glitches, and crashes

Remote display

  • wlroots (used by sway) offers a VNC backend via wayvnc since version 0.10. RDP backend has been removed [6].
  • mutter has now remote desktop enabled at compile time, see [7] 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

Wayland on Manjaro KDE

Intro

So I installed Wayland on my PC and I’ll tell you my journey!

Why?

I got a 4k monitor and now I have a dual-monitor setup with a 4k monitor and a 1080p monitor. The problem: The scaling. X.org doesn’t allow per screen scaling, so everything on my 1080p monitor was good, but everything on the 4k monitor was way too small to be readable. Then I searched in the internet and found out that Wayland can do per monitor scaling so I read a bit more and the main things I found:

If you got a nvidia-gpu, don’t use Wayland, it is just buggy!

Nvidia-gpus aren’t ready for Wayland yet!

But I still did it and even got it! Now I am running Wayland and the per-monitor scaling works!

Should you do it?

Probably not unless you also have 2 monitors with different resolutions. If you just got one monitor or two monitors with the same resolution, it works great but I think it is not worth the work and the time. I mean if you want to support Wayland, do it!

What you’ll do

You’ll install some packages, enable a kernel flag and patch a custom qt-version. That’s it.

Install packages

sudo pacman -Syuu && sudo pacman -S wayland plasma-wayland-session

If you log out now, you can select Wayland as your session, but it crashes immediately.
To prevent this, add a new kernel-parameter

Add the kernel-parameter

GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3 nvidia-drm.modeset=1"

Note: It doesn’t have to look the same for you.

After that, run sudo grub-mkconfig -o /boot/grub/grub.cfg to update grub. Now you should reboot.

Install new qt-version

This also doesn’t seem to be required since the 13th September 2022, with qt5-wayland-version 5.15.5+kde+r38-3 and newer.

Читайте также:  Джилли здесь: раскрываем обаяние этой загадочной личности

You should log out and select at the bottom left wayland as the session. You should see your desktop. If the taskbar is really slow (10-20s from click to action) you’ll need a patched qt-version. It really isn’t that difficult. You’ll just need 2 files. The first is the PKGBUILD:

# Maintainer: Felix Yan <[email protected]>
# Contributor: Andrea Scarpino <[email protected]>

pkgname=qt5-wayland
#pkgver=5.15.2+kde+r54
_basever=5.15.3
pkgver=5.15.3+kde+r40
pkgrel=1
 _commit=118674630cdb5933e66a8b4415afe7c716ad4662
arch=('x86_64')
url='https://www.qt.io'
license=('GPL3' 'LGPL3' 'FDL' 'custom')
pkgdesc='Provides APIs for Wayland'
depends=('qt5-declarative' 'libxcomposite')
makedepends=('vulkan-headers' 'git')
groups=('qt' 'qt5')
_pkgfqn=${pkgname/5-/}
source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit patch2.diff)
sha256sums=('SKIP')
options=(debug)

pkgver() {
  cd $_pkgfqn
  echo "$_basever+kde+r"`git rev-list --count v$_basever-lts-lgpl..$_commit`
}

prepare() {
  mkdir -p build

  pwd
  cd $_pkgfqn
  patch --forward --ignore-whitespace --strip=1 -p1 --batch --input="${srcdir}/patch2.diff"
  cd ..
}

build() {
  cd build

  qmake ../${_pkgfqn}
  make
}

package() {
  cd build

  make INSTALL_ROOT="$pkgdir" install

  # Drop QMAKE_PRL_BUILD_DIR because reference the build dir
  find "$pkgdir/usr/lib" -type f -name '*.prl' \
    -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;

  install -d "$pkgdir"/usr/share/licenses
  ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/${pkgname}
}
sha256sums=('SKIP', 'SKIP')


and the second one is called pacth2.diff:

diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index e1987742..d7a9f36e 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -420,6 +420,21 @@ void QWaylandDisplay::ensureScreen()
 // Called in main thread, either from queued signal or directly.
 void QWaylandDisplay::flushRequests()
 {
+    while (wl_display_prepare_read(mDisplay) != 0) {
+    wl_display_dispatch_pending(mDisplay);
+    }
+    wl_display_flush(mDisplay);
+    // then check if there are any new events waiting to be read
+    struct pollfd pfd;
+    pfd.fd = wl_display_get_fd(mDisplay);
+    pfd.events = POLLIN;
+    int ret = poll(&pfd, 1, 0);
+    if (ret > 0) {
+        // if yes, read them now
+        wl_display_read_events(mDisplay);
+    } else {
+        wl_display_cancel_read(mDisplay);
+    }
     m_eventThread->readAndDispatchEvents();
 }

Conclusion

It’s possible and fairly usable, but there are still many bugs, especially for me with my dual-screen HiDPI-setup and Electron-based applications. All in all, it’s more usable than the x.org-thing without per-monitor scaling.

Отсутствие Wayland сессии в Arch Gnome 40

Manjaro wayland nvidia kde

Всем доброго времени суток, отсутствует wayland сессия в gdm

А как он там должен присутствовать? Обычный GNOME — вяленый.

Manjaro wayland nvidia kde

Manjaro wayland nvidia kde

Ну ок, он хочет рут. Ещё можете попробовать вызвать XDG_SESSION_TYPE=wayland gnome-session напрямую.

Manjaro wayland nvidia kde

Я так понимаю, это нужно делать, отключив de клавишами ctrl + alt + f6

Manjaro wayland nvidia kde

После этой команды ничего не происходит

Manjaro wayland nvidia kde

Что? А вы это делали с запущенным рабочим столом? Это надо делать без графического интерфейса. И ctrl + alt + f6 ничего не отключает, лишь перебрасывает на другую виртуальную консоль.

Manjaro wayland nvidia kde

Manjaro wayland nvidia kde

мдя, нет вейланда — нет проблем

Manjaro wayland nvidia kde

Manjaro wayland nvidia kde

Команда ln -s /dev/null /etc/udev/rules.d/61-gdm.rules не сработала, сессия также x11:(

Manjaro wayland nvidia kde

Подскажите пожалуйста, как временно отключить графический интерфейс

Manjaro wayland nvidia kde

Не запускать его. systemctl disable

Manjaro wayland nvidia kde

После этой команды ничего не происходит

Manjaro wayland nvidia kde

Курите маны, читайте вики, иначе слишком обычный арчешколник выходит. Перезагрузите компьютер.

Manjaro wayland nvidia kde

Если установлены проприетарные драйвера NVIDIA, то никакого Wayland не будет.

Manjaro wayland nvidia kde

Подумайте почему так происходит, что под этой командой подразумевается, что в этих rules должно было быть прописано, кто внёс правку на вики странице.

Manjaro wayland nvidia kde

Будет, но не везде. На гноме как раз и должен быть, но у ТСа что-то не выходит

Manjaro wayland nvidia kde

Если хочешь запустить из GDM — он у тебя помечен как просто GNOME. Wayland уже является дефолтом в нём. GNOME on X11 — сессия на иксах.

Если хочешь запустить из консоли — GDM отруби. После отключения дисплейного менеджера (в нашем случае GDM), помрут все процессы, запущенные из под него, то есть и сессия на GNOME.

Остановить до перезагрузки: systemctl stop gdm

Отключить, чтобы после перезагрузки не включался: systemctl disable —now gdm

Это ^ элементарные команды для работы с systemd, с которыми ArchWiki просит ознакомиться всех новичков.

После этого можешь выполнить XDG_SESSION_TYPE=wayland dbus-run-session gnome-session Или XDG_SESSION_TYPE=wayland gnome-session

Про это сказано на ArchWiki:

Executing gnome-session via dbus may cause issues or not work at all. Running gnome-session directly may work better.

Блог начинающего линуксоида.

советы, руководства, инструкции.

Четверг, 7 сентября 2017 г.

Запуск GNOME on Wayland с проприетарным драйвером Nvidia: История успеха

Manjaro wayland nvidia kde

Итак, свершилось! Мне наконец-то удалось запустить Wayland-сессию GNOME на проприетарном драйвере Nvidia (далее по тексту «блоб»). Для тех, кто не в теме: начиная с версии драйвера 364.12, Nvidia реализовала в нём начальную поддержку Wayland, однако несовместимую с тем, что используется в Mesa. В Mesa применяется библиотека GBM — Generic Buffer Manager, аллокатор буферов изображений. Реализация Nvidia основана на расширениях EGLStreams и EGLDevice, являющихся кроссплатформенным открытым стандартом Khronos (консорциума, разрабатывающего OpenGL, OpenCL, Vulkan и так далее). В списке рассылки разработчиков Wayland, Nvidia представила патчи для композитного менеджера Weston, однако разработчики их не приняли и, можно сказать, послали Nvidia подальше. Зато эти патчи адаптировали для Mutter и Sway, но о качестве работы будет ниже. Nvidia же в прошлом году анонсировала новый аллокатор, разрабатываемый совместно с разработчиками Mesa, уже готов начальный прототип, но работы ещё много. Nvidia не хочет создавать что-то платформоспецифичное, так как ей проще поддерживать единую кодовую базу для всех ОС.

Поддержка EGLStreams обеспечена в GNOME 3.24, однако для этого, оконный менеджер Mutter должен быть собран с —enable-egl-device Как оказалось, в Fedora 26 он собран без этой опции, также из-за применения библиотеки GLvnd, получаются лютые тормоза и лаги мышки. Аналогично в Arch Linux.

Поэтому для тестов я выбрал альфа-версию Ubuntu 17.10. Итак, что для этого нужно проделать:

  • 1) установить драйвер Nvidia (sudo apt install nvidia-375)
  • 2) включить DRM/KMS (по умолчанию в блобе он выключен из-за недоделанности и проблем со SLI-конфигурациями). Для этого в /etc/default/grub, в секцию параметров ядра, добавляем строку nvidia-375-drm.modeset=1 Номер драйвера указывать только для Ubuntu! Признаком успешного запуска DRM/KMS является Xorg, запущенный от юзера (в этом можно убедиться в менеджере процессов)

По идее, если всё сделано правильно, то сразу после перезагрузки Гном должен запуститься на Wayland, однако меня встречало окно входа в систему, и сеанс с Wayland никак не грузился. Поэтому я переключился на пятую tty-консоль (Ctrl+Alt+F5), и стартанул сессию командой dbus-run-session — gnome-shell —display-server —wayland

Manjaro wayland nvidia kde

И о чудо! Оно запустилось! Начну с приятных моментов. Отрисовка значительно быстрее, чем с блобом на иксах. Курсор не отстаёт от окна ни на пиксель, анимации плавненькие, изменение размера окон не тормозит. Может немного лагануть меню приложений, но я грешу на старый тормозной HDD, на котором я всё тестировал. Flatpak-приложения работают, но не все. Видео работает без проблем.

Manjaro wayland nvidia kde

Manjaro wayland nvidia kde

Собственно, на этом приятное заканчивается. Далее оглашаю список ограничений:

1) Первое и самое главное — не работает Xwayland. В большинстве приложений. Из иксовых приложений успешно запустились лишь Firefox, Clementine и Chromium, остальные падают с ошибкой Could not initialize GLX Потому запуск возможен только нативных Wayland-приложений. Чтобы запустить что-то на Qt5, нужно добавить переменную окружения export QT_QPA_PLATFORM=wayland , но тут тоже есть неприятные моменты, связанные с тем что GNOME не поддерживает серверные декорации окон, и потому Qt5-приложения будут рисовать рамку окна своими силами — та самая синяя и убогая рамка окна, без теней и каких-либо отличий активного окна от неактивного, которую вы возможно наблюдали на скриншотах. Поддержка Xwayland не планируется.

Manjaro wayland nvidia kde

Manjaro wayland nvidia kde

Manjaro wayland nvidia kde

2) Не запускается панель управления Nvidia (потому на скриншотах её нет), не работают приложения, использующие веб-камеру (правда я только Cheese запускал), и как следствие предыдущего пункта — не работает ни одна игра (кроме встроенных гномовских) или эмулятор игровых консолей.

3) Иногда грузит CPU на 100%. Баг широко известен в сети, но я не знаю что думает на этот счёт Nvidia. От апстрима Гнома ответа не дождался.

4) KMS работает частично, в частности переключение между виртуальным консолями происходит секунды 2, а возврат в графическую может проходить и все 5. На свободном драйвере всё происходит мгновенно. Да, если вдруг кто спросит — нет, KMS в блобе не даёт высокое разрешение в консоли. Нету драйвера для fbdev, хотя с efifb (на материнских платах с UEFI) вроде как разрешение высокое.

5) Родная панель управления Гнома не работает в такой конфигурации, потому запускается её сильно кастрированный вариант

Manjaro wayland nvidia kde

Итог: по сути Нвидию, по сути, обвинить не в чем. В кое-то веки смогла в стандарты. Вот только сделала она это слишком поздно. Когда в Linux только начиналось появление и становление Wayland, Nvidia от него отвернулась, сказав что поддерживать это в её планы не входит. Как только сообщество всё отладило и реализовало поддержку в свободных драйверах и оконных менеджерах — Nvidia примчалась и сказала что «есть вариант лучше». Вот только лучше не стало, даже наоборот — всплыли многие косяки. Я не думаю что будут какие-либо серьёзные улучшения как работы блоба с EGLStreams, так и оконных менеджеров куда эти патчи добавили, ибо апстрим не принял, и тестировать некому. Хотя посмотрим как оно будет. На данный момент вердикт — неюзабельно.

NVIDIA Graphics with the GNOME Wayland session

This document intends to describe the current state of running the GNOME Wayland session using the proprietary NVIDIA driver.

Current state and limitations

With GNOME 3.32, there is some preliminary support for runnig a Wayland session on top of the NVIDIA drivers.

Hardware acceleration

Compositing

Compositing is done using OpenGL. The EGLSurfaces of each monitor is associated with a monitor using EGLStreams and EGLDevice, meaning the NVIDIA driver itself takes care of handing over buffers after eglSwapBuffers() to the hardware.

Hardware cursor

The cursor is currently drawn using OpenGL, as part of the compositing image.

Accelerated EGL Wayland clients

Native EGL Wayland clients are accelerated, although differently from how EGL clients work when using the open source drivers.

With open source drivers, the EGL driver (usually mesa) hands over hardware buffer handles, either using DMA-BUF handles and a generic DMA-BUF Wayland protocol, or using opaque buffers using a special purpose Wayland protocol.

With the NVIDIA drivers, an EGLStream acts as a channel between a texture in the compositing display server and the client side EGLSurface. A special purpose Wayland protocol implemented in the NVIDIA driver is hooked into GNOME Shell, to manage initiation of these EGLStreams. No explicit buffer passing is done, instead certain protocol events triggers the display server to acquire textures from the EGLStreams.

Non-accelerated Xwayland clients

Xwayland uses accelerated EGLStreams to pass window content of non-accelerated X11 clients, similarly to how it is done with passed hardware buffers when using the open source drivers.

Читайте также:  Откройте для себя мощный и стильный Geely GS6 — меняющий правила игры внедорожников

Accelerated Xwayland clients (GLX)

There is currently no accelerated GLX support when running a GNOME Wayland session no top of the NVIDIA drivers, meaning X11 OpenGL applications will use software rendering.

Context-lost recovery

After suspending, graphics memory may be purged, requiring the display server to recover said memory, usually by reuploading textures and other resources that may have been purged. This is currently not supported when using the Wayland session on top of the NVIDIA driver, but there exists in-progress downstream patches to handle this in RHEL 8.

Monitor configuration

Mode setting

Mode setting is possible, but the current requirement to use dumb buffers during mode setting before establishing the EGLSurface, EGLDevice CRTC stream link, results in memory constraint issues with multiple monitors with higher resolutions.

Monitor mirroring

Monitor mirroring is currently not possible due to the issue that an EGLSurface can only be linked to a single CRTC. The way GNOME Shell currently does monitor mirroring relies on passing the same hardware buffer to multiple CRTCs, which is currently not supported by the API exposed by the NVIDIA driver.

Tiled monitors

Initiatives/Wayland/NVIDIA (last edited 2019-05-15 15:46:12 by JonasAdahl )

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

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.

* 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.

GBM_BACKEND=nvidia-drm
__GLX_VENDOR_LIBRARY_NAME=nvidia

Compositors

See Window manager#Types for the difference between Tiling and Stacking.

  • Cagebreak — Based on cage, inspired by ratpoison.
https://github.com/project-repo/cagebreak || AUR
  • Cardboard — Scrolling compositor, inspired by PaperWM, based on wlroots.
https://gitlab.com/cardboardwm/cardboard || AUR
  • dwldwm-like Wayland compositor based on wlroots.
https://github.com/djpohly/dwl || AUR
https://hyprland.org || AUR
  • japokwm — Dynamic Wayland tiling compositor based around creating layouts, based on wlroots.
https://github.com/werererer/japokwm || AUR
  • newm — Wayland compositor written with laptops and touchpads in mind.
https://github.com/jbuchermn/newm/ || AUR
https://github.com/qtile/qtile ||
  • river — Dynamic tiling Wayland compositor inspired by dwm and bspwm.
https://github.com/ifreund/river ||
  • Swayi3-compatible Wayland compositor based on wlroots.
https://github.com/swaywm/sway ||
  • Velox — Simple window manager based on swc, inspired by dwm and xmonad.
https://github.com/michaelforney/velox || AUR
  • Vivarium — A dynamic tiling Wayland compositor using wlroots, with desktop semantics inspired by xmonad.
https://github.com/inclement/vivarium || AUR
  • waymonad — Wayland compositor inspired by xmonad written in Haskell.
https://github.com/waymonad/waymonad || not packaged? search in AUR

  • Enlightenment — See Enlightenment#Manually. More Info: [2][dead link 2022-09-23 ⓘ] [3]
https://www.enlightenment.org/ ||
  • Greenfield — Runs in a web browser and can display remote applications.
https://greenfield.app/ || not packaged? search in AUR
  • Grefsen — Qt/Wayland compositor providing a minimal desktop environment.
https://github.com/ec1oud/grefsen || not packaged? search in AUR
  • hikari — wlroots-based compositor inspired by cwm which is actively developed on FreeBSD but also supports Linux.
https://hikari.acmelabs.space/ || AUR
  • KDE KWin — See KDE#Starting Plasma.
https://userbase.kde.org/KWin ||
  • Liri Shell — Part of Liri, built using QtQuick and QtCompositor as a compositor for Wayland.
https://github.com/lirios/shell || AUR
  • labwc — wlroots-based compositor inspired by Openbox.
https://github.com/labwc/labwc || AUR
  • Mutter — See GNOME#Starting.
https://gitlab.gnome.org/GNOME/mutter ||
  • wayfire — 3D compositor inspired by Compiz and based on wlroots.
https://wayfire.org/ || AUR
https://gitlab.freedesktop.org/wayland/weston ||
  • wio — wlroots-based compositor that aims to replicate the look and feel of Plan 9’s Rio desktop.
https://wio-project.org/[dead link 2022-09-23 ⓘ] || AUR

  • Cage — Displays a single fullscreen application like a kiosk.
https://www.hjdskes.nl/projects/cage/ ||
  • Maze Compositor — Renders windows in a 3D maze using Qt.
https://github.com/imbavirus/mazecompositor || not packaged? search in AUR
  • Motorcar — Wayland compositor to explore 3D windowing using virtual reality.
https://github.com/evil0sheep/motorcar || not packaged? search in AUR
  • nwg-shell — A GTK-based shell for the sway Wayland compositor.
https://github.com/nwg-piotr/nwg-shell || AUR
  • kiwmi — A fully programmable Wayland Compositor.
https://github.com/buffet/kiwmi || AUR

Display managers

Display managers listed below support launching Wayland compositors.

GUI libraries

See details on the official website.

The and 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 or package, respectively.

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 and setting QT_QPA_PLATFORMTHEME=qt5ct before running the application.

The Clutter toolkit has a Wayland backend that allows it to run as a Wayland client. The backend is enabled in the package.

To run a Clutter application on Wayland, set CLUTTER_BACKEND=wayland.

As of SDL2 version 2.0.22, SDL defaults to preferring Wayland over X11.

Note: Many proprietary games come bundled with old versions of SDL, which do not support Wayland and might break entirely if the use of Wayland is forced with SDL_VIDEODRIVER=wayland. To force the application to run with XWayland, set SDL_VIDEODRIVER=x11.

To use GLFW with the Wayland backend, install the package (instead of ).

The AUR package currently still does not work with a lot of GLEW-based applications, so the only option is to use with Xwayland. See FS#62713.

EFL has complete Wayland support. To run a EFL application on Wayland, see Wayland project page.

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.

Wayland support can be activated either using per-application command line flags or more globally using a configuration file.

Command line flags

Use --enable-webrtc-pipewire-capturer to solve electron screen capture problem on Wayland. The capture is based on .

Use --gtk-version=4 to solve fcitx input issue.

You can do this for instance by modifying the .desktop file and adding the flags to the end of the Exec= line.

Note: Some packages, like AUR (bug report), do not forward flags to Electron, and thus will need the application developer to implement a solution.

~/.config/electron-flags.conf
--enable-features=WaylandWindowDecorations
--ozone-platform-hint=auto

Note: These configuration files only work for the Electron packages in the official repositories and packages that use them. They do not work for packages that bundle their own build of Electron such as AUR. Sometimes alternatives exist such as AUR.

Older Electron versions

~/.config/electron13-flags.conf
--enable-features=UseOzonePlatform
--ozone-platform=wayland

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.

See Debian:Wayland#Java Programs (supported since OpenJDK 16?):

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.

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 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.

Note: Nvidia drivers prior to version 470 (e.g. AUR) do not support hardware accelerated XWayland, causing non-Wayland-native applications to suffer from poor performance in Wayland sessions.

Enabling DRM KMS is required. There may be additional information in the official documentation regarding your display manager (e.g. GDM).

Tips and tricks

  • ydotool () — Generic command-line automation tool (not limited to wayland). Enable/start the ydotool.service user unit. See , .
  • wtype () — xdotool type for wayland. See .
  • keyboard — Python library that works on Windows and Linux with experimental OS X support. Also see the mouse library.
  • wlrctl (AUR) — A command line utility for miscellaneous wlroots extensions (supports the foreign-toplevel-management, virtual-keyboard, virtual-pointer)

Kwin Wayland debug console

$ qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole

Detect Xwayland applications visually

To determine whether an application is running via Xwayland, you can run 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 and see if the eyes are moving, when moving the mouse pointer over an application window.

An other option is to run xwininfo (from ) 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.

Читайте также:  Проблемы Geely: комплексный анализ распространенных проблем и решений

Remap keyboard or mouse keys

See Input remap utilities.

Troubleshooting

See Backlight#Color correction.

Slow motion, graphical glitches, and crashes

  • (used by sway) offers a VNC backend via since version 0.10. RDP backend has been removed [6].
  • has now remote desktop enabled at compile time, see [7] and for details.
  • There was a merge of FreeRDP into Weston in 2013, enabled via a compile flag. The package has it enabled since version 6.0.0.
  • AUR (or AUR) 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 , and supported by .

The related extensions are:

Supporting Wayland compositors:

  • Mutter, GNOME‘s compositor since release 3.28
  • wlroots supports relative-pointer and pointer-constraints

Supporting widget toolkits:

  • GTK since release 3.22.18.

GTK themes not working

Avoid loading NVIDIA modules

Fcitx does not work on Wayland native electron program

Tango-edit-cut.pngThis section is being considered for removal.Tango-edit-cut.png

Reason: Once kwin is out of testing, this can be safely removed. (Discuss in Talk:Wayland)

version 5.26.5 does not support the text-input-v1 protocol. Some electron based applications (vscode, obsdian) do not support GTK4, so the --gtk-version=4 flag will cause crashes.

Как установить Wine в Arch Linux/BlackArch. Что такое и как подключить репозиторий Multilib

Если у вас дистрибутив на основе Debian, то смотрите статью «Как установить Wine в Debian, Kali Linux, Linux Mint, Ubuntu».

Для установки Wine в Arch Linux и его производные необходимо включить подключить репозиторий multilib.

Что такое и для чего нужен multilib

Репозиторий multilib – это официальный репозиторий, который позволяет пользователю запускать и собирать 32-битные приложения на 64-битной версии Arch Linux.

Как включить multilib

Чтобы включить multilib, откройте текстовый файл /etc/pacman.conf:

В нём найдите и раскомментируйте строки (убедитесь, что раскомментировали обе строки, иначе изменения не вступят в силу):

32

Обновите информацию о пакетах:

чтобы вывести список всех пакетов репозитория multilib. Имена 32-битных пакетов библиотек начинаются с lib32-.

Как отключить multilib

Для возврата к чистой 64-битной системе:

Выполните следующую команду, для удаления всех пакетов, которые были установлены из multilib:

Если у вас есть конфликты с gcc-libs, переустановить пакет gcc-libs и группу base-devel.

Обновите информацию о пакетах:

Как установить Wine в Arch Linux/BlackArch

После включения репозитория Multilib можно установить Wine. Имеется две версии Wine: wine (стабильная) и wine-staging (тестирование). Wine Staging – это патченная версия Wine, которая имеет исправления ошибок и функции (к примеру CSMT патч), которые ещё не были интегрированы в стабильную ветку.

Итак, установка Wine в Arch Linux/BlackArch выполняется следующей командой:

Также рекомендуется установить пакеты библиотек lib32-mpg123 и lib32-gnutls, поскольку почти наверняка они понадобятся при работе Wine и он будет выдавать сообщения, что не найдены необходимые файлы:

WINEPREFIX

По умолчанию, Wine хранит файлы настроек и установленные приложения Windows в каталоге

/.wine. Этот каталог называется префиксом Wine (Wine prefix). Он создается и обновляется автоматически по необходимости при запуске программ Windows и программ настройки Wine, например winecfg. Каталог префикса также содержит стандартную структуру корневого раздела каталогов Windows, которая представляется программам Windows как диск C:.

Вы можете изменить место расположения префикса, создав переменную окружения WINEPREFIX с указанием нового пути. Это полезно, когда вам необходимо использовать различное окружение для разных приложений Windows. При запуске приложения Windows новый префикс будет автоматически создан на указанном в WINEPREFIX месте, если его до этого не существовало.

Для примера, если вы запускаете одно приложение с

у каждой программы будет свой раздел C:, соответственно, своя копия всех настроек и реестра. Таким образом, обе программы будут запущены в полностью изолированных друг от друга средах.

Примечание: Тем не менее, префиксы Wine не являются песочницами. Программы, запущенные в Wine могут также получать доступ к оставшейся части системы (например, раздел Z: обычно соответствует корню файловой системы /).

Для создания префикса без запуска каких-либо средств настройки Wine или приложений Windows вы можете использовать команду:

Wine (Русский)

Wine — слой совместимости, позволяющий запускать приложения Microsoft Windows в Unix-подобных операционных системах. Программы, запущенные в Wine, работают так же, как и «родные» — без потерь производительности и увеличения потребления памяти, характерных для эмуляторов.

Установка

Чтобы установить Wine, подключите репозиторий multilib и установите пакет wine (development-версия) или wine-staging (testing). Wine Staging — пропатченная версия Wine с исправлениями багов и некоторыми возможностями, которые ещё не были добавлены в stable- и development-версии. См. также #Графические драйвера и #Звук.

Сторонние приложения

Перечисленные ниже приложения являются отдельными проектами, с собственными сообществами и веб-сайтами, и не поддерживаются основным сообществом Wine. Подробности можно найти в Wine Wiki.

Настройка

Настройка Wine обычно выполняется следующими инструментами:

WINEPREFIX

По умолчанию Wine хранит файлы настроек и установленные программы Windows в каталоге

С помощью переменной окружения WINEPREFIX можно задать произвольный каталог для префикса. Это удобно, если вы хотите использовать разные настройки для разных Windows-программ. Когда программа впервые запускается с новым префиксом, Wine автоматически создает каталог с чистым диском C и реестром.

Чтобы создать нужный префикс без запуска Windows-программы или графического инструмента, выполните:

WINEARCH

Также WINEARCH можно совместить с другими программами Wine вроде winetricks (Steam взят для примера):

Узнать архитектуру существующего префикса можно в файле реестра. Следующая команда считывает системный реестр префикса

/.wine и возвращает строку #arch=win32 или #arch=win64 в зависимости от типа архитектуры:

Графические драйвера

Вам придётся установить 32-битную версию вашего графического драйвера. Выберите нужный пакет из столбца OpenGL (multilib) в таблице Xorg#Установка драйвера.

Верным признаком того, что ваш драйвер не подходит или неправильно настроен, будет следующее сообщение Wine в окне терминала:

При запуске приложений в Wine могут возникнуть некоторые проблемы со звуком. Убедитесь, что в winecfg выбрано только одно звуковое устройство.

Установите необходимые вашему аудиодрайверу пакеты:

Поддержка MIDI

MIDI — довольно популярная музыкальная система видеоигр 90-х. Если вы пытаетесь запустить старую игру, то «из коробки» звук скорее всего работать не будет.

В Wine имеется отличная поддержка MIDI. Тем не менее, в первую очередь она должна работать на вашей хостовой системе, как объяснено в статье MIDI. Кроме того, убедитесь, что Wine использует правильный MIDI-разъём.

Прочие зависимости

Некоторым приложениям могут потребоваться дополнительные пакеты для различных целей:

Шрифты

Если в приложении Wine шрифты отображаются неразборчиво, проблема может быть в том, что они просто не установлены. Вы можете настроить Wine, чтобы он использовал системные шрифты:

Wine использует FreeType для построения шрифтов, и стандартные настройки FreeType изменились несколько релизов назад. Попробуйте использовать следующее окружение для Wine-программ:

Если шрифты выглядат немного смазанными, импортируйте следующий текстовый файл в реестр Wine с помощью regedit:

Для мониторов с высоким разрешением значения dpi можно задать в winecfg.

Сглаживаение шрифтов

Хороший способ улучшить рендеринг шрифтов в Wine — включить сглаживание ClearType. Следующий скрипт включит режим «Subpixel smoothing (ClearType) RGB»:

Иконки рабочего стола

Пункты меню для утилит Wine

По умолчанию, при установке Wine пункты меню и иконки для относящихся к Wine программ (например, winecfg, winebrowser и т.д.) не создаются. Чтобы это исправить, установите мета-пакет wine-installer AUR или wine-installer-git AUR (у последнего есть дополнительные зависимости) или следуйте инструкциям ниже.

Во-первых, установите любую программу Windows, чтобы Wine создал меню. Затем создайте файлы со следующим содержанием в каталоге

После этого создайте следующий файл в каталоге

Если с этими настройками иконки выглядят уродливо (или не появились вовсе), то их нет среди доступных. Необходимо заменить настройки явным указанием расположения желаемых иконок. Того же можно добиться правым кликом по иконке и изменением настроек. Большой набор иконок для ярлыков можно найти в GNOME-colors.

Удаление пунктов меню

Созданные Wine пункты меню хранятся в каталоге

Кроме того, чтобы удалить нежелательные расширения Wine, выполните следующие команды (источник — сайт Wine):

Внешний вид

Оформление в стиле XP можно загрузить отсюда. Руководство по установке можно найти здесь. После установки выберите тему оформления в winecfg.

Пользователи Wine Staging могут вместо этого включить опцию Enable GTK3 Theming в разделе Staging winecfg. Будет выбрана текущая GTK-тема.

Печать

Wine также могут потребоваться специальные разрешения (capability) на доступ к сети по протоколу ICMP (пинги) (см. WineHQ FAQ):

Если после этого возникают проблемы (например, при обработке исключений или привилегированных команд), для удаления capability выполните:

Использование

Запуск конкретных приложений Windows в Wine описан на странице Wine Application Database (AppDB).

Wayland

В настоящее время Wine не поддерживает Wayland напрямую, но вы можете использовать XWayland.

Некоторые попытки реализовать поддержку Wayland:

Оставьте комментарий