this post was submitted on 27 Dec 2023
163 points (100.0% liked)

Linux

1259 readers
43 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Well known KDE developer Nate Graham is out with a blog post today outlining his latest Wayland thoughts, how X11 is a bad platform, and the recent topic of "Wayland breaking everything" isn't really accurate.

"In this context, “breaking everything” is another perhaps less accurate way of saying “not everything is fully ported yet”. This porting is necessary because Wayland is designed to target a future that doesn’t include 100% drop-in compatibility with everything we did in the past, because it turns out that a lot of those things don’t make sense anymore. For the ones that do, a compatibility layer (XWayland) is already provided, and anything needing deeper system integration generally has a path forward (Portals and Wayland protocols and PipeWire) or is being actively worked on. It’s all happening!"

Nate's Original Blog Post

top 46 comments
sorted by: hot top controversial new old
[–] bitcrafter@programming.dev 77 points 11 months ago* (last edited 11 months ago) (1 children)

Alternatively, instead of reading a Phoronix article that has a couple of short snippets from a much longer blog post, you can read the original blog post yourself to see the full context.

Edit: Also, it is worth noting that the author of the original blog post had previously written another relatively recent post criticizing the way in which Wayland was developed, so it's not like they are refusing to see its problems.

[–] IHeartBadCode@kbin.social 15 points 11 months ago (1 children)

One of the specific issues from those who've worked with Wayland and is echoed here in Nate's other post that you mentioned.

Wayland has not been without its problems, it’s true. Because it was invented by shell-shocked X developers, in my opinion it went too far in the other direction.

I tend to disagree. Had say the XDG stuff been specified in protocol, implementation of handlers for some of that XDG stuff would have been required in things that honestly wouldn't have needed them. I don't think infotainment systems need a concept of copy/paste but having to write:

Some_Sort_Of_Return handle_copy(wl_surface *srf, wl_buffer* buf) {
//Completely ignore this
return 0;
}

Some_Sort_Of_Return handle_paste(wl_surface *srf, wl_buffer* buf) {
//Completely ignore this
return 0;
}

Is really missing the point of starting fresh, is bytes in the binary that didn't need to be there, and while my example is pretty minimal for shits and giggles IRL would have been a great way to introduce "randomness" and "breakage" for those just wanting to ignore this entire aspect.

But one of those agree to disagree. I think the level of hands off Wayland went was the correct amount. And now that we have things like wlroots even better, because if want to start there you can now start there and add what you need. XDG is XDG and if that's what you want, you can have it. But if you want your own way (because eff working nicely with GNOME and KDE, if that's your cup of tea) you've got all the rope in the world you will ever need.

I get what Nate is saying, but things like XDG are just what happened with ICCCM. And when Wayland came in super lightweight, it allowed the inevitably of XDG to have lots of room to specify. ICCCM had to contort to fit around X. I don't know, but the way I like to think about it is like unsalted butter. Yes, my potato is likely going to need salt and butter. But I like unsalted butter because then if I want a pretty light salt potato, I'm not stuck with starting from salted butter's level of salt.

I don't know, maybe I'm just weird like that.

[–] aard@kyu.de 24 points 11 months ago

I don't think infotainment systems need a concept of copy/paste but having to write:

Having lived through the whole "phones don't need copy and paste debate", which fortunately got solved by now having it everywhere I'm in the camp "just stick that everywhere, just in case somebody might use it one day"

[–] IHeartBadCode@kbin.social 35 points 11 months ago (2 children)

Over on Nate's other blog entry he indicates this:

The fundamental X11 development model was to have a heavyweight window server–called Xorg–which would handle everything, and everyone would use it. Well, in theory there could be others, and at various points in time there were, but in practice writing a new one that isn’t a fork of an old one is nearly impossible

And I think this is something people tend to forget. X11 as a protocol is complex and writing an implementation of it is difficult to say the least. Because of this, we've all kind of relied on Xorg's implementation of it and things like KDE and GNOME piggyback on top of that. However, nothing (outside of the pure complexity) prevented KWin (just as an example) implementing it's own X server. KWin having it's own X server would give it specific things that would better handle the things KWin specifically needed.

Good parallel is how crazy insane the HTML5 spec has become and how now pretty much only Google can write a browser for that spec (with thankfully Firefox also keeping up) and everyone is just cloning that browser and putting their specific spin to it. But if a deep enough core change happens, that's likely to find its way into all of the spins. And that was some of the issue with X. Good example here, because of the specific way X works an "OK" button (as an example) is actually implemented by your toolkit as a child window. Menus those are windows too. In fact pretty much no toolkit uses primitives anymore. It's all windows with lots and lots of text attributes. And your toolkit Qt, Gtk, WINGs, EFL, etc handle all those attributes so that events like "clicking a mouse button" work like had you clicked a button and not a window that's drawn to look like a button.

That's all because these toolkits want to do things that X won't explicitly allow them to do. Now the various DEs can just write an X server that has their concept of what a button should do, how it should look, etc... And that would work except that, say you fire up GIMP that uses Gtk and Gtk has it's idea of how that widget should look and work and boom things break with the KDE X server. That's because of the way X11 is defined. There's this middle man that always sits there dictating how things work. Clients draw to you, not to the screen in X. And that's fundamentally how X and Wayland are different.

I think people think of Wayland in the same way of X11. That there's this Xorg that exists and we'll all be using it and configuring it. And that's not wholly true. In X we have the X server and in that department we had Xorg/XFree86 (and some other minor bit players). The analog for that in Wayland (roughly, because Wayland ≠ X) is the Compositor. Of which we have Mutter, Clayland, KWin, Weston, Enlightenment, and so on. Which that's more than just one that we're used to. That's because the Wayland protocol is simple enough for these multiple implementations.

The skinny is that a Compositor needs to at the very least provide these:

  • wl_display - This is the protocol itself.
  • wl_registry - A place to register objects that come into the compositor.
  • wl_surface - A place for things to draw.
  • wl_buffer - When those things draw there should be one of these for them to pack the data into.
  • wl_output - Where rubber hits the road pretty much, wl_surface should display wl_buffer onto this thing.
  • wl_keyboard/wl_touch/etc - The things that will interact with the other things.
  • wl_seat - The bringing together of the above into something a human being is interacting with.

And that's about it. The specifics of how to interface with hardware and what not is mostly left to the kernel. In fact, pretty much compositors are just doing everything in EGL, that is KWin's wl_buffer (just random example here) is a eglCreatePbufferSurface with other stuff specific to what KWin needs and that's it. I would assume Mutter is pretty much the same case here. This gets a ton of the formality stuff that X11 required out of the way and allows Compositors more direct access to the underlying hardware. Which was pretty much the case for all of the Window Managers since 2010ish. All of them basically Window Manage in OpenGL because OpenGL allowed them to skip a lot of X, but of course there is GLX (that one bit where X and OpenGL cross) but that's so much better than dealing with Xlib and everything it requires that would routinely require "creative" workarounds.

This is what's great about Wayland, it allows KWin to focus on what KWin needs, mutter to focus on what mutter needs, but provides enough generic interface that Qt applications will show up on mutter just fine. Wayland goes out of its way to get out of the way. BUT that means things we've enjoyed previously aren't there, like clipboards, screen recording, etc. Because X dictated those things and for Wayland, that's outside of scope.

[–] fxdave@lemmy.ml 11 points 11 months ago* (last edited 11 months ago) (1 children)

That's my problem with this. It tries to be a desktop display server protocol without unifying all desktop requirements. Sure, X11 is old and have unnecessary things that aren't relevant anymore, however, as someone who builds their own DE, (e.g.: tiling window managers) I see it as the end of this masterrace. Unless everybody moves to wlroots. Flameshot, for example, is already dealing with this, having at least 5 implementations only for linux, and only wlroots and x11 are standards.

Also, imo, having windows in windows is useful when you want to use your favourite terminal in your favourite IDE. But as you said DEs can implement it simply. Let's say wlroots will implement this but others can decide otherwise. And for those the app won't run.

Another example, that affects my app personally, is the ability to query which monitor is the pointer at. Wayland doesn't care having these so I doesn't care supporting wayland. And I"m being sad about this because X is slowly fading away so new apps will not run on my desktop.

Moreover with X11 I could write my own hotkey daemon in my lanuage of choice, now I would have to fork the compositor.

Do I see it wrong?

[–] barsoap@lemm.ee 2 points 11 months ago

Also, imo, having windows in windows is useful when you want to use your favourite terminal in your favourite IDE.

The wayland way to do that is to have the application be a compositor, they made sure that nesting introduces only minimal overhead. And that ties in with the base protocol being so simple: If you only need to deal with talking to the compositor you're running on, and to the client that you want to embed, a wayland compositor is indeed very small and lean. Much of the codebase in the big compositors deals with kms, multiple monitor support, complex windowing logic that you don't need, etc.

Oh and just for the record that doesn't mean that you can't undock the terminal: Just ask the compositor you're running on for a second window and compose it there. You can in principle even reparent (client disconnecting from one compositor and connecting to the other) but I think that's only standardised for the crash case there's no standard protocol to ask a client to connect to another compositor. Just need to standardise the negotiation protocol, not the mechanism.

[–] corsicanguppy@lemmy.ca 2 points 11 months ago

The fundamental X11 development model was to have a heavyweight window server–called Xorg–which would handle everything, and everyone would use it.

So there's a Wayland hope for systemd-afflicted boxes and their cults.

[–] leopold@lemmy.kde.social 27 points 11 months ago (2 children)

Oh boy, 102 comments. Knowing Phoronix, I bet those are a treat to read.

Reading angry boomer Linux comments is one of my most favorite hobbies

[–] IverCoder@lemm.ee 1 points 11 months ago* (last edited 11 months ago)

Fourteen pages of comments within a day of posting in Phoronix? Grab your popcorn guys 🍿

[–] Dio9sys@lemmy.blahaj.zone 11 points 11 months ago

It's super impressive to see Wayland having its big breakthrough moment. I remember reading about Wayland 10 years ago and worrying it was going to end up as a dead project.

[–] mr_MADAFAKA@lemmy.ml 11 points 11 months ago

Oh boy, the Phoronix's comment section 💀

[–] loopgru@slrpnk.net 10 points 11 months ago (2 children)

Anecdote, I know, but for my use cases, Wayland just isn't there yet- I wind up with far more random bugs and less battery life. I don't pretend to know why, I'm a pleb non-developer, but until that's resolved I'm still stuck on X. I'd love to use the new shiny thing of The Future™, but not at the cost of stability and usability.

[–] dRLY@lemmy.ml 8 points 11 months ago (1 children)

I think that given how frequently this argument is brought up (and it is of course true about it not being completely there yet) so this is just my opinion on the situation (and I am not a dev so I am fine with being wrong and corrected). It is kind of needed for more projects/distros to start actively using it. As a lot of the stuff kind of needs the band-aid ripped off to start forcing it to get there faster at this point. Otherwise it just keeps being held back as people on the coding end of things will keep focusing on X11 issues instead of getting things ready for Wayland.

Kind of like the conundrum of mobile OSes that aren't Android or iOS. It is hard to get people/companies to even try the new OS because the lack of apps (specifically the most common ones used by the most people). But app devs don't want to spend time re-building or starting new apps for an OS that isn't being used (or on devices people are buying). So at a certain point it needs both sides to interact and make progress. The OS needs the apps more at this point, and getting feedback and data from those devs makes it known where things are and aren't working. But it is also true the devs for the apps might end up finding out the OS is actually easier to work with compared to what they have been doing/dealing with on Android/iOS.

Getting a replacement for X11 has been needed for a long time as the OSes and features keep needing something new to better work for how computers have advanced. And it isn't something that many devs would want to take on given how easy it is to just use what is already known. Since Wayland has finally gotten to the point it is now, it is time for more devs to start learning/moving to the new thing to get attention to the stuff that they need. The hardest part is this in between period for users as it can and will cause random issues (like the ones you have seen). Stability is important, but Linux is great because there will always be distros and projects that keeping the old thing running well is the main objective. So we are in some great times for the new to be pushed hard so it can become the stable future needed.

[–] nix@midwest.social 2 points 11 months ago

Been trying to think of a term for this issue. It's not quite chicken or egg. But both sides need the other side to incentivize them. If one gets going the other will follow, but they're waiting for each other. Like some sort of collaborative standoff.

[–] vox@sopuli.xyz 3 points 11 months ago

Wayland nearly doubled my battery life lol

[–] lntl@lemmy.ml 10 points 11 months ago (2 children)

Wayland developer says X11 is bad, not Wayland

[–] Vincent@kbin.social 24 points 11 months ago (1 children)

Notably absent: X11 developer saying Wayland is bad, not X11.

[–] bluGill@kbin.social 4 points 11 months ago (1 children)

Mostly they are the same people.

[–] Vincent@kbin.social 7 points 11 months ago* (last edited 11 months ago)

Well, yes, except that those X11 developers agree that Wayland is better.

[–] jjlinux@lemmy.ml 1 points 11 months ago

Nobody, other than you and them, cares. Have a good day.

[–] possiblylinux127@lemmy.zip 8 points 11 months ago (1 children)

I don't see why we need convincing that Wayland's better. Most Linux users either use it currently or are possibly looking to switch in the future. The other people who are not are likely going to use X for eternity

[–] Infiltrated_ad8271@kbin.social 9 points 11 months ago (2 children)

I think real X11 fanboys are almost non-existent. Wayland wouldn't be so rejected if it wasn't that it still has a lot of compatibility issues, I think most people just want everything to work and don't care whose fault it is.

[–] lemmyvore@feddit.nl 9 points 11 months ago (1 children)

Yeah I don't get why some people would think sticking to X is fanboyism. Nobody likes X, let alone love it. Most people's relation to X is pragmatic, it's "it works and does everything I need".

If anything, fanboyism is telling people they have to use Wayland when it doesn't yet work for what they need it to do.

Just keep improving the damn thing and people will switch when it's ready. There's no convincing needed.

[–] mnglw 2 points 11 months ago

exactly this, I'll use it when it works with no questions asked. I.e: when it becomes invisible to me as an enduser

as for now, it isn't, far from it

[–] UnityDevice@startrek.website 4 points 11 months ago* (last edited 11 months ago)

I remember some 10-15 years ago when I'd look at the y windows website every couple of months hoping for some news of progress, simply because I was sick of x11 being so crappy. I hated it, it was so fiddly, it didn't work right, I just wanted something that worked.
So you can imagine how happy I was when Wayland started taking off. Here was the promise of something better, something that just worked, it sounded amazing. And yet, today I'm still running xorg and I will be for the foreseeable future.

The reason is simply that in the time passed xorg just became usable, I don't have to think about it, it works reliability, it has all the features I need and I hardly ever have to touch it. Meanwhile, I log into my Wayland session and instantly 3 or 4 of the applications I use daily either don't work or act weird. I go and try and fix the issues and I'm told to just accept it, or that I actually don't exist because Wayland works perfectly for everyone. And I'm not even using an Nvidia card, just plain Radeon.

So I quit and go back to what works. Maybe in a couple of years, until then: no thanks.

[–] Omega_Jimes@lemmy.ca 6 points 11 months ago

I love Wayland until I don't. I honestly don't think about it, it gets out of my way and my system is stable, until I go to use something like scrcpy that just doesn't work at all. Luckily, the amount of things that straight up don't work is shrinking.

[–] Kristof12@lemmy.ml 5 points 11 months ago* (last edited 11 months ago) (1 children)

Trying to gaslight others? nice

[–] Ephera@lemmy.ml 8 points 11 months ago

No, they're discussing the way forward and what they think makes sense. In fact, they're even clearly stating that there will be pain, because Wayland intentionally does less than X11. And they're encouraging people with unsolved pain points to speak up.

[–] autotldr@lemmings.world 5 points 11 months ago (1 children)

This is the best summary I could come up with:


Well known KDE developer Nate Graham is out with a blog post today outlining his latest Wayland thoughts, how X11 is a bad platform, and the recent topic of "Wayland breaking everything" isn't really accurate.

Nate Graham acknowledges current gaps in Wayland support but on the matter of "Wayland breaks everything" isn't really the right perspective: "Look, if I said, “Linux breaks Photoshop; you should keep using Windows!” I know how you’d respond, right?

You’d say “Wait a minute, the problem is that Photoshop doesn’t support Linux!” And you’d be right.

Because there’s nothing Linux can do to ‘un-break’ Photoshop; Adobe needs to port their software, and they simply haven’t done so yet.

This porting is necessary because Wayland is designed to target a future that doesn’t include 100% drop-in compatibility with everything we did in the past, because it turns out that a lot of those things don’t make sense anymore.

For the ones that do, a compatibility layer (XWayland) is already provided, and anything needing deeper system integration generally has a path forward (Portals and Wayland protocols and PipeWire) or is being actively worked on.


The original article contains 395 words, the summary contains 187 words. Saved 53%. I'm a bot and I'm open source!

[–] kingmongoose7877@lemmy.ml 3 points 11 months ago

Scram, tin man.

[–] sherlockholmez@lemmy.ml 5 points 11 months ago* (last edited 11 months ago) (5 children)

~~Wayland doesn't support Nvidia GPUs yet~~

I'm sorry, my bad, I was unaware.

Nvidia GPUs don't support Wayland yet. As Linux Torvalds would say, "NVidia, Fuck You"

[–] gnumdk@lemmy.ml 5 points 11 months ago

Fuck You NVIDIA

[–] cobra89 4 points 11 months ago

Uh reading the article, pretty sure the author would phrase it as "Nvidia GPUs don't support Wayland yet" and that author would be absolutely right.

[–] tiziodcaio@feddit.it 2 points 11 months ago* (last edited 11 months ago)

My nVidia GPU works with the propietary driver

[–] walthervonstolzing@lemmy.ml 2 points 11 months ago (1 children)

FWIW, I'm typing this on the latest GNOME, on wayland, on nvidia proprietary drivers; and it works just fine


EXCEPT for suspend & resume, which is annoying to be sure; but on 2 screens with different refresh rates & different dpi ratios I at least don't run into some of the weird behavior I do run into using X11.

I used to be an Xfce purist; but this particular setup is even less taxing on the GPU (GTX 970) compared to Xfce's standard compositor (around 20W on light usage, vs. 35+W); & and the font rendering is slighly better, which is a huge factor AFAIC.

[–] theshatterstone54@feddit.uk 2 points 11 months ago (1 children)

Hey there, what tool do you use to find power usage? Thanks

[–] walthervonstolzing@lemmy.ml 1 points 11 months ago

Hi; I rely on nvidia-smi mostly; but the nvidia-settings gui app also shows temperatures & wattage (though that app might be x11-only).

[–] Kristof12@lemmy.ml 2 points 11 months ago

Nouveau is functional... Probably

[–] FiskFisk33@startrek.website 2 points 11 months ago (1 children)

Soo support for something like synergy would be great!

[–] mnglw 2 points 11 months ago* (last edited 11 months ago)

fucking what synergy doesn't work on Wayland? welp. I use that daily and no, that's not optional, its rather critical for my setup

[–] taanegl 2 points 11 months ago

Wayland on an Intel iGPU runs flawlessly and has for several years. However, that's a matter of drivers. AMD is in the forefront regarding having dGPU support, while NVIDIA is playing catch-up.

In any case, the future is bright.

[–] MonkderZweite@feddit.ch 1 points 11 months ago* (last edited 11 months ago)

Because Wayland is only a protocol and you write the platform yourself (be it badly or not).

Would be cool if the reference implementation (Weston) were not an unusable monolith but a small plugin-based thing.