this post was submitted on 09 Apr 2024
301 points (98.7% liked)
Linux
47949 readers
1713 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
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Thank you for this nice thread! My question: what is Wayland all about? Why would I want to use it and not any of the older alternatives?
Because there is only one alternative (Xorg/X11), and it’s pretty outdated and not really maintained anymore.
For now it’s probably still fine, but in a couple of years everything will probably use Wayland.
Wayland has better support for some newer in-demand features, like multiple monitors, very high resolutions, and scaling. It's also carrying less technical debt around, and has more people actively working on it. However, it still has issues with nvidia video cards, and there are still a few pieces of uncommon software that won't work with it.
The only alternative is X. Its main advantage over Wayland is network transparency (essentially it can be its own remote client/server system), which is important for some use cases. And it has no particular issues with nvidia. However, it's essentially in maintenance mode—bugs are patched, but no new features are being added—and the code is old and crufty.
If you want the network transparency, have an nvidia card (for now), or want to use one of the rare pieces of software that doesn't work with Wayland/XWayland, use X. Otherwise, use whatever your distro provides, which is Wayland for most of the large newbie-friendly distros.
The network transparency thing is no longer a limitation with Wayland btw, thanks to PipeWire and Waypipe.
It's... complicated. Wayland is the heir apparent to Xorg. Xorg is a fork of an older XFree86 which is based on the X11 standard.
X11 goes back... a long time. It's been both a blessing and a liability at times. The architecture dates back to a time of multi-user systems and thin clients. It also pre-dates GPUs. Xorg has been updating and modernizing it for decades but there's only so much you can do while maintaining backward compatibility. So the question arose: fix X or create something new? Most of the devs opted for the later, to start from scratch with a replacement.
I think they bit off a bit more than they could chew, and they seemed to think they could push around the likes of nvidia. So it's been a bumpy road and will likely continue to be a bit bumpy for a bit. But eventually things will move over.
In addition to the other replies, one of the main draws of Wayland is that it's much less succeptible to screen-tearing / jerky movements that you might sometimes experience on X11 - like when you're dragging around windows or doing something graphics/video heavy. Wayland just feels much smoother and responsive overall. Other draws include support for modern monitor/GPU features like variable refresh rates, HDR, mixed DPI scaling and so on. And there's plenty of stuff still in the works along those lines.
Security is another major draw. Under X11, any program can directly record what's on your screen, capture your clipboard contents, monitor and simulate keyboard input/output - without your permission or knowledge. That's considered a huge security risk in the modern climate. Wayland on the other hand employs something called "portals", that act as a middleman and allow the user to explicitly permit applications access to these things. Which has also been a sore point for many users and developers, because the old way of doing these things no longer works, and this broke a lot of apps and workflows. But many apps have since been updated, and many newer apps have been written to work in this new environment. So there's a bit of growing pains in this area.
In terms of major incompatibilities with Wayland - XFCE is still a work-in-progress but nearly there (should be ready maybe later this year), but some older DE/WMs may never get updated for Wayland (such as OpenBox and Fluxbox). Gnome and KDE work just fine though under Wayland. nVidia's proprietary drivers are still glitchy/incomplete under Wayland (but AMD and Intel work fine). Wine/Proton's Wayland support is a work-in-progress, but works fine under XWayland.
Speaking of which, "XWayland" is kinda like a compatibility layer which can run older applications written for X11. Basically it's an X11 server that runs inside Wayland, so you can still run your older apps. But there are still certain limitations, like if you've got a keyboard macro tool running under XWayland, it'll only work for other X11 apps and not the rest of your Wayland desktop. So ideally you'd want to use an app which has native Wayland support. And for some apps, you may need to pass on special flags to enable Wayland support (eg: Chrome/Chromium based browsers), otherwise it'll run under XWayland. So before you make the switch to Wayland, you'll need to be aware of these potential issues/limitations.
@d3Xt3r
My understanding is that both Chrome and Firefox work in Wayland, now.
https://www.phoronix.com/news/Google-Chrome-Wayland-VA-API#:~:text=One%20of%20the%20limitations%20of,targeted%20the%20libva%2Dx11%20library.
@stammi
That wasn't the point I was trying to make though. :)
Chrome(ium) still doesn't run natively under Wayland by default - you'll need to manually pass specific flags to the executable to tell it to use Wayland. See: https://wiki.archlinux.org/title/chromium#Native_Wayland_support
Firefox also needed manual flags, but not anymore - Wayland support is enabled by default since version 121, released around three months ago. But some distros had enabled Wayland for Firefox much before that, Fedora being one of them.
Are you sure? I just tested it on Fedora 39, using Chrome v123 (Flatpak) and Chromium v123 (repo package), both of them were running under XWayland.
Because the older alternatives are hacky, laggy, buggy, and quite fundamentally insecure. X.Org's whole architecture is a mess, you practically have to go around the damn thing to work it (GLX). It should've been killed in 2005 when desktop compositing was starting to grow, but the FOSS community has a way with not updating standards fast enough.
Hell, that's kinda the reason OpenGL died a slow death, GL3 had it released properly would've changed everything
Wayland vs Xorg is mostly equivalent to a beat up 80's car compared to a brand new car.