So, I want to address this comment (Chesterton’s Fence) and then deal with the many unmentioned elephants in the room.
Linux developers have already decided how they’re going to deal with the Chesterton’s Fence problem: drop support for all old hardware. This is a common technique used by large corporate entities when they want to push a new feature set without dealing with legacy code. Tell everyone “you can’t use it anymore, so BUY the upgrade.” And that “buy” part is important: Linux, Rust, Wayland, et al are overwhelmingly funded by large hardware and software manufacturers who financially benefit if you are forced to upgrade.
Which leads us to why X development was killed. As many people have pointed out in this thread, X is very old. But you know what? Wayland also very old.
Age is unimportant in software: it can be re-written as many times as is necessary to bring it up to modern standards. FreeDesktop made the decision to kill X, going so far as to remove the XLibre dev’s changes, thus re-opening old bugs which had already been fixed.
If your truthful and true motivation is to kill the product due to it being unmaintainable, why would you deliberately block someone who DOES want to maintain it? For free, no less.
Well, simple again: money.
That’s not to say the transition is pointless. Wayland does fix some architectural problems with X. For example, the oft-mentioned keylogging issue. The directory which deals with sockets was moved and protected under Wayland so that apps can only access windows they should have permission to access.
But… Here’s a question. If you’re going to break support for every single X app anyway, why not just make that same change on X? Why not re-write the sockets subsystem to function more or less in a manner similar to Wayland?
Well, that’s because of the differing client-server models of the two protocols. Unlike what’s often stated online, Wayland retains the client-server divide of X, it just inverts which component has control over compositing. Under X, the client and/or compositor have control, whereas under Wayland, the protocol itself takes ultimate control. This is what’s often said to give Wayland all those nice benefits, such as reduced latency/screen tearing, better maintainability, and better security.
Let’s address each of those claims in order. Each section will have a TL;DR at the bottom.
Latency:
A recent benchmark found X has less latency except under some conditions. I’m not allowed to post links apparently, so look up “Measuring input latency on Linux: X11 vs Wayland, VRR, and DXVK.”
This makes perfect sense. X, for all its conceptual overhead, is not taking full control of the compositing process. Apps can choose which parts of the suite to include or ignore, thus dropping any code they don’t explicitly use from their compositing pipeline.
This is similar to using a sandboxing app like Flatpak containing a vanilla browser versus Chrome/Firefox with their per-tab sandbox built-in. Yes, the two-app solution has more technical overhead, but if you’re only ever going to use the browser to view local HTML files, why in the world would you even need a sandbox? That entire architecture is useless and simply bloats your Chrome tabs to 2+ gigabytes for zero benefit to your use case.
Even if you do need the sandbox, an external sandbox app could better manage memory and processor usage by virtue of the two apps needing to communicate coherently.
You see, if an app simply “does” a thing, the code which does this thing can be spaghetti. Nobody will ever notice a massive memory leak or repeated access faults, because you just cover it up with more spaghetti and move on, ignoring or deleting any bug reports to the contrary since you’ve already “patched it.”
However, if two apps must communicate, this coding modality becomes a consistent problem that pops up over and over. Downstream users of your app might even code a patch that fixes your spaghetti and send it upstream.
TL;DR: Wayland’s latency isn’t better, and even if it was, Wayland’s design philosophy quite literally discards one of the main reasons why Linux is open source. By taking control away from the app, you also remove many devs’ desire or ability to support an open ecosystem.
Screen Tearing:
This happens because the GPU’s refresh rate isn’t exactly matching your monitor’s refresh rate. What exactly about the X protocol prevents these two hardware components from communicating efficiently?
Well, Intel drivers have had a “TearFree” setting for ages. In short, the setting redirects a good chunk of the timing work away from the compositing manager and to the intel driver. It uses more memory, has more output latency (but does not affect input latency), and reduces frames per second.
Did you notice something, though? I said compositing manager. Yes, the problem was (and is) that some compositing managers aren’t up to snuff. X is just providing the framework upon which these compositing managers function. If the API is no good, somehow, thus necessitating the driver to step in, can’t X just… Patch that one part? It’s literally impossible for a protocol to be so fundamentally flawed from the top down that just that one part of the protocol can’t be changed to better facilitate a downstream component.
This is like, API coding 101. You don’t need throw out an entire API simply because one section thereof has some sort of inefficiency. Unless the physical architecture it’s built upon were to change in some fundamental way… Which I’ll discuss in the security section.
So, let me ask a serious question: why the F*** are we putting this role directly into Wayland? People talk about X being a sprawling mess of code, but here we have Wayland taking control over something a compositing manager should be doing, which necessarily means tighter integration with hardware for no tangible speed or reliability benefits. This one technical change SO dramatically increases the technical debt of the Wayland project that nobody except a large corporate-funded entity could possibly maintain it.
TL;DR: Screen tearing was and is a Linux problem. Wayland “fixed” it by acting like the Borg.
Maintainability:
Speaking of technical debt, one of Wayland’s main changes was to take ultimate control over compositing. Why, though? What benefits does this supposedly bring?
The main benefit is per-window permissions. But what does this actually mean to an end-user? Well, dramatically increased friction between apps, dramatically increased memory usage since apps need far more frameworks, dramatically increased development cycles for new GPU technologies… It goes on and on. You get the idea.
Since every window effectively becomes its own sandboxed instance at the GPU level, Wayland necessarily uses more resources than X. True, the protocol itself can appear slimmer and more efficient at first blush, but that’s because it slams all the technical deficits downstream for app developers to deal with. That’s why you have this sprawling mess of dependencies and frameworks in modern Linux. It’s almost all Wayland’s fault.
But this isn’t enough to explain the actual purpose of Wayland’s sandboxing. On an end-user PC, Linux is oodles more secure than any other OS, so adding additional sandboxing at the app level seems slightly excessive, doesn’t it? If you install malware, you’re still getting infected, because most of Linux’s app packaging regimes are themselves insecure. The whole sandboxing thing goes right out the window. Pun intended.
X could also do this same sandboxing, if the sockets subsystem was re-written to obey filesystem permissions. We could retain all the cross-app communication benefits of X without the global keylogging problem - if we just fixed that one issue.
TL;DR: Wayland’s maintainability is more straightforward, but requires more ongoing work.
Security:
Is security the problem Wayland is trying to solve with its per-window sandboxing? While it wouldn’t be trivial, managing app sandboxing on X beyond just sockets could feasibly be accomplished via the aforementioned filesystem permissions… Instead of by forcing it all into the nebulous Wayland API permissions structure, whatever that structure actually is. It’s like we’ve re-invented the wheel specifically to make it more user-hostile.
Since this is the case, we can reliably determine that Wayland’s true purpose is to enable server-side compositing. That is, you type keystrokes on your PC, they go to a server somewhere, and then your screen sees the result. Like cloud gaming, but for your whole PC. Remember: Wayland takes control over the compositing by removing all ultimate permissions from the app and compositing manager. Control rests with Wayland - and that’s supposedly the main benefit.
What corporation would need to worry about security or finances if none of your apps were on your PC? They could detect you probing their apps for vulnerabilities and ban you from using their services. They could randomly pick a day to discontinue your app contract and extort more cash from your digital wallet. Maybe you wouldn’t even notice when the money goes missing. After all, the server controls what you “see.” But this also means they also won’t need to worry about piracy or competing apps…
Because they can block all competition.
This design philosophy goes back to the increasingly bloated UEFI, which first gained Secure Boot back in the 2000s. The concept was groundbreaking: form a cryptographic boot chain from the hardware up to the OS, thus ensuring a trusted app environment.
In practice, though, the private keys defining this secure boot chain remain controlled by the hardware manufacturers to this very day. Which means malware can issue itself a public key, take control over your hardware, download a new UEFI package, and now your motherboard is permanently infected. There’s nothing you can do because now the malware controls the secure boot chain. You can replace the infected chip, but congratulations, now all your encrypted data is gone. The hardware manufacturer can also invalidate the malware’s certificate, but do you think the malware will let your PC check a revocation list? Hah!
There is one way to fix this without giving end users control over the private key, however:
A locked boot loader.
Why does nobody in open source seem to see this blatant trojan horse? We already have an entire ecosystem of mobile devices where only “approved” devices and “approved” OSes can operate “approved” apps via “approved” development kits.
Do you really f*cking think they’re not going to lock out unapproved Linux distros from PCs, too? The T2 chip is Apple’s prototype of a locked PC bootloader, and the TPM chip is Microsoft’s “final solution” to the problem of user choice and user freedom.
This isn’t some conspiracy theory. They’re ALREADY doing this. It’s literally in front of you.
Which get us back to Wayland’s sandboxing: to form a secure execution chain which only approved malware can exploit. True, Wayland also allows for more secure virtualization and multi-host systems, but if that were the main purpose, Wayland’s lead developer would not have any reason to deliberately kill X development, now would they? Such security could feasibly be implemented under X without the overbearing per-window control that is a hallmark (and touted feature) of the Wayland protocol.
As mentioned above, Wayland is more secure than X because it virtualizes apps. It’s also FAR less secure due to the manner in which it performs said virtualization. X is a unilaterally superior platform upon which to build app virtualization, except that there’s too much technical debt to reliably build an iron cage from which non-approved app developers can never escape.
No, criminals won’t be as easily able to keylog your PC with modern Wayland vs modern X, but if some nation wants to determine who is Jewish and murder them all, a digital Judenstern becomes a trivial thing to implement under Wayland. Not so under X.
TL;DR: Security for thee, but not for me.
In summation: