2021 — Year of the Wayland
Recently, I decided to replace the hard drive that was running my OS. It was getting old, and I don’t want to deal with boot issues if the drive starts failing. I decided that when my new hard drive was delivered, I would not just copy everything from the old one to the new one. It’s a chance for a fresh start — maybe I’ll try a new window manager, and I think it’s about time I switched to Wayland since the xorg devs have largely abandoned that project. I’ve also been hearing cool things about PipeWire, so why not give that a shot as well?
So that’s exactly what I did, and with some rather pleasant results, which led me to believe that 2021 really is the year of the Wayland desktop.
History
When I first heard about Wayland in about 2011, I really hoped that it would succeed, as I hated dealing with xorg.conf. Version 1.0 was released on 22 October 2012 and was met with many complaints that it couldn’t perform basic tasks expected by users. It was also around this time that RebeccaBlackOS, a joke distro, became the first distro to support Wayland officially. [0][1] So Wayland was at least stable enough to be used as a meme but not yet for everyday use.
I waited a little bit longer.
At the end of 2016, Fedora 25 was released with official Wayland support. [2] So it was getting serious. However, I still saw a number of complaints on Hacker News and Reddit about things that sounded like deal-breakers to me.
I waited a little bit longer.
2021
From 2016 onwards, I saw sporadic posts online by people who used Wayland everyday without any issues. My general impression was that unless you had very specific requirements, it should work for you.
At this point, I wanted to see for myself. I had a chuckle when, the day after I ordered my new hard drive, this blog post showed up on Hacker News and Reddit; the following day I found this one. It seems many people are switching to Wayland in 2021, which is why I am dubbing it the “Year of the Wayland”.
Not only that, but I see a lot of activity in the development world for supporting Wayland. Recently, one of the OBS Studio devs got it working natively on Wayland.[3] That’s great news for streamers. I also see that even XFCE is looking into adding Wayland support soon! [4]
Before vs After
The biggest visual change to my setup would be my window manger. I was using BSPWM before, but it didn’t support Wayland. As far as I could tell, Sway was the most mature tiling window manager. It works really well and I’ve had zero issues with it so far.
As for PipeWire vs PulseAudio, I am blown away by how well PipeWire is working considering how new it is. All I had to do was install the pipewire
package and my sound worked out of the box. The only small snag was that some software requires PulseAudio (Firefox for example). But I just installed the pipewire-pulse
package, and everything worked perfectly.
Software That Required Some Tweaks
Browser
I only use Firefox as my browser. To get native Wayland support for Firefox, all I had to do was set the following environment variable MOZ_ENABLE_WAYLAND=1
. After restarting Firefox, you can confirm that your changes have been applied by going to the about:support
page and checking that the value of “Window Protocol” is “wayland”.
Even while Firefox was still running through xorg-xwayland
it was fast, and I didn’t notice any weird behaviour.
Music
I previously used quodlibet as my music player. However, for the last few months I’ve been trying out Tauon Music Box, which I prefer. It’s made entirely in SDL, meaning it also works natively on Wayland.
To get any SDL software to run natively on Wayland, it’s as easy as setting the SDL_VIDEODRIVER=wayland
environment variable.
Gaming
I enjoy gaming, but I would by no means call myself a serious gamer. I almost exclusively play games via Steam, and I thank Valve for all the investment they have put into the Linux ecosystem over the years. (If a studio only publishes their game on a platform that doesn’t support Linux, then I guess they don’t want my money.)
A lot of Linux games on Steam come bundled with SDL. Some of them make use of the SDL library that is part of the Steam Runtime, others use their own. To get them to work (without interfering with other SDL applications), just add SDL_VIDEODRIVER=x11 %command%
to the launch options for the game. This worked on every game I tried.
I noticed that for CS:GO I was getting the same FPS as I was before switching to Wayland.
For DOTA2 (the Vulkan version) the game was getting capped at 60FPS, even with V-sync turned off. There are workarounds for this. I’m personally not bothered by it, but if you are, you can read a detailed explanation here. Either way, I’m sure valve will update the SDL lib bundled with DOTA2 in the future.
Thoughts So Far
Wayland works so well I don’t even notice it. Most of the software I used before functions fine on Wayland (or via xorg-xwayland
); for the software that doesn’t work, there are replacements. [7] There are still a few programs that need to run through xorg-xwayland
, but it doesn’t really make a significant difference.
I can safely say that 2021 is the “Year of the Wayland” since, for most common use cases, you can use it everyday without a single complaint. As for the remaining edge cases there are plenty of developers who are devoting a lot of their time to addressing those concerns.
References
[0] https://www.ubuntuvibes.com/2012/02/live-os-running-wayland-display-server.html
[1] https://www.phoronix.com/scan.php?page=news_item&px=Wayland-RBOS-2020-Release
[2] https://fossbytes.com/new-features-fedora-25-linux-releasing-november-15/
[3] https://feaneron.com/2021/03/30/obs-studio-on-wayland/
[4] https://wiki.xfce.org/releng/wayland_roadmap
[5] https://www.theregister.com/2020/10/30/x_server_lead_maintainer_declares/
[6] https://www.phoronix.com/scan.php?page=news_item&px=XServer-Abandonware
[7] https://arewewaylandyet.com/