Using Wayland: Difference between revisions

From DcSharedWiki
Line 137: Line 137:
** packaged in Debian
** packaged in Debian
** Status: works fine on XWayland, [https://bugs.chromium.org/p/chromium/issues/detail?id=578890 native Wayland support is WIP]
** Status: works fine on XWayland, [https://bugs.chromium.org/p/chromium/issues/detail?id=578890 native Wayland support is WIP]

=== Electron Apps ===

The [https://www.electronjs.org/ Electron]framework is based on Chromium/Ozone which now has a Wayland backend. [https://github.com/electron/electron/issues/10915 Support in Electron is WIP] and beta 12 enables Ozone.

* signal-desktop:
** not packaged in Debian but upstream provides a package for Ubuntu that works on Debian
** Status: works fine on XWayland, [https://github.com/signalapp/Signal-Desktop/issues/3411 native Wayland support is WIP]
* [https://vscodium.com/ VSCodium] (OpenSource distribution of Visual Studio Code without telemetry and tracking)
** not packaged in Debian but upstream provides a working package
** Status: works fine on XWayland, [https://github.com/microsoft/vscode/issues/109176 native Wayland support is WIP]


=== Misc ===
=== Misc ===


* thunderbird:
* Emacs:
** packaged in Debian
** packaged in Debian
** Status: works fine on XWayland, works ok now on Wayland but [https://bugzilla.mozilla.org/show_bug.cgi?id=635134 officially it is still WIP]
** Status: works fine on XWayland, has little chances to work on Wayland as it is (since [https://emacshorrors.com/posts/psa-emacs-is-not-a-proper-gtk-application.html it is not a real GTK application)
* libreoffice:
* libreoffice:
** packaged in Debian
** packaged in Debian
** Status: works fine on XWayland, native Wayland support if using the GTK3 backend (with the extra ''libreoffice-gtk3'' package)
** Status: works fine on XWayland, native Wayland support if using the GTK3 backend (with the extra ''libreoffice-gtk3'' package)
* signal-desktop:
** not packaged in Debian but upstream provides a package for Ubuntu that works on Debian
** Status: works fine on XWayland, [https://github.com/signalapp/Signal-Desktop/issues/3411 native Wayland support is missing] but support in Electron is now beta so it should be there in 2021
* [https://github.com/Blub/netevent netevent]: (Input-Event device cloning utility)
* [https://github.com/Blub/netevent netevent]: (Input-Event device cloning utility)
** use case: if you wish to control several machines with the same keyboard and mouse, like with a KVM switch, then you can use devices from one to control others and switch machine using a special key
** use case: if you wish to control several machines with the same keyboard and mouse, like with a KVM switch, then you can use devices from one to control others and switch machine using a special key
** not packaged in Debian but materials provided upstream (needs [https://github.com/Blub/netevent/pull/15 this update though])
** not packaged in Debian but materials provided upstream (needs [https://github.com/Blub/netevent/pull/15 this update though])
** Status: works fine
** Status: works fine
* thunderbird:
** packaged in Debian
** Status: works fine on XWayland, works ok now on Wayland but [https://bugzilla.mozilla.org/show_bug.cgi?id=635134 officially it is still WIP]


== Workarounds ==
== Workarounds ==

Revision as of 06:00, 21 December 2020

Introduction

The goal of this page is to relate experiences using Wayland working implementations, software replacement from the X11 world and so on.

Duck: please note I'm a former AwesomeWM user thus I'm not looking into major desktop implementations like GNOME or KDE but I'm trying to mix interesting pieces to fit my needs better. You can have a look at my configuration in my repository (Ansible rules).

Compositors

There's many Wayland compositor projects around but a lot are very experimental and many even already abandoned.

Working or prospective compositors follows.

Sway

(updated for 1.5)

Status: very active project, created a wlroots framework to share with other compositors, version 1.1+ is usable with some glitches, seamless xwayland integration

Packaging: in Debian with wlroots and swaybg

Notable problems:

Tools:

  • swaybar (display workspaces, current window title, tray, time, CPU infos…)
    • integrated with sway, can use various commands to display stuff (i3status works fine and is packaged in Debian)
    • Status: works fine but tray support is limited (icon may be missing, contextual menu not working, WIP)
  • Waybar (more fancy bar)
    • packaged in Debian
    • Status: tested only a short time, tray working better than swaybar but contextual menu currently displayed in the middle of the screen (should be fixed if built with gtk-layer-shell but disabled in Debian for some reason and manual build failed with this option) (gtk-layer-shell seems reenabled now but the date module is not compiled)
  • swaylock (lock screen)
    • packaged in Debian
    • Status: works fine
  • swayidle (run custom actions on idle and back from idle)
    • packaged in Debian
    • Status: works fine and handle various events
  • remote control (not network transparency)
    • integrated in sway
    • Status: finished, untested (RDP backend replaced, need to have a deeper look)

Way Cooler (spiritual successor of AwesomeWM)

Status: was being rewritten on top of wlroots but was unfortunately abandoned at the beginning of 2020. I need some time to cope with the sadness and remove this entry.

Tools

Display Manager

  • lightdm:
    • packaged in Debian
    • Status: works fine to run Wayland sessions but runs on X11 itself

Application Menu Runner

  • wofi:
    • packaged in Debian
    • Status: works fine
    • Usage: wofi --term=x-terminal-emulator
  • j4-dmenu-desktop + bemenu:
    • j4-dmenu-desktop only is packaged in Debian
    • Status: works fine
    • Usage: j4-dmenu-desktop --dmenu='bemenu --list 10 --wrap --ignorecase --no-overlap --prompt "Run:" --fn "pango:DejaVu Sans Mono 12"' --term=x-terminal-emulator
  • dmenu:
    • packaged in Debian (suckless-tools)
    • Status: works fine but impossible to switch back to it if you loose focus (need to kill it in a term)
    • Usage: dmenu_path | dmenu -p "Run:" -l 10 | xargs swaymsg exec

Notifications / Screen Overlay

  • mako (notifications):
    • packaged in Debian (mako-notifier)
    • works fine
  • wob (progressbar)
    • packaged in Debian
    • Status: works fine
  • xfce4-notifyd (notifications):
    • packaged in Debian
    • Status: works fine but display in the middle of the screen thus not very practical

Input Method

  • fcitx4:
    • packaged in Debian
    • Status: untouched config from X11 works but completion menu may not be displayed (it works on one machine and not another but I could not figure out why yet); running fcitx-autostart fixed it (you may need to ``killall fcitx`` first)
  • fcitx5:
  • ibus:
    • packaged in Debian
    • Status: ibus-wayland is available and was switched to using a newer version of the wayland input protocol (see Debian#905001 and linked upstream BR) but Sway use an even newer version (and this one only); anyway these changes are mostly untested so I would not have too much hopes; without this plugin I was not able to make completion work at all, even when forcing the engine on the command-line

So here are the various protocols:

Terminal

  • foot: (native Wayland support)
    • packaged in Debian
    • Status: works fine but lacked IME support; it was recently fixed upstream, now waiting for a release and new package
  • termite: (native Wayland support)
    • not packaged in Debian and requires a patched libvte
    • Status: works fine
  • xfce4-terminal:
    • packaged in Debian
    • Status: works fine
  • terminator:
    • packaged in Debian
    • Status: works fine (with Sway >=1.1)

Screen Capture

  • grim: (screenshot)
    • packaged in Debian
    • Status: works fine

Screen Brightness

  • light:
    • packaged in Debian
    • Status: works fine
  • brightnessctl:
    • packaged in Debian (brightness-udev is needed to be usable as non-root)
    • Status: works fine

Browser

Electron Apps

The Electronframework is based on Chromium/Ozone which now has a Wayland backend. Support in Electron is WIP and beta 12 enables Ozone.

  • signal-desktop:
    • not packaged in Debian but upstream provides a package for Ubuntu that works on Debian
    • Status: works fine on XWayland, native Wayland support is WIP
  • VSCodium (OpenSource distribution of Visual Studio Code without telemetry and tracking)

Misc

  • Emacs:
  • libreoffice:
    • packaged in Debian
    • Status: works fine on XWayland, native Wayland support if using the GTK3 backend (with the extra libreoffice-gtk3 package)
  • netevent: (Input-Event device cloning utility)
    • use case: if you wish to control several machines with the same keyboard and mouse, like with a KVM switch, then you can use devices from one to control others and switch machine using a special key
    • not packaged in Debian but materials provided upstream (needs this update though)
    • Status: works fine
  • thunderbird:

Workarounds

GUI Frameworks

GTK uses GDK to draw and support for Wayland exists but a few things are missing thus it is not enabled by default. Other frameworks do not always enable Wayland by default depending on distro and version.

Currently this works fine (in ~/.xsessionrc):

# ensure GUI frameworks use Wayland
# breaks a few apps or behaviors (Signal, Chromium, VSCodium, Emacs…)
export GDK_BACKEND=wayland
export CLUTTER_BACKEND=wayland
export QT_QPA_PLATFORM=wayland-egl
# breaks a few apps or behaviors (Unity…)
#export SDL_VIDEODRIVER=wayland
export ELM_DISPLAY=wl
# enable Wayland on Mozilla apps
export MOZ_ENABLE_WAYLAND=1
export MOZ_WEBRENDER=1

Java Applications

Set _JAVA_AWT_WM_NONREPARENTING=1 in your environment (in ~/.xsessionrc) to fix behavior with menus and always on top issues (and maybe others).

Readings