---
title: State of wayland in 2022
date: 2023-01-15
tags: [linux, wayland]
description: Every time I try out wayland, I will write a blog post about what improved and what still doesn't work.
---

I have [written about wayland before](https://blog.ce9e.org/posts/2020-12-28-wayland-wm/) and how I try
to make the switch about once a year and then quickly give up and move back to
X11. Currently I am doing another test run and thought that I could turn this
into a series: Every time I try out wayland, I will write a blog post about
what improved and what still doesn't work.

My current test run is still running, so if I am lucky this is both the first
and final entry in that series. But, as you will see, there is still a lot of
potential for frustration.

Please do not read this as a criticism of wayland as a whole. I understand that
my use case may not be super common. These are just my personal notes on how
well wayland works *for me*.

## The setup

My OS is Debian Bookworm, so all software is in the version that is included
with that OS.

I basically use the [same setup I described in 2020](https://blog.ce9e.org/posts/2020-12-28-wayland-wm/)
where sway acts as a generic display server and an IPC client does the actual
window management.

I am not yet fully decided on sway-bar vs waybar, but for now I am using
sway-bar with a custom status script. In addition there are several smaller
tools that are somewhat needed for a complete desktop: swayidle, swaylock,
grim, slurp, wl-clipboard, and xdg-desktop-portal-wlr.

## What improved?

-	Last time I had major issues with blurry fonts because I did not manage to
	configure antialiasing correctly. This time around, `gsettings set
	org.gnome.desktop.interface font-antialiasing 'rgba'` seems to have done the
	job. I am not sure if anything changed here or if I just missed the correct
	option before.

-	Redshift on Debian is
	[patched](https://salsa.debian.org/debian/redshift/-/blob/debian/sid/debian/patches/Implement-Wayland-support.patch)
	to support wayland, so no issues there.

-	[wdisplays](https://github.com/artizirk/wdisplays) is a nice alternative to
	arandr to manage multiple displays.

-	Copying text via
	[primary selection](https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/unstable/primary-selection/primary-selection-unstable-v1.xml)
	just works!

-	Screen sharing in Firefox. Pipewire is mostly usable now (I still sometimes
	get noise on my microphone that goes away with a reboot).
	xdg-desktop-portal-wlr needs some weird incantations, but they are described
	well in the [README](https://github.com/emersion/xdg-desktop-portal-wlr#running).

-	Both sway-bar and waybar can be used as status notifier hosts (trays).
	sway-bar doesn't implement dbusmenu, but I prefer to use my [rofi SNI
	script](https://gist.github.com/xi/b88af997b485191fa0beb5d6612ead29) for that
	anyway.

-	There are very few applications on my system that still use gtk2. The big one
	is gimp, and that is the reason why gtk2 will stay for a while. But other
	than that the migration to gtk3 seems to be completed. So lets start porting
	everything to gtk4 now!

## What needs more work?

-	GUI applications that run as root, such as gparted or synaptic, fail to
	start. AFAIU, this is expected because of the stricter security model in
	wayland. I guess these applications have to be rewritten to run as a regular
	user and talk to some system service like packagekit.

-	Sway cannot be launched from lightdm

-	Firefox still uses X11 by default. Wayland can be enabled using
	`MOZ_ENABLE_WAYLAND=1`. As far as I can tell, everything works, but some
	details are ever so slightly off. For example, the spinner in a loading tab
	is replacedby a static hourglass icon. And when I drag and drop text it is
	drawn in the wrong position, as if I had grabbed it in the very corner. These
	are details, but for some reason they annoy me deeply.

-	The choice of compositors is still very limited. Outside of the big desktop
	environments, sway is still the only real competitor. There are plenty of
	other projects, but as far as I can tell they are all either unfinished or
	abandoned. There especially seems to be a lack of stacking compositors in the
	spirit to openbox.

-	There is still no usable task bar. Waybar provides a task bar based on the
	[foreign toplevel manager protocol](https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/protocol/wlr-foreign-toplevel-management-unstable-v1.xml).
	Unfortunately, this protocol does not have a concept of workspaces, so it is
	basically useless for me.

-	Focus is not automatically given to a different window when I expect it. For
	example, if I click a link in an email, I want to switch focus to the
	browser. Sway has the setting `focus_on_window_activation` for X11 clients and
	the [xdg-activation
	protocol](https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/xdg-activation/xdg-activation-v1.xml)
	for wayland clients, but neither really works for me.

-	The above mentioned xdg-activation protocol is a good example of my next
	issue: I find it hard to understand the protocol documents. On the one hand I
	would prefer a more compact representation of the interface, e.g. in some
	pseudo code. On the other hand, I would like more verbosity and structure in
	the prose, especially providing some motivation, rationale, and security
	considerations. I think RFCs are a pretty good example of how to do this
	well.

-	The biggest headache is the touchpad. There are several issues with it:

	-	Two finger detection doesn't really work reliably. My computer regularly
		performs a single click (one finger) when I intended to do a middle click
		(two fingers).

	-	There seems to be a high threshold for movement. This makes it incredibly
		hard to make small and exact movements, e.g. to click on a small link.

	-	Kinetic scrolling doesn't stop when I tap the touchpad again. The fix is
		already implemented in libinput and gtk4, but it [will not be backported to
		gtk3](https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3454#note_1426517).

## Conclusion

So there you have it. 14 years after the initial wayland release we do have a
usable desktop experience. Unfortunately, there are still gaping holes.
Fortunately, there is an active community and things are constantly improving.
I am excited to see what will have changed when I will do the next entry in
this series.
