this post was submitted on 05 Feb 2025
41 points (93.6% liked)

Linux

49554 readers
602 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
 

I stumbled upon this post regarding an earlier rant about wayland, but now it seems fine, according to the author.

After using Linux for nearly 5 years, using both depending on distros defaults, I have to admit that I never got the core/main/game changing differences between wayland and x11.

To be said, that I also dont do fancy linux things other than basic sysadmin stuff and from time to time repair the mess my curiosity left behind.

Could somebody explain the differences between those two and afterwards maybe also say some words about what this has to do with the difference between window managers and desktop environments?

I am also happy about links to good blog posts or stuff, that target this very questions (as long as the questions make sence of course). Thanks beforehand :)

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 43 points 7 hours ago (2 children)

Before Wayland, there was X Window System, created in 1984. X Window System was designed in a time where you had one good computer connected to multiple displays used by different people. X went through many versions but version 11 (X11) stayed around for a long time.

But the architecture just isn't good. It wasn't designed for modern needs. MacOS used to use X, but replaced it to fit modern needs. Windows didn't use X, but they too updated Windows to fit modern needs. But Linux and other OSs stuck with X for a lot longer, hacking it to make it work. Honestly, it's amazing how well it does work.

But isn't not great. It wasn't designed with security in mind, it doesn't do multi-monitor well. Behind the scenes, it considers everything to be one giant display; issues arise when it comes to mixed-dpi displays and when monitor refresh rates don't match. It's also just a bloated, old code base that people don't want to work on. Fixing X would not only be difficult, but would break compatibility.

So people got working on a modern replacement for X aiming to avoid its issues. Wayland is leaner, more opinionated, and designed for how modern hardware operates. Wayland itself is just a protocol (like X11), and there's many different implementations of that protocol: Mutter, Kwin, wlroots, smithay, Mir, Weston, etc. Meanwhile X11 pretty much only had one relevant implementation, Xorg. Wayland's diversity has its pros and cons. Pros include (1) you can create your implementation in any programming language you want rather than being stuck to just one, (2) an implementation can fill just the needs on the person making it rather than trying to generalize it for everyone. But cons include the fact that this fragmentation leads to scenarios where one implementation supports something that others don't and implementation-specific bugs.

Wayland's opinionated design is also draws criticisms. It gives a lot of control to the compositors rather than windows, which is how Xorg, MacOS, and Windows work. Nvidia's wayland adoption was also slow and terrible. It took many years to get it into the only decent shape it's in now.

[–] [email protected] 2 points 6 hours ago (1 children)

Thanks for the interesting write up! Why does Nvidia have to "adopt" Wayland? Is it not just fundamentally drawing some textures into some rectangles?

[–] [email protected] 6 points 5 hours ago (1 children)

Unfortunately not. There’s been a number of things on Nvdia’s side that slowed down Wayland adoption.

They didn’t always support Xwayland hardware acceleration.

Nvidia pushed for a technology called EGLStreams while everyone else agreed on GBM. So the desktop stack had to support both. Nvidia eventually relented and started supporting GBM.

Nvidia didn’t support VRR or night light for a while.

Nvidia didn’t support necessary stuff for Gamescope to function properly.

And overall Nvidia on Wayland was just buggy. I remember that many games failed to launch or had weird performance issues. But those issues just went away when I got an AMD card.

But things are in a much better state today. Though I did recently test a 20 series card on Fedora 41 and it was a terrible experience on the proprietary drivers. But when speaking with orhers, they didn’t share my issues.

[–] [email protected] 1 points 3 hours ago* (last edited 3 hours ago) (1 children)

Why does Nvidia need to support night light? Can't someone from Wayland just write a simple shader in any shader language that does colour adjustments and apply it to the desktop?

[–] [email protected] 4 points 2 hours ago

The Nvidia driver didn’t support some protocol that AMD/Intel did that was used by desktops for the night light.

Yes, they could have made the night light work. But why would they when Nvidia said the feature was coming soon? Well it turned out that soon was taking a very long time and eventually KDE actually did create a special night light implementation just for Nvidia. The problem was that it was a hack that had extra overhead. And in the end the hack didn’t get shipped because Nvidia finally starting supporting the protocol.

[–] [email protected] 2 points 6 hours ago (1 children)

Excellant write up, thank you.

I'm not exactly sure what 'opinionated' means in terms of software, could you (or anyone who sees this) define it?

[–] [email protected] 4 points 5 hours ago

One opinion that Wayland has is that the client is responsible for decorating its window. It draws its own title bar, shadow around the window, and the cursor.

Though not everybody was happy with this. A few protocols were created that lets clients tell the compositor to draw decorations around the window and the cursor.

But still, every app needs to support those client side decorations and cursors because not all compositors support those protocols. Gnome notably doesn’t, they like client side decorations.