If anyone wants to give an ELI5 or a link to a video that ELI5 I’d be incredibly thankful
I swear that all the stuff I find is like super in depth technical stuff that just loses me in no time flat
Programs running graphically (Firefox, your file browser, etc.) need a way to tell the system “draw these pixels here”. That’s what the display server does; it takes all these applications, works out where their windows are and manages that pixel data.
XOrg has historically been the display server in common use, but it’s very old and very cobbled together. It generally struggles with “modern” things that must people expect today. Multimonitor setups, vsync, hdr and all that. They work, but support is hacked together and brittle.
Wayland is a replacement for XOrg that was designed from scratch to fix a lot of these issues. But it’s been an uphill battle because XOrg is the final boss of legacy codebases.
tl;dr They’re both software that manages drawing pixels from applications to the display.
XOrg is the final boss of legacy codebases.
Pretty sure the IRS still holds that title.
The TLDR was really helpful NGL
So it’s software that handles software wanting to display things on the screen. Because having each piece of software do it itself would be not only chaos but a massive security concern. And it’s a big deal because it fixes (by replacing) the old software with something that’s easier to work with than the old ways of doing things (due to all new code that’s not spaghetti that’s hacked together over decades).
Am I close?
Because having each piece of software do it itself would be not only chaos but a massive security concern.
Not really, the main point is that (most) apps don’t know where they are on the screen, whether they’re minimized, on the active workspace, … and they don’t care either. That’s the responsibility of the window manager.
The app tells the display server “I need a window to display these pixels” and that’s it. And the window manager, well, manages these windows.
On the topic of security, X11 doesn’t handle security at all, that’s one of the main issues. So any graphical app can read the other windows’ pixels, grab everything you type, everything you copy, … OTOH Wayland isolates apps so they can’t do that by default. Apps that really need to (screenshot apps, …) can use “portals” to ask for these permissions.
That’s really interesting and thank you
I think I’m beginning to get it now, and Wayland does sound better than X11 at least
I use wayland, but be warned that there are downsides.
X11 is 40 years old. Which means that even though it has 40 years of bad decisions baked into it, it also has 40 years of features and tooling built around it.
And in some cases, things are purposefully broken in the name of security as mentioned above. Writing a keylogger on X11? Easy. Every app can watch the keyboard even when they aren’t in focus. So if I type my password into firefox, Discord can listen. Hope you don’t have any malicious apps just patiently listening to all your keystrokes.
Getting rid of input listening sounds great! … Except for the concept of global keybinds. Have a Push to talk button in discord that you need it to be able to listen to while youre playing a game? Sorry, the game is in focus, so discord can’t see ANY of your input. Including the push to talk button. Different wayland servers have different ways of handling this with their portals. Some don’t have it at all. And the ones that do don’t always have great solutions.
One major issue that has been in wayland debate hell… how do multi-window apps communicate with each other. For example GIMP. The editor window is a separate window from the toolkit which is a separate from the layer view. GIMP on X11 knows where all of its windows are because it can see everything. if you wanted GIMP to save all the window positions, it could. GIMP on Wayland has no idea where each window is relative to each other. Each window knows its own size and shape. And thats it. It doesnt know where on the screen it is. Which means it doesnt know where it’s other sub windows are relative to itself. Which means GIMP on Wayland can’t really save the window positions for next run. Wayland is working on a protocol for handling this, but its been caught up in debate hell last I saw. This is a prime example of a thing X11 had. And Wayland will someday have, but the 40 year headstart and disregard for security gives X11 a huge headstart.
Most of these problems have workarounds and solutions, but you might find yourself in a situation where you do in fact need to implement a workaround instead of having everything Just Work.
“Better” means different things to different people. Architecture and security and technologically? Wayland is better. Just Works and its what your apps were probably built to run on so less weird edge case issues? X11 is still better just due to inertia. (And again, I use Wayland, I’m willing to deal with the workarounds, but you do you).
I’ll try to explain:
In the past we only had text terminals without a graphical interface ~1990 (sh / bash / tty). so the display server (Xorg / formaly known as X11) was born. it’s a piece of software that allows programs to not only print text to screen but to draw complex geometrical shapes. This allowed for gui programs that use frameworks like qt or gtk or motif… to draw buttons and shit using Xorg.
For having mutliple “windows” / “programs” running they invented a window manager, that drew a border around the windows with some min / max /close buttons and the modern gui was good to go. btw. the next step are desktop environments like kde or gnome but that would be too much for this post.
Back to display server (Xorg) and window manager (kwin, mutter, metacity, dwm, awesome, i3…): the design of xorg is super old and has many shortcomings like hdr, variable refreshrate or security: every window can read the contents of or produce input for other windows which is a nightmare for todays security standards.
So wayland was invented to use state of the art concepts and design. Here comes the big problem: State of the art concepts required wayland to not be a display manager like Xorg. wayland is more like a protocol that defines how to draw windows, resize and close them or how they are allowed to talk to each other. Since wayland is only a protocol+ the window manager now needs to do the heavy lifting of coordinating this protocol, drawing and stuff like that, which in turn results in way less window managers that support wayland because they are complex as hell.
Since modern software needs to support a heck of a lot of different ways for applications to interact with each other rewriting these functionality for wayland needs time. thats the reason desktop sharing/recording or muting your mic with a keyboard shortcut when the webex window was not in focus wasn’t possible at first. new solutiones needed to be developed for that (pipewire for example). Many programs would run in an xorg window that was implemented as a wayland window (xwayland) which made transitioning to wayland much easier but introduced new problems.
At the moment we are in a transitional phase. many programs already work without problems, but many software still require features wayland doesn’t have and might never implement. Everyone needing that software is hating on wayland. everyone needing variable refreshrate, fractional scaling or security prefers to use wayland. And the fighting begins.
Disclaimer: There might be errors, simplifications or misunderstandings on my side but thats the way i understood if. Feel free to correct any mistakes on my part.
I read this with the voice of the narrator in the Animatrix movie.
For having mutliple “windows” / “programs” running they invented a window manager (and for a time, it was good)
I hope this made it more enjoyable to read. English is not my first language
In short it’s essentially a protocol that defines what type of requests must be sent between applications and a compositor.
I don’t know what compositor is and at this point I’m too afraid to ask
It draws on the screen what programs and the desktop environment tell it to – including opacity, tiling, clicks, drags, updates, etc. Everything you visually perceive on the monitor is the product of the compositor.
See what you did?! Now there’s two of them!
Famous country western singer Wayland Jenkins.
Isn’t he the personal assistant to Mr Burns?
In short a graphics interface with code that is not old af!
I mean
Only relative to XorgThat’s technically true but not the whole picture since it was missing huge (some would say basic) features I wouldn’t say it was really “released”
It was quite a while after that they called it and it’s libraries feature of complete. With
wmDE integration and multiple monitors coming a while after that, it’s only been in the last maybe 5 years it was really usable? A solid option for a lot of people for maybe half that?That makes it pretty dang new.
Well. Is Xorg feature-complete?
It was the baseline so… Yes?
The feature completion was defined as running most normal applications and by the people working on Wayland not me some random guy on the Internet.
Because no one is going to use Wayland, if they can’t… use it
My neighbors dog is Wayland. He’s a good boy!
No matter! Pick a side now and join the jihad!
It’s not even hard picking sides when Wayland sucks so bad…
(I don’t know what Wayland is either)
Wrong choice buddy (wayland is the best thing ever happened trust me 100%!!!)
XOrg and Wayland are two different programs that serve the same purpose, which is to act as a sort of middleman between the graphics driver, the window manager(s), and the many programs you’re running.
XOrg is ancient. Early 80s ancient. It’s been added to since those days as need arose, and is therefore full of weird messy legacy stuff and jury-rigs. But it is also what Linux has used for a very, very long time, and is therefore like. Ol’ Reliable workhorse, yanno?
Wayland is a new and bold step that rewrites the entire system from the ground up to address the shortcomings of XOrg (don’t ask me to specify, I actually don’t know), it has, however, been criticised for not having (and devs downright not wanting it to have) certain features that XOrg has. But it can also run applications that expect XOrg with a thing (jargon escapes me) called XWayland.
Personally I’ve used both. And… Uh…
Wayland was a bit faster and smoother maybe? But it also caused some specific applications to misbehave and get all crashy-buggy. But that was a personal experience and may well have been my fault.
Wayland is a lot more secure and the way it handles clients is a lot more sane in todays age, but thing is, it is a hell of a lot more complicated if you come from a window manager background, and your choice of applications is incredibly small. Sure you can run a lot of your stuff in XWayland, but what exactly is the point of running wayland if you are going to run less secure X apps with 94% of the same vulnerabilities?
X is less secure, but the security of your system from the outside is far *faaar more important than the security on the inside. Only when an intruder actually infiltrates your system do you have a real concern, and that’s only talking about remote access. Physical access given enough time is root access.
A lot of people tout X as being considerably more bloated than wayland which is why the project is basically in maintenance mode, wayland is definitely a lot quicker than X, but X has many reasons including support from literally every single linux application out there, something wayland is very likely never going to acheive even with XWayland.
This is false. X is not less secure than Wayland. It does have a different security model, which can become insecure if you misuse it. I don’t think people really care about situations where multiple user accounts access the same display.
In my opinion, the benefits of xdotool far outweigh any benefits gained by Wayland’s security model. It’s impossible to make xdotool in Wayland, because of its security model.
X is inherently less secure due to the fact alone that, given enough time, new vulnerabilities will come out that will not be patched because X11 is EOL. Yes it has a different security model, but that security model is not very well implemented because X has an enormous code base that, at the end of the day is still not bug free (nothing is). There is a lot of legacy code contained in X that legitimately does not even have a function because there is nothing around today to use it.
Larger codebase = more moving parts = more code to exploit. That’s the benefit to wayland aside from active support by the X/Wayland devs.