9 ms·
Does Wayland do anything better than Xorg? Every time I see it mentioned, it is about how it does not support this or that core feature of Xorg (e.g multiple di
by axlee 7y ago
Does Wayland do anything better than Xorg? Every time I see it mentioned, it is about how it does not support this or that core feature of Xorg (e.g multiple displays with custom pixel densities/scaling, screen sharing apps being broken, etc...). What is Wayland's reason for existing?
- RMPR 7y agoNot an expert but it's something along the lines of security, things like keyloggers must not work, or at least have a hard time working for example.
- AsyncAwait 7y agoIt does do a ton of things better. It's just that X11 was basically a giant shared buffer, so things like screenshots etc. were easy. Wayland is a lot more security conscious, but once the compositors are up to parity, these things won't be a problem. At least for me, Wayland is way smoother than X11 ever was as well.
- simias 7y agoSame reason systemd exists, the previous solutions were old and clunky and some people got fed up and decided to update. Plus some good old NIH. People who were dealing just fine with previous solutions then start complaining about breaking things for the sake of breaking things and not being able to do things the way they were used to. In the specific case of Xorg I find the situation strange because I'd gladly have made the switch 15 years ago back when messing with Xorg.conf was a common occurrence for me and it kept getting in the way (although a big portion of the blame was with the proprietary drivers, especially AMD's). Xorg was sometimes a bit of a pig too resource-wise, but that's when I was running a PC with 256MB of RAM. I remember being fairly optimistic when I first heard about Wayland and Mir, the prospect of ditching X11 was enticing. But now? I haven't really had to wrestle with X in a long time. It just works for me. I'm definitely not looking forward to reworking my entire workflow for minor benefits although I suppose I'll have to one day. I also use X forwarding pretty extensively, but I'm probably a small minority these days.
- ziftface 7y agoIs it possible to use XWayland for X forwarding? I've used X forwarding on macos with no problems, using XQuartz.
- cycloptic 7y agoYes, XWayland is architecturally very similar to XQuartz.
- iforgotpassword 7y agoI agree with this. Wayland had taken so long and is still lacking in a few areas, while Xorg somehow managed to reach a point where it actually "just works" first try, with some minor problem every other year. I don't need Wayland anymore.
- rcxdude 7y agoIt actually works in a way which makes sense for modern compositors and GPUs, which means the rendering is much smoother without tearing issues and so on. Issues with getting this to work reliably in Xorg is what lead to the maintainers abandoning it to work on a replacement. It just turns out shifting a bunch of software built around a core and complicated interface to another system is quite difficult.
- cycloptic 7y ago>Does Wayland do anything better than Xorg? Nitpick: This is not a meaningful comparison. Wayland is a wire protocol. Xorg is a display server, and the wire protocol it implements is called X11. There are several other display servers that implement the Wayland protocol. Some of these display servers do support those core features, and some of them don't (yet). It depends on which one you're using. The display server used by GNOME should support those features. >What is Wayland's reason for existing? From the website [0]: >Wayland is intended as a simpler replacement for X, easier to develop and maintain. [0] https://wayland.freedesktop.org/ https://wayland.freedesktop.org/
- thayne 7y ago> easier to develop and maintain wayland may be easier to maintain than X. But from what I've seen writing a compositor for wayland is more difficult than writing an X window manager, because things you got for free with X have to be implemented by the compositor in wayland. And many applications are more difficult to target wayland, because there aren't (at least yet) standard protocols for things like screenshots, screencapture, etc. So they have to either choose one desktop environment to target, or have implementations for all of them.
- cycloptic 7y agoTake a look at wlroots [0] for a library that massively simplifies the task of writing a wayland compositor. It also gives many of those lower level things "for free". For an even higher-level API built on top of wlroots, you can look at wltrunk [1]. There are standard APIs for screenshots and screencapture, implemented through the desktop portal and pipewire. Check the top-level post for more info about this -- it's part of why Wayland support for OBS has progressed. [0] https://github.com/swaywm/wlroots https://github.com/swaywm/wlroots [1] https://git.sr.ht/~bl4ckb0ne/wltrunk https://git.sr.ht/~bl4ckb0ne/wltrunk
- eikenberry 7y ago> There are standard APIs for screenshots and screencapture What standard? Does anyone track how compliant the existing compositors are with the standard?
- raegis 7y agoI'm doing my classes online with Zoom. For whatever reason, under Wayland I can not choose individual windows to share--I can only share the whole desktop. I switched to Xorg and now I can share individual windows in Zoom. I honestly don't care to support proprietary software, but application writers must do extra work to support both.
- m4rtink 7y agoWayland by default prevents applications from accessing other application display, input and output, while on X it is basically free for all. Any application can see what any other application is displaying, read it's input & send it it input events. This might have been fine in the past, but is not really OK any more with efforts to make things more secure (eq. to prevent a malicious application to read you password entry, make screenshots of sensitive data, inject input events to your secure sessions, etc.). The side effects is that new protocols need to be developed that applications can use to request access to display/input/output of other applications in legitimate cases (such as screen sharing in your case) & not all is in place for that yet.
- grawprog 7y ago>Wayland by default prevents applications from accessing other application display, input and output, So it breaks the entire linux philosophy of using input and output streams to pipe data between different modular applications? >This might have been fine in the past, but is not really OK any more Says who? Personally I like my computer being able to access other things on my computer. It kind of makes it more useful that way. The ability for applications on linux to fairly seamlessly work together using a set of standard protocols is one of the primary reasons I use it.
- Macha 7y agoArguably the end state planned for Wayland in this regard (having access to specific applications provided) is conceptually closer to streams than the current situation with X (one big shared ball of global state).
- pkulak 7y agoI'm kinda new to Linux as a desktop, and thus went straight to Wayland, so these kinds of comments from ol'-timers are super interesting to me. I run a Wayland desktop, and I start it by typing it's executable from the TTY after I log in. No fuss, no muss. Everything works great, except there was this one game I wanted to try out that's a Windows .exe and needs to run in Wine and I couldn't quite get it to run in Wayland. So I installed xorg-server and an X window manager. Tried to just run it from TTY and it complained that there was no X server running. Okay, turns out I need another program to start X, then start my window manager, as a kind of desktop chaperone. Finally get that worked out, try running my game, and the screen tearing is a nightmare. So now I have to run a compositor in there as well to be an intermediary in the already extremely complicated X protocol. And since X needs to run as root (I think?), half the time I try to start it, I get odd permissions errors, or it tries to use the wrong TTY. As someone going the _other_ direction, I can't fathom how anyone puts up with X. The good news, is that after it did it's initial setup and install in X, the game now seems to run fine in Wayland. :D
- rjmunro 7y agoSee chapter 7 of the Unix haters handbook from 1994, which was linked here the other day: http://simson.net/ref/ugh.pdf http://simson.net/ref/ugh.pdf The amazing thing about Wayland is that it's taken over 25 years to happen. Over those 25 years, X has become less of a problem as CPU speed and RAM have grown exponentially, and we now have GPUs to help it too.
- imtringued 7y agoI had to turn on X11 for screen recording once (the screen recording was done by a windows only app running under wine). It didn't take a minute to see extreme tearing. I seriously don't understand how anyone can use X11 other than as a fallback.
- abjKT26nO8 7y agoOn X: 1. Implementing a screenlocker in a secure and working manner on X is impossible. 2. Screenlockers cannot be activated when there the context menu (or something similar) is open. 3. There is a lot of screen tearing, in particular in Firefox and Chromium on X scrolling is a joke. 4. Dual-DPI is a no. 5. Everything is in a shared buffer, so security is a joke. On Wayland these things should be fixed.