<metaname="description"content="Today I want to talk about Wayland, and why I don't use it. In case you're a normie and don't know what Wayland is, Wayland is this new display protocol created by the people over at Freedesktop. They want it to be better than the display protocol most GNU/Linux users are already using called X11. While I'm not against the idea of a new display protocol, in my opinion Wayland is a failure, and it fails at doing everything X11 did right.">
<p>TodayIwanttotalkaboutWayland,andwhyIdon't use it. In case you'reanormieanddon't know what Wayland is, Wayland is this new display protocol created by the people over at Freedesktop. They want it to be better than the display protocol most GNU/Linux users are already using called X11. While I'mnotagainsttheideaofanewdisplayprotocol,inmyopinionWaylandisafailure,anditfailsatdoingeverythingX11didright,andthat's what I want to talk about here. Note that most of this will be from a developer'sperspective;ifyou'reusingGNOME,KDEormaybeevenoneofthemanywlrootsbasedcompositors,yourexperienceonWaylandisprobablygoingtobeprettygood.</p>
<h2>Terminology</h2>
<p>First,let's talk terminology. On X11 we have something called a 'Windowmanager', and as the name implies it manages your window. The window manager is the root window, meaning it'sthefirstwindow.Otherthanthat,it'sjustlikeanyotherwindowyoumayhave.Thisisquitepowerful,becauseitmeansintheoryanythingcanbeawindowmanager.YoucantrythisforyourselfonXorgandxinitbyrunning<code>startx/usr/bin/firefox</code>.WhatyoushouldhaveisanX11sessionwithonlyfirefoxopenandnothingelse.Thisiswhywehavewindowmanagers,theyallowustospawnmorewindowsandplacethosewindowswhereeverwewant.Evendesktopenvironmentusershaveawindowmanager,becauseyourdesktopenvironmentcomesbundledwithone.</p>
<p>Bycombiningthecompositorandwindowmanager,you're slowly making the display stack less and less modular. The days of choosing your compositor and choosing your window manager are now gone. It'sallonebigprogram,meaningevenifyouavoiddesktopenvironmentsyou're still going to have one big program that does everything. This is just not the way forward if you ask me. I believe the main reason for this is "making the desktop easier for new users", but at this point the GNU/Linux community should give up on new users who aren'twillingtolearnourtechnology.</p>
<p>ItisincrediblyeasytomakeanX11windowmanager,becauseagainit's a window like any other. You really just need to create a window, read atoms and finally move/resize windows around. On Wayland you now also need to implement a compositor, which adds a lot of complexity and room for failure. Even one of the more minimal Wayland compsitors dwl, a dwm rewrite for Wayland has many more lines of code than the original dwm, because now you also need to do the compositing yourself. Not to mention, if you'reusingaminimalcompositorlikedwl,youcan't have fancy effects and a minimal window manager, that'sjustnotpossibleanymore,atleastasofnow.</p>
<p>Thisaddedcomplexityledtolibrarieslikewlrootsbeingcreated,anditssloganreallysaysitall;"about 60,000 lines of code you were going to write anyway".Howeverevenwithwlrootsyoustillneedtoimplementcompositing,there'snowaytohaveaseparatecompositorwithyourwindowmanager.</p>
<p>Ithinkthisisworthmentioningaswell.AlotofX11userssimplydon't use a compositor at all. They deem it unnecessary, and it makes sense. If you don'tneedtransparency,fancyeffects,Vsyncandothernicefeatureslikethat,whyshouldyouwasteyoursystemresourcesonacompositor?Goodluckomittingthecompositorwhenyou're using Wayland. You can't.</p>
<p>IalsowantalibrarywhichallowscreatingBOTHX11andWaylandclientswithoutwritinganyextracodeforit.Thiswouldbeideal,althoughI'msuretherearepotentialchallengesfromdoingitthisway.Youmightsay,"Just use GTK or QT"buttheyalsorequirewritingextracodeforWaylandorX11support.Thisleadstodevelopersnotsupportingoneortheother.</p>
<p>Forexample,IwanttoaddWaylandsupportintospmenu.I'd be happy to do so, but the problem is it would require rewriting the code for creating the window, handling events, keybinds, clicks, drawing, mapping, and more. It'sjustnotsomethingIwanttodealwith,whichiswhyI've chosen to not write any of my software to use Wayland native libraries. There is XWayland, but to my knowledge there'snosuchthinginreverse.</p>
<h2>Conclusion</h2>
<p>IwanttomentionthatI'm very much open-minded towards a new display protocol. I'mallforanew,moreminimal,morestabledisplayprotocol.It's just that Wayland makes it a pain to write compositors, and in many ways it'sadowngradefromX11,whichis<em>really</em>oldImightadd.That's not to say Wayland has no improvements and X11 is perfect. The most popular X11 implementation, Xorg is extremely bloated and has a lot of legacy code that really doesn'tmattertodayandtheprotocolitselfisprobablynotmuchbetter.</p>
<p>Italsohasabsolutelyhorriblesecurity.Butallthingsconsidered,IthinkX11justhasmuchbetterideasonwhatthedesktopshouldbethanWaylanddoes.IfWaylandimprovesthethingsIdon't particularly like, I may end up switching to it. But as of now, X11 works fine for me and the benefits of Wayland just aren'tworthit,soIamgoingtobestickingwithX11.Ifyouknowofanysolutiontothisproblem,I'd love to hear it, and I'dlovetogiveWaylandaproperchance.</p>