logo

blog

My website can't be that messy, right? git clone https://hacktivis.me/git/blog.git

Why I embraced Wayland.xml (8847B)


  1. <entry>
  2. <title>Why I embraced Wayland</title>
  3. <link rel="alternate" type="text/html" href="/articles/Why%20I%20embraced%20Wayland"/>
  4. <id>https://hacktivis.me/articles/Why%20I%20embraced%20Wayland</id>
  5. <published>2021-03-07T00:35:00Z</published>
  6. <updated>2021-03-08T02:55:00Z</updated>
  7. <link rel="external replies" type="application/activity+json" href="https://queer.hacktivis.me/objects/db4f70f5-7186-43ce-a350-e0e8d332bfb9" />
  8. <link rel="external replies" type="text/html" href="https://queer.hacktivis.me/objects/db4f70f5-7186-43ce-a350-e0e8d332bfb9" />
  9. <content type="xhtml">
  10. <div xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="h-entry">
  11. <p>Some of the folks that knew me from around 2014 know that I wasn't impressed with Wayland and really didn't see the point of it. X11 worked well enough for me and I didn't want to switch to something else, it felt like reinventing new stuff just for the sake of it to me (like systemd and pulseaudio; the fuck are those doing on freedesktop.org in the first place…). And I disagreed quite badly on it, sorry for folks related to wayland. Hopefully less and less folks will do this "politically conversative" opinion and actually wonder about the reasonings.</p>
  12. <figure>
  13. <img src="/images/Firefox%20overlaying%20st%20on%20my%20laptop.png" />
  14. <figcaption>Screenshot of firefox chunks ghosting over the terminal on my NVidia laptop running on XOrg</figcaption>
  15. </figure>
  16. <p>The motivation was because using X11/XOrg (specially with NVidia) gave me some years of:
  17. <ul>
  18. <li>applications like Firefox shitting all over the desktop at times, leaving ghosted areas;</li>
  19. <li>all applications being able to send any and receive all keyboard+mouse input with no real solution against that (I know XTerm has some option to steal all keyboard input, didn't work for me);</li>
  20. <li>non-orthogonality of input device settings; XOrg allows to have a different settings on each and would require managing hotplug events but XOrg tools (<code>setxkbmap(1)</code>, <code>xmodmap(1)</code>, …) are done for a display server that would support only one layout setting and manage events by itself</li>
  21. <li>display configuration hell, I know how to use <code>xrandr(1)</code> for some arcane things now (including trashing the concept of VTs, thanks linux) but what a mess and of course no support for hotplugging (which is a mess unless you use a tiling window manager like XMonad);</li>
  22. <li>normal applications being able to trash your setup (ie. multi-monitor to a single display at 640x480) and no restoring if they crash down or don't care;</li>
  23. <li>applications often behaving weirdly when a tiling window manager resizes them automatically;</li>
  24. <li>still having this software-gore bug where moving a window on top of another leaves some of it frames behind, I love having that bug after 2020 when it should have been fixed well before 2010;</li>
  25. <li>some games window just disappearing a bit after initialization (spawns a blank window and immediately goes away), probably related to a missing quirk/extension but haven't found wtf was happening;</li>
  26. <li><a href="https://www.jwz.org/xscreensaver/faq.html">An absolute horror for even just basic screen locking/saving</a>.</li>
  27. </ul></p>
  28. <p>
  29. And that made me just done with X11 and it's design of being similar to a Unix where everyone is root… so basically not a Unix. <q>If you find yourself saying that X is the Unix way: What one thing is X doing and what is it doing well?</q><cite>Daniel Stone</cite><br />
  30. By the way, if you're that kind of people which is like "X11/Xorg never threw me a bug" you're likely just ignoring the elephant in the room in the first place or not seeing it as a bug (this is why I usually don't care about statements like "$thing just works for me" and "$thing never broke for me", there is high chances of it being delusional or clueless).<br />
  31. Plus with <em>actually informing myself about the wayland protocol design</em> rather than just seeing that you can rotate windows in weston (which is labelled a reference compositor but should be taken as a demo) and that GNOME is doing it's normal thing of trashing everything in it's way, specially good things <a href="https://www.jwz.org/doc/cadt.html">like an awful teenager</a>.
  32. </p>
  33. <p>
  34. But at some point I gave <a href="https://swaywm.org">Sway</a> an honest try on my NoVidya-plagued laptop, the one where the screenshot at the begining of this article comes from and I actually ended up with less bugs, it was still a mess because of NVidia having trashed the proprietary driver so much that nouveau, an open-source garage-hacker alternative that they're unfriendly with worked better, you know the adage: Fuck You NVidia.<br />
  35. At least now that I replaced that badly aged laptop (Spectre/Meltdown was the final blow) with <a href="/articles/T495">a full-AMD one</a> (yay, no proprietary drivers), I don't have X11 kind of issues nor NoVidya kind of issues.<br />
  36. Oh and my phone already was using Wayland (in fact it doesn't have X11) since 2015~2016 as I switched to SailfishOS because Android is a system that loves to trash itself. I maybe just didn't knew or ignored that fact as it's not as desktop/laptop. Wayland works really well on it btw, and X11 never made sense to me on handhelds, which is yet another point for Wayland.
  37. </p>
  38. <p>All that said:<ul>
  39. <li>I have yet to fully switch to wayland on my desktop, mostly because of quirky things like some games (they are really the worst…) and of course <abbr title="Virtual Reality">VR</abbr> is quite alpha but has the potential to work really well but so far the patches got a bit stuck. Launching Xorg for VR is good enough for now (but it's very unstable);</li>
  40. <li>XWayland works well if I need to launch an X11 application, much better than stuff like Xephyr where it always failed with my keyboard layout;</li>
  41. <li>I have done the quite crazy thing of throwing all of X11 (including things like <code>libX11.so</code>) out on my laptop, it means a lack of some applications and some weird shenanigans, like having to replace <code>libGL.so</code>(OpenGL linked with X11) with <code>libOpenGL.so</code>(window-system-agnostic) but sadly it's from <abbr title="GL Vendor-Neutral">GLVND</abbr> which has yet to appear on systems like FreeBSD so it's messy in some buildsystems. But overall it works pretty nicely;</li>
  42. <li>I have yet to resume working on <a href="/git/inaban">inaban</a>, a quite psychorigid wayland compositor for controlling applications behavior (so quite the complete opoosite of X11);</li>
  43. <li>I do not expect GNOME and related projects to actually do software/standards one can trully depend on, I'd much rather bet on one of their software having a critical bug than not having one;</li>
  44. <li>I barely care for proprietary software;</li>
  45. <li>Do not expect your NoVidya hardware to work well; NVidia® is almost hostile to Linux and they're the responsible ones; be careful on picking your hardware, everyone doesn't have to support your choices.</li>
  46. </ul></p>
  47. <h2>See More</h2>
  48. <ol>
  49. <li><a href="https://drewdevault.com/2019/02/10/Wayland-misconceptions-debunked.html">Wayland misconceptions debunked</a></li>
  50. <li><a href="https://www.youtube.com/watch?v=HllUoT_WE7Y">"Write a single library to handle all input devices, it'll be easy" they said…</a> (46 minutes 53 seconds): Talk about a linux-induced burden but relates a bit to Wayland on Linux and FreeBSD</li>
  51. <li><a href="https://www.youtube.com/watch?v=RIctzAQOe44">The Real Story Behind Wayland and X - Daniel Stone (linux.conf.au 2013)</a> (45 minutes 34 seconds)</li>
  52. <li><a href="https://github.com/swaywm/wlroots">wlroots</a>: Pluggable, composable, unopinionated modules for building a Wayland compositor; or about 50,000 lines of code you were going to write anyway.</li>
  53. <li><a href="https://swaywm.org">sway</a>: i3-compatible (with few extras) Wayland Compositor</li>
  54. <li><a href="https://git.sr.ht/~sircmpwn/wio">wio</a>: Wayland compositor for Linux &amp; FreeBSD which has a similar look &amp; feel to plan9's rio</li>
  55. <li><a href="https://hikari.acmelabs.space/">hikari</a>: Wayland compositor inspired by CWM</li>
  56. <li><a href="https://wayland-book.com/">Wayland Book</a> by Drew DeVault</li>
  57. </ol>
  58. <p>And yeah a lot of that list is linked to wlroots, feel free to pass on links from others, I know MATE is planning to switch to Wayland but it's still mostly for the future and I don't know how well wayland works in KDE (hopefully quite well).</p>
  59. <p>Note: I usually read replies to my articles but I'm not going to bother if you're going to just throw the typical clueless wayland-hater bile one can see on internet. I will probably answer honest questions though. Hopefully that will save some people's energy and time.</p>
  60. </div>
  61. </content>
  62. </entry>