<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Wayland on rooiratel</title><link>https://rooiratel.red/tags/wayland/</link><description>Stephan Snyman's personal website</description><language>en-gb</language><generator>Hugo</generator><atom:link href="https://rooiratel.red/tags/wayland/index.xml" rel="self" type="application/rss+xml"/><item><title>2021 — Year of the Wayland</title><link>https://rooiratel.red/posts/2021-year-of-the-wayland/</link><pubDate>Wed, 24 Mar 2021 18:53:09 +0200</pubDate><guid isPermaLink="true">https://rooiratel.red/posts/2021-year-of-the-wayland/</guid><description>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?</description><content:encoded><![CDATA[<p>Recently, I decided to replace the hard drive that was running my OS. It was getting old, and I don&rsquo;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&rsquo;s a chance for a fresh start &mdash; maybe I&rsquo;ll try a new window manager, and I think it&rsquo;s about time I switched to Wayland since the xorg devs have largely abandoned that project. I&rsquo;ve also been hearing cool things about PipeWire, so why not give that a shot as well?</p>
<p>So that&rsquo;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.</p>
<h1 id="history">History</h1>
<p>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&rsquo;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.</p>
<p>I waited a little bit longer.</p>
<p>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.</p>
<p>I waited a little bit longer.</p>
<h1 id="2021">2021</h1>
<p>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.</p>
<p>At this point, I wanted to see for myself. I had a chuckle when, the day after I ordered my new hard drive, <a href="http://www.fosskers.ca/en/blog/wayland">this</a> blog post showed up on Hacker News and Reddit; the following day I found <a href="https://shibumi.dev/posts/wayland-in-2021/">this one</a>. It seems many people are switching to Wayland in 2021, which is why I am dubbing it the &ldquo;Year of the Wayland&rdquo;.</p>
<p>Not only that, but I see a lot of activity in the development world for supporting Wayland. Recently, one of the <a href="https://obsproject.com/">OBS Studio</a> devs got it working natively on Wayland.[3] That&rsquo;s great news for streamers. I also see that even XFCE is looking into adding Wayland support soon! [4]</p>
<h1 id="before-vs-after">Before vs After</h1>
<p>The biggest visual change to my setup would be my window manger. I was using <a href="https://github.com/baskerville/bspwm">BSPWM</a> before, but it didn&rsquo;t support Wayland. As far as I could tell, <a href="https://swaywm.org/">Sway</a> was the most mature tiling window manager. It works really well and I&rsquo;ve had zero issues with it so far.</p>
<p>As for <a href="https://pipewire.org/">PipeWire</a> 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 <code>pipewire</code> package and my sound worked out of the box. The only small snag was that some software <em>requires</em> PulseAudio (Firefox for example). But I just installed the <code>pipewire-pulse</code> package, and everything worked perfectly.</p>
<h1 id="software-that-required-some-tweaks">Software That Required Some Tweaks</h1>
<h3 id="browser">Browser</h3>
<p>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 <code>MOZ_ENABLE_WAYLAND=1</code>. After restarting Firefox, you can confirm that your changes have been applied by going to the <code>about:support</code> page and checking that the value of &ldquo;Window Protocol&rdquo; is &ldquo;wayland&rdquo;.</p>
<p>Even while Firefox was still running through <code>xorg-xwayland</code> it was fast, and I didn&rsquo;t notice any weird behaviour.</p>
<h3 id="music">Music</h3>
<p>I previously used <a href="https://quodlibet.readthedocs.io/en/latest/">quodlibet</a> as my music player. However, for the last few months I&rsquo;ve been trying out <a href="https://tauonmusicbox.rocks/">Tauon Music Box</a>, which I prefer. It&rsquo;s made entirely in <a href="https://www.libsdl.org/">SDL</a>, meaning it also works natively on Wayland.</p>
<p>To get any SDL software to run natively on Wayland, it&rsquo;s as easy as setting the <code>SDL_VIDEODRIVER=wayland</code> environment variable.</p>
<h3 id="gaming">Gaming</h3>
<p>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&rsquo;t support Linux, then I guess they don&rsquo;t want my money.)</p>
<p>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 <code>SDL_VIDEODRIVER=x11 %command%</code> to the launch options for the game. This worked on every game I tried.</p>
<p>I noticed that for CS:GO I was getting the same FPS as I was before switching to Wayland.</p>
<p>For DOTA2 (the Vulkan version) the game was getting capped at 60FPS, even with V-sync turned off. There are workarounds for this. I&rsquo;m personally not bothered by it, but if you are, you can read a detailed explanation <a href="https://www.reddit.com/r/linux_gaming/comments/1upn39/sdl2_adds_dynamic_api_magic_to_allow_updating_it/">here</a>. Either way, I&rsquo;m sure valve will update the SDL lib bundled with DOTA2 in the future.</p>
<h1 id="thoughts-so-far">Thoughts So Far</h1>
<p>Wayland works so well I don&rsquo;t even notice it. Most of the software I used before functions fine on Wayland (or via <code>xorg-xwayland</code>); for the software that doesn&rsquo;t work, there are replacements. [7] There are still a few programs that need to run through <code>xorg-xwayland</code>, but it doesn&rsquo;t really make a significant difference.</p>
<p>I can safely say that 2021 is the &ldquo;Year of the Wayland&rdquo; 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.</p>
<h1 id="references">References</h1>
<pre><code>[0] https://www.ubuntuvibes.com/2012/02/live-os-running-wayland-display-server.html
[1] https://www.phoronix.com/scan.php?page=news_item&amp;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&amp;px=XServer-Abandonware
[7] https://arewewaylandyet.com/
</code></pre>
]]></content:encoded></item></channel></rss>