4 ms·
As a user of desktop linux (PopOS), I wonder what is going on here and how this effects me. I know enough about X, but. What the heck is wayland? wikipedia s
by acomjean 6y ago
As a user of desktop linux (PopOS), I wonder what is going on here and how this effects me.
I know enough about X, but. What the heck is wayland?
wikipedia says (display server using the Wayland protocol is called a Wayland compositor, because it additionally performs the task of a compositing window manager.) Whats the compositor doing? Does this effect local linux or only trying to run windows remotely? Xwayland?
I've used X (Xwindows) to run windowing apps remotely (ssh -X) occasionally. It works, excepting that now that I WFH it doesn't.
Linux moves very slowly, but shouldn't replacing X be a great thing?
- edent 6y agoI use Wayland on Pop_OS. It works flawlessly. Much better than X for rotated displays and fractional scaling. I guess it would be nice to have Wobbly Windows - but there's nothing about it that is missing for me.
- vially 6y ago> I guess it would be nice to have Wobbly Windows Wayfire got you covered: https://wayfire.org/ https://wayfire.org/
- ghostpepper 6y agoAs a user of sway who recently found out about wayfire, it feels a bit strange that I need to switch out sway for something similar but not the same (totally separate codebase?) to get a few additional features (animations). As much as I like sway, this smells like bad architectural decisions when so much code needs to be rewritten many times.
- ccmcarey 6y agoIndeed, and how the answer to this problem always seems to be "use wlroots". The wlroots github page[0] even says so: "about 50,000 lines of code you were going to write anyway". Seems to me that if there's a necessary 50k LoC that every compositor needs, it should actually be a part of Wayland. [0] https://github.com/swaywm/wlroots https://github.com/swaywm/wlroots
- nybble41 6y ago> Seems to me that if there's a necessary 50k LoC that every compositor needs, it should actually be a part of Wayland. Wayland is an IPC mechanism and a set of core protocols for input (passing keyboard, mouse, etc. events to applications) and presentation (communicating rendered surfaces back to the compositor), not a compositor or a desktop environment in its own right. There is a Wayland library but its only concern is implementing the IPC system. Those 50k lines of code would be out of scope. The wlroots library implements low-level input processing and rendering functions and various other protocols and standards which are common to all desktop environments; you can think of those 50k lines as a replacement for the parts of the X server which are not directly concerned with input and presentation, such as clipboard support, screen recording, the system tray, negotiation of window roles, and much more. On top of wlroots (or its equivalent) you have the actual compositors, like Sway, which perform the function of an X11 window manager and determine the high-level look & feel of the desktop as a whole. As part of the transition some of the roles have shifted between the various components, usually for good reason. For example, security is much more of a concern now than it was when the X11 protocol was designed, which is where most of the issues relating to screen recording, mouse/keyboard grabbing, and primary selection (middle-click paste) originate. These things could be implemented just as they are in X11, but the inherent security issues of e.g. any application being able to observe what is displayed or selected in another application are difficult to mitigate without impacting the user experience. The Wayland-adjacent project developers involved are attempting to come up with solutions that actually improve the status quo, not just copy forward all the issues that were present in X11. At the same time I believe it is well understood that simply eliminating screen casting or global key bindings is not on the table; we need to be able to accomplish the same goals even if we have to do it a slightly different way.
- young_unixer 6y agoX11 (X version 11) is the protocol that controls most the graphics stuff in traditional Linux systems. It employs a client-server architecture. The windows (clients) send their local framebuffers to the X server, X sends them to a compositor, the compositor joins them together into a big framebuffer that has the different windows in their respective positions and sends them to the X server. The X server then displays them on your screen. There's a relatively new (~10 years old) protocol, called Wayland, which will replace X. The architecture is better and it has some other constraints (vsync is always on, so there's no screen tearing). Some distributions are using it by default (Fedora), but most are still sticking to X, since Wayland is not completely ready yet (in practice) and other projects are still transitioning into Wayland. Maybe I got some technical details wrong, but that's the basic idea.
- acomjean 6y agoThanks! So basically Wayland replaces the X protocol. (I had to run some things with ssh -X, and windowing on remote machines came back to me..) And Xserver is replaced by another Compositor which is not specified, but poking around Weston seems like the reference one (towns in metro west Boston?) No tearing would be nice (I watch someone weekly on a Manjaro install, tearing linux screen share, it can be unpleasant). I'm assuming a lot this gets abstracted away by QT/KDE , Gnome/GTK so developers can just Develop. (probably at the expense of alternative desktops..)
- young_unixer 6y agoAll of that's correct, as far as I know. Just note that a Wayland compositor must implement some core Wayland protocols and it can also implement its own protocol extensions (for example, it can implement a screen-sharing extension, and efforts are being made to 'standardize' these extensions).
- nerdponx 6y agoApparently the creator of Wayland was driving through Wayland, MA when he had the idea for the project: http://www.h-online.com/open/features/Wayland-Beyond-X-1432046.html http://www.h-online.com/open/features/Wayland-Beyond-X-14320...