this post was submitted on 09 Jul 2024
73 points (97.4% liked)

Linux

48143 readers
756 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 switched to Linux about 1.5 years ago now when replacing my old Macbook Pro with a Tuxedo Infinity Book. I am super happy with the transition, and for the most part my digital life has severely improved as a result of it. There's one thing in particular though that I haven't fully grasped or understood despite all the talk about it, and that really has mostly caused confusion on my part, and that is Xorg/X11 (I don't know the difference...) vs. Wayland.

I started out with Tuxedo OS 1 and 2 running KDE Plasma 5.x.x, and thus have been on X11 for the most part since switching to Linux. I never dared switching to Wayland myself. However, they somewhat recently started offering optional upgrades to Tuxedo OS 3 running KDE Plasma 6 where Wayland is the default, and I took the plunge. The only real difference I noticed was small annoyances that I had to fix. Glitching windows running on XWayland and having to configure some .desktop-files to force apps to launch natively in Wayland. Apps not showing the correct desktop icons but the generic Wayland logo instead, making Alt+Tabbing a bit more difficult because it is harder to tell applications apart. Annoying smooth scrolling (I don't want scrolling to have as much friction as polished ice) activated in all kinds of applications that I seem to have to turn off individually. Nothing breaking (though I haven't dared booting with my Nvidia dGPU yet in fear of breaking something irreversibly...), but I haven't noticed any improvements either, and I find it a bit frustrating not knowing where to make the necessary changes and always having to search for it seemingly on a case by case basis.

Now for instance I was updating FreeTube to a new version, and the flags I previously added to the ́.desktop'-file suddenly doesn't work anymore (--enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto). The application won't launch unless I remove them, but then it launches under XWayland instead. Not that I have any issues so far running it like that, but I guess I would prefer to run everything natively in Wayland if I can.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 96 points 4 months ago* (last edited 4 months ago) (12 children)

I can explain the difference between X11 and Xorg with an analogy to the web and web browsers: X11 is like HTTP, Xorg is like the Chrome browser. X11 is the protocol, Xorg is software that implements that protocol.

X11 is old, it was designed back in the 1980s and includes messages for drawing lines and circles and fonts on the screen. Also, back then there were a lot of "thin clients", computers that were basically nothing but a browser, since graphics were computationally expensive and could not be done on the client computer, graphics rendering was done server side. There are lots of messages in the protocol for handling screen updates over a computer network.

Nowadays, all personal computers are powerful enough to render their own graphics, and no one needs the display server to draw individual lines or circles on screen. Vector graphics and fonts are done at the application level, not over the network. So these these messages specified in the X11 protocol are hardly ever used. Really, most of X11 (let's say 90% of it) is not used at all, only the parts where the keyboard and mouse are defined, and how you can allocate memory to buffer a graphic and copy that buffer to the display. But you still need to maintain the Xorg software to handle everything that X11 specifies, and this is just a waste of code, and a waste of time for the code maintainers.

So basically, they decided about 10-15 years ago that since no one uses most of X11, let's just define a new protocol (called Wayland) that only has the parts of X11 that everyone still uses, and get rid of the 90% of it that no one ever uses. Also, the protocol design takes into account the fact that most modern computers do all of their own rendering rather than calling out to a server to render for them. Also the Wayland protocol design takes into account that a lot of computers have graphics cards for accelerated graphics rendering.

Since the Wayland protocol is much simpler, it is easier for anyone to write their own software which implements the protocol, these software are called "compositors." Finally, 10 years after some of the first implementations of Wayland, the protocol and compositors are becoming mature enough that they can be used in ordinary consumer PCs.

[–] [email protected] 12 points 4 months ago (4 children)

Thanks for such a detailed account - it really makes sense to move on from X11 based on what you write.

When I first heard about what X11 and Wayland was and how long the transition has been in the making, I found it a bit hard to believe that it should take so long. I am still not fully sure why it would take so long time to mature... is it a chicken-and-egg kind of situation where it cannot mature properly before it is more widely used, but it has not been more widely used because it was not mature enough? Or is it such a difficult task to get this right and that the development time reflects that?

And why would for instance NVIDIA GPUs continue to have issues with Wayland (and what kind of issues would actually be caused by this?)? Is that a matter of closed source drivers and lack of support from NVIDIA's side to implement required changes? Or are such issues on a more fundamental level (i.e. architectural differences that somehow factors into this - I have no idea what I'm talking about now, I'll stop writing...)?

[–] [email protected] 6 points 4 months ago

Re: maturity - I think it is the latter where the problem is very complex and the dev time reflects that, it takes a long time to implement all the features people need and are used to in X11 (or, used to when coming from windows/macOS). For instance, screensharing is still not widely solved across all wayland compositors. In Gnome or KDE Plasma, it works as you’d expect. But a smaller project like river (tiling window manager that I daily drive rn) does not handle screensharing out of the box and takes some extra configuration - and even then it’s got some oddities that I didnt have in KDE.

As for your issues with NVIDIA gpus under Wayland, yes I think it comes down to driver support from NVIDIA (or the open source drivers just need to mature some more)

load more comments (3 replies)
load more comments (10 replies)