News for hackers. Stuff that matters.
Re:Xorg-Server 21.1.0 by sprash on Wednesday October 27, 2021 @02:53PM (#29017470)
So far there is no viable replacement around that is "more adequate for the job" (Wayland is fundamentally flawed at the concept level). So Xorg will stick around much longer probably decades.
Re:Xorg-Server 21.1.0 by hsbauauvhabzb on Wednesday October 27, 2021 @05:51PM (#29019560)
As a consumer/power user with a fairly bespoke window manager I’m worried that the minimalist approach to wayland will fragment functionality depending on compostor / DE.

Wanna use Firefox? gotta use gnome compostor for that! Chromium only works on KDE compostor, etc.

Is this a misguided fear, or do you anticipate it moving that way?

Re:Xorg-Server 21.1.0 by nani8ot on Thursday October 28, 2021 @05:54PM (#29032553)
I think these worries are unfounded atm, because compatibility is good for most applications, even though there are some tools specific to a compositor (e.g. waypipe for wlroots based compositors).

For the case of minimal window managers, there is wlroots, which is designed to be used to write a compositor. The first line of the wlroots repo[1] states: »Pluggable, composable, unopinionated modules for building a Wayland compositor; or about 60,000 lines of code you were going to write anyway.« And there are at least three[2] actively maintained compositors based on wlroots. Sway being the most popular, the one for which wlroots was initially developed for.

I believe that there won't be too many incompatibilities, because there are 3 (4, including weston) wayland compositors developed (Gnome's, KDE's & wlroots based), all three of them having their own use cases. Using protocol extensions only useable on one compositor would limit the app to a subset of Linux Desktops (and mobile), so if possible, most apps won't use them.

PS: I just remembered one case of fragmentation: Activity Watch, a tool to keep track which apps are used how long and to track idle times, won't be able to support Gnome (mutter), because Gnome dev's won't implement the necessary freedesktop protocol extension. Sway (and KDE?) does, so it works on them. One solution would be to write a Gnome Shell extension, but yeah, it's not as easy as on X.org (reason being privacy, in this case).

[1] https://github.com/swaywm/wlroots [2] https://arewewaylandyet.com/

Re:Xorg-Server 21.1.0 by pengaru on Wednesday October 27, 2021 @03:03PM (#29017603)
> (Wayland is fundamentally flawed at the concept level)

That's a mighty big hand you're waving.

Re:Xorg-Server 21.1.0 by wing-_-nuts on Wednesday October 27, 2021 @02:59PM (#29017563)
>Wayland is fundamentally flawed at the concept level

Expand?

Re:Xorg-Server 21.1.0 by sprash on Wednesday October 27, 2021 @03:09PM (#29017674)
The biggest problem of Wayland is that it has the wrong philosophy ("Every frame is perfect") and the wrong abstractions ("Everything in the universe is an array with RGBA values"). If your foundations are flawed like that you are doomed from the start. What remains is a very expensive and cumbersome way of blitting bitmaps.
Re:Xorg-Server 21.1.0 by bitwize on Wednesday October 27, 2021 @05:19PM (#29019282)
People with decades of experience, each, in the Linux and Unix graphics stack, have determined that the most efficient thing to provide, from a display server perspective, is a way of blitting bitmaps (specifically, of compositing bitmaps representing viewports into a final screen image) and that, if there is rendering to be done, it should be done client side. This is the consensus of those with domain knowledge, and it is what is supported by the broader community (toolkits, DEs, etc.). It's also how the major toolkits have been doing things anyway, irrespective of how X11 actually works: draw everything client side and send it to the X server for display. So, your X server is really effectively nothing more than a shitty Wayland compositor.

And people wonder why Linux lags behind Windows and macOS in terms of desktop smoothness and quality.

When all is said and done, you may as well remove the legacy cruft (drawing and filling primitives, the fucking X font architecture, etc.), delegate remote display to a protocol that is better designed to support it such as RDP or PipeWire that only gets loaded when necessary (which it's not for 90% of users in 90% of use cases), and streamline the display server itself to just that which modern clients actually need, and that's Wayland. Wayland just brings Linux, barely, up to the state of the art set by Windows, macOS, iOS, and Android -- which have prioritized perfect frames and smooth compositing and presentation since forever ago.

Re:Xorg-Server 21.1.0 by alerighi on Wednesday October 27, 2021 @06:17PM (#29019778)
Sure, it has better performance if there is not a networking protocol in the middle.

What I like about X, that is missing in Wayland, is that you no longer can run the X server on a machine and connect to clients (application) on another.

And if you think about it... this day with the cloud it could have been the killer feature! Nowadays is normal to have programs that run in VM in the cloud with a sort of remote desktop client. X11 would have been more performant even with not so fast network connection, because you have the rendering done in your local PC and only commands that pass on the network.

And if you think about it for a moment, isn't how web browsers work? Where you have the server that sends some HTML to the browser (nowadays JS and other stuff) and the browser doing the job of rendering? If you compare the X server to a web browser and the X client to a web site, isn't very similar? And this is the model that is winning nowadays.

Meanwhile we think about a new graphical server that cannot be used on a network, in a period where we are returning in the era of mainframes, when X was created (granted, nowadays is not a big PC in a room but a multitude of VM in the cloud).

The problem is not X, the problem is that X was never used at is full potential because we are so used to the (to me not optimal) model that Microsoft/Apple proposed to us.

You could have had monitors with an integrated X server, like in the past you had serial terminals, without fans, cables, and stuff on your desk, just a small ARM processor with a GPU to render things on screen. And a single network cable going to a computer that you had anywhere else in the house/company, or in the cloud.

No need for HDMI or other display interfaces, just run a network cable to each monitor, plug keyboard and mouse on the monitor, you are done. The GPU is in the monitor, doesn't it make more sense? How much money that could have saved to a company? It would have been more efficient than thin clients that connect to an RDP Windows machine that has to have a GPU just to render the remote session? Large installations like displays used for public information? Why use a full screen web browser, it's overkill, when you could have simply launched a X server on the particular display, then launched an application on a server and connected to the IP of that particular monitor to display everything you wanted?

The architecture of X was modern 40 years ago when it was invented. It in some ways predicted the future, and now that we are discarding it for something that tries to imitate Windows/macOS (badly, because these operating systems just works well, Wayland doesn't). Is it worthed?

Re:Xorg-Server 21.1.0 by rbanffy on Wednesday October 27, 2021 @06:52PM (#29020031)
> this day with the cloud it could have been the killer feature!

My impression is that latencies kill X performance. Having a server under my desk is one thing, but running even something like xedit halfway across a world is painful. It may be possible to update these tools to be less synchronous, but I’m not sure this is a great use case, certainly not for new applications.

> No need for HDMI or other display interfaces, just run a network cable to each monitor, plug keyboard and mouse on the monitor, you are done.

This would be great. Every monitor has at least a frame buffer and there is no need to push every pixel to the monitor 60 times a second. Worst case scenario is you have a sporting event where you need to push every pixel to the screen 60 or more times per second, but, most of the time, there’s no such need.

Re:Xorg-Server 21.1.0 by GekkePrutser on Wednesday October 27, 2021 @07:49PM (#29020579)
Latency kills it but it's mainly design decisions (made with local networking in mind, not internet) that can be improved upon. NX has shown that and that's only a fix on top of the old protocol.

I'd love to see a new design with network transparency in the current internet age on the foreground.

I remember working in a room with 20 big-screened X terminals connected to one server over one shared 10 Mbit 10Base-T. And it worked amazingly well.

This was when Windows was in its infancy. I'd love to see that kind of vision again.

Re:Xorg-Server 21.1.0 by alerighi on Thursday October 28, 2021 @03:43PM (#29030789)
Depends on the kind of application. The advantage of X compared to RDP/VNC/whatever remote desktop protocol is that you transfer only drawing commands, meaning that if you are seeing a static screen no data is transmitted, if only a part of the screen updates only that data is transmitted. The load on the network is lower.

Nowadays with modern video compressing protocols also sending the video like RDP doesn't require a lot of bandwidth either and has an acceptable latency to be fair, but with X it would be even better (and it is, if you ever used X over ssh it works great)

Re:Xorg-Server 21.1.0 by bitwize on Thursday October 28, 2021 @05:10PM (#29032042)
> The advantage of X compared to RDP/VNC/whatever remote desktop protocol is that you transfer only drawing commands, meaning that if you are seeing a static screen no data is transmitted, if only a part of the screen updates only that data is transmitted.

This is true of RDP also. The initial versions of RDP were basically GDI over the wire. Of course it's been expanded since then to include DirectX calls, etc.

> The load on the network is lower.

That is incorrect. RDP is actually usable over an internet link; X11 is far too chatty and ridden with roundtrip latency for that use case. Even VNC does better over the wire than X.

Re:Xorg-Server 21.1.0 by alerighi on Monday November 01, 2021 @06:11PM (#29073880)
Interesting, in fact I always wondered how RDP performs so well.

> That is incorrect. RDP is actually usable over an internet link; X11 is far too chatty and ridden with roundtrip latency for that use case. Even VNC does better over the wire than X.

Yes I use it over an internet link and it works reliably.

But the main difference between RDP and X11 forwarding is that RDP forwards the entire session, while with X11 you forward the single application. With X11 forwarding you can indeed run on the same X server different X clients. That can be an advantage in an era of microservices, because you can see an X client as a microservice, and thus have a workstation (a X server) run a plentful of X clients each one on a different machine/VM/container.

Re:Xorg-Server 21.1.0 by bitwize on Wednesday October 27, 2021 @06:39PM (#29019921)
The people who write and maintain X decided that life is too short to write or maintain X. Wayland is their way forward.

Web browsers (and Electron) are replacements for NeWS, not X really. That's part of the reason why Electron won't go away, the architecture advantages are too great: have the server push running code to the local display to take advantage of local acceleration. NeWS was awesome in its day, and it kind of lives on in the form of browsers and Electron.

Re:Xorg-Server 21.1.0 by alerighi on Thursday October 28, 2021 @03:54PM (#29030973)
But they are still maintaining it. Also, the improvements that Wayland brings are not really specific to them, because they are mostly due to a new Linux kernel feature that is KMS, and you can use libinput also with X.

I don't really see the point of Wayland, to me X was just fine, sure, maybe it was time for X12, but was a completely new display server needed?

Re:Xorg-Server 21.1.0 by bitwize on Thursday October 28, 2021 @05:03PM (#29031971)
> But they are still maintaining it.

Only just barely. And they told us it could stop at any time. All the developer energy and support is behind Wayland, so that's what you should be using.

> I don't really see the point of Wayland, to me X was just fine, sure, maybe it was time for X12, but was a completely new display server needed?

The developers closest to the graphics stack say yes, so I defer to their expertise.

Really, this has been discussed to death many, many times. The arguments for X (or an X-like architecture) invariably come from people who are ignorant of the actual issues involved. Here's a video by Daniel Stone that addresses the main points; note that it was made 8 years ago and people are still arguing the points: https://youtu.be/RIctzAQOe44

As far as the graphics stack maintainers are concerned the debate is pretty much over, and Wayland won. X will get little to no developer attention going forward. Unless you want to take responsibility for the X server, your choices are to get with the program and get on Wayland, or find your use case completely unsupported.

(Note that when it comes to large projects like Xorg, corporate sponsorship is critical. The corporations are putting their money behind Wayland, not X.)

Re:Xorg-Server 21.1.0 by rbanffy on Wednesday October 27, 2021 @06:53PM (#29020041)
And none of the original NeWS developers miss writing apps in PostScript.
Re:Xorg-Server 21.1.0 by sprash on Wednesday October 27, 2021 @07:53PM (#29020628)
> Sure, it has better performance if there is not a networking protocol in the middle.

That's not even true. The DRI3 X11 extension uses the exact same buffer swap mechanism like most Wayland compositors. Running locally you get the best of both worlds with X11 already.

Re:Xorg-Server 21.1.0 by bitwize on Wednesday October 27, 2021 @10:17PM (#29021567)
In other words...

> So, your X server is really effectively nothing more than a shitty Wayland compositor.

Couple of things: 1) you use DRI3, you lose network transparency. KDE apps run like a pig stuck in shit over network links because Qt on X was built to take advantage of the massive speed of DRI3.

2) Having the X server, window manager, and compositing engine in separate processes introduces latency due to context switches on the hot path. Wayland fixes this by making the display server, window manager, and compositor all one process.

Wayland solves problems you do have, you just don't know you have them.

Re:Xorg-Server 21.1.0 by alerighi on Thursday October 28, 2021 @03:52PM (#29030929)
> 2) Having the X server, window manager, and compositing engine in separate processes introduces latency due to context switches on the hot path. Wayland fixes this by making the display server, window manager, and compositor all one process.

That also mean that you have a single process that if it crashes you loose your entire desktop session crashes. In the old X days I used to have my compositor crash a lot of times (good old days of Compiz with a ton of effects), but everything else was still functional, and I could simply restart it without loosing my entire desktop session. Or you changed the settings on GNOME, in the past just restart the WM, with Wayland of course you have to log out and login again.

Also, things that on X were simple (for example having an application that captures the screen) are difficult in Wayland, and the only way to do so is to incorporate that functionality into the window manager itself, that becomes a monolith very quickly.

Speaking about latency, to me is stupid. Like I said, in the old days of Debian 6, with a core2 and integrated graphics I used to run GNOME 2 with Compiz, I had smooth graphical effects and it did run fine, with a memory usage less than 100Mb in idle.

Nowadays we have hardware that is orders of magnitude faster and we have more problems that back in the days we didn't.

Re:Xorg-Server 21.1.0 by kaba0 on Sunday October 31, 2021 @04:26PM (#29060073)
But you also have hardware that is orders of magnitude harder to fill, eg 4k120fps monitors for example.
Re:Xorg-Server 21.1.0 by sprash on Thursday October 28, 2021 @02:28AM (#29023040)
> So, your X server is really effectively nothing more than a shitty Wayland compositor.

No it is a much better Wayland compositor because unlike Xwayland it provides full backwards compatibility. You even need much less boiler plate code to get a file descriptor on X11 as compared to Wayland.

> Having the X server, window manager, and compositing engine in separate processes introduces latency due to context switches on the hot path.

This is only makes a difference for rare events like moving/resizing windows. For static window positions it is the exact same path as Wayland. In practice Wayland had historically even much worse latency than X11. This has only been fixed a few years ago. Latency has low priority for Wayland developers. And as such Wayland does not beat uncomposited X11 in latency to this day.

Re:Xorg-Server 21.1.0 by md8z on Thursday October 28, 2021 @11:36AM (#29027329)
The stuff that's not backwards compatible in XWayland is mostly already broken by X compositors anyway and needed to be reimplemented, so that's why there wasn't much incentive to fix that. I've seen some of your comments around and I'm really struggling to figure out what your use case is.

"This is only makes a difference for rare events like moving/resizing windows."

This is actually wrong, that type of split affects the rendering of every single frame. Also, uncomposited X11 is a bad idea for a number of other reasons, the only reasonable comparison to make there is composited X versus Wayland, which is what all the benchmarks I've seen are aiming for.

Re:Xorg-Server 21.1.0 by md8z on Thursday October 28, 2021 @12:43PM (#29028080)
"What I like about X, that is missing in Wayland, is that you no longer can run the X server on a machine and connect to clients (application) on another."

You actually can do this with Waypipe. Also, I'll mention this again: most Wayland implementations include the X server (as XWayland) and support this as a backwards compatibility option.

"If you compare the X server to a web browser and the X client to a web site, isn't very similar? And this is the model that is winning nowadays. ... Why use a full screen web browser, it's overkill, when you could have simply launched a X server on the particular display, then launched an application on a server and connected to the IP of that particular monitor to display everything you wanted?"

It's really not overkill though, people build web apps because the stack actually works well. Developers seem to really want to use those browser features. X on the other hand is very old and hasn't kept pace. The most obvious example I can think of is OpenGL: indirect GLX doesn't really work any more and hasn't for quite some time. It can't really be updated either without complicating everything, because any performant use is going to require loading code into the server. If you want remote GPU rendering, the best way to achieve that currently is to use WebGL and WASM (and later WebGPU when that's ready).

"we are discarding it for something that tries to imitate Windows/macOS (badly, because these operating systems just works well, Wayland doesn't). Is it worthed?"

Well, worst case scenario, Wayland is just a minimal way to get your browser window on the screen. I think this is another big misconception that people have. Wayland generally sits at a lower level in the stack than network applications, and it really has to be this way if you want to support hardware accelerated clients. Wayland is made for the case where you've already decided you have a GPU buffer and you want to put that on the screen. You could build something else on top of it that runs over the network (and this is what web browsers do, it's how XWayland works, it's how your VNC/RDP client works, etc) but somewhere in the pipeline those will need to have that fast local path where they render to a GPU buffer. And that's where Wayland comes in. It's not that the developers are trying to copy Windows/MacOS, it's that you have to do this if you want to get a good experience out of a modern GPU.

Re:Xorg-Server 21.1.0 by alerighi on Thursday October 28, 2021 @01:49PM (#29028904)
> people build web apps because the stack actually works well

Or because there is not an alternative. Building graphical software is difficult because you have to interact with graphics. But, what if we have a protocol where you simply open a network socket and write some messages on it that says "write this text hear", "draw a line from X to Y"? Well, that is how X clients work.

> Wayland generally sits at a lower level in the stack than network applications

That to me is not a good thing. One of the main advantages of Linux/UNIX systems in the past was that X was a userspace application, and if X crashed the entire computer didn't crash, like Windows does, you restart the X server and you don't loose your work. Of course modern desktop environment crash with X, and that is a bad thing (but an X client can, and should, if the X server crash, just try to reconnect with the new X instance and redraw its window, like you reconnect to any other socket, or worse case scenario the program continue to run just without the GUI!)

Re:Xorg-Server 21.1.0 by md8z on Thursday October 28, 2021 @02:19PM (#29029337)
"But, what if we have a protocol where you simply open a network socket and write some messages on it that says 'write this text hear', 'draw a line from X to Y'? Well, that is how X clients work."

I mean, that is also how the Web Canvas API works. If you want to control this with some messages on a TCP-ish socket then you can use websockets. The web browser already appears to be a superset of all the networked functionality of X.

"One of the main advantages of Linux/UNIX systems in the past was that X was a userspace application"

Wayland still is a userspace application too. The protocol itself is what is at a lower level of userspace than X was, of course the compositor can also implement high level features as it sees fit.

Re:Xorg-Server 21.1.0 by alerighi on Thursday October 28, 2021 @03:45PM (#29030820)
> I mean, that is also how the Web Canvas API works. If you want to control this with some messages on a TCP-ish socket then you can use websockets. The web browser already appears to be a superset of all the networked functionality of X.

Yes, in a very inefficient way, you end up using 1Gb of RAM to do something that could have been done with 1Mb. Not important for desktops, but for embedded applications?

> Wayland still is a userspace application too. The protocol itself is what is at a lower level of userspace than X was, of course the compositor can also implement high level features as it sees fit.

Wayland is based on KMS that indeed is a graphic implementation in the kernel itself.

Re:Xorg-Server 21.1.0 by md8z on Thursday October 28, 2021 @04:30PM (#29031509)
I'm not sure what you mean 1GB. An empty tab on Chromium seems to take about 30MB. Minimal "Hello world" GTK and Qt programs are around the same size.

Modern Xorg is also using the KMS API. If you don't want any fancy features and just want to draw some lines then you probably want to skip Xorg and Wayland altogether and use KMS directly.

Re:Xorg-Server 21.1.0 by margalabargala on Wednesday October 27, 2021 @03:15PM (#29017749)
Presumably the designers of Wayland do not think that this philosophy and those abstractions are so fundamentally flawed.

Could you explain why these concepts are so flawed, for those of us to whom it is not immediately obvious?

Re:Xorg-Server 21.1.0 by sprash on Wednesday October 27, 2021 @03:29PM (#29017940)
For some applications you want "every frame is recent" and can tolerate some glitches as trade off for not having perfect frames. Also displays have different pitch values, subpixel arrangements, color spaces, etc. A line from A to B might look completely different on different monitors. By offering only RGB arrays as abstraction Wayland pushes the the need for care of those differences down to clients which is a mistake.

Additionally a Desktop system in general is much more than a bunch of bitmaps blittet together. Applications need to interact and such functionality has to be tightly integrated into the compositor with standardized protocols otherwise it will be impossible to have such functionality. Taking screenshots, drawing to the root window or knowing about coordinates of windows from other programs are some examples.

Re:Xorg-Server 21.1.0 by kaba0 on Wednesday October 27, 2021 @03:33PM (#29018008)
> For some applications you want "every frame is recent" and can tolerate some glitches as trade off for not having perfect frames

Oh and what gives, wayland just has an extension for this use case!

HDR is work in progress, there is nothing unchangeable in Wayland that would disallow different buffer types.

Re:Xorg-Server 21.1.0 by im3w1l on Wednesday October 27, 2021 @03:32PM (#29017980)
It tried to come up with issues (out of gamut colors? other optical properties than opacity - turn a portion of the screen into a mirror? not correctly modelling color filter arrays?). Best I could come up with was that it's not VR-ready. Which might be an issue in 15+ years.
Re:Xorg-Server 21.1.0 by kaba0 on Wednesday October 27, 2021 @03:01PM (#29017579)
How would Wayland be fundamentally flawed?
Re:Xorg-Server 21.1.0 by sprash on Wednesday October 27, 2021 @03:06PM (#29017636)
Wayland makes the wrong abstractions and does not offer vital functionality usually needed on a Desktop system. As a result every Toolkit/Compositor has to implement that additional functionality itself and most of the time it is incompatible to the competitor for no apparent reason.

As an exercise I recommend to write a native universal applicable Wayland application that takes screenshots.

Re:Xorg-Server 21.1.0 by kaba0 on Wednesday October 27, 2021 @03:29PM (#29017945)
Wayland as a display protocol (correctly) started out with a tiny core, which can display the content of a window, and manage available extensions by version.

This has grown out to be a really great abstraction, where later multiple implementations can decide on new protocols/extensions to support. And they have already done plenty of such extensions, and they are compatible with each other. Remember, these are protocols. There is no need to implement them yourself, they can be made into a library, like wlroots, and you can build your compositor on that base, without any repetition. Also, multiple implementations only mean that there won’t be implementation-specific quirks.

As for screenshots specifically, while the base use case is trivial enough, recording screens are most definitely not (it needs proper synchronization). Pipewire is the project that can solve the issue perfectly, and it is indeed working correctly for like a year already, with screen share even in proprietary apps like teams.

Re:Xorg-Server 21.1.0 by enriquto on Wednesday October 27, 2021 @05:29PM (#29019370)
> As for screenshots specifically, while the base use case is trivial enough, recording screens are most definitely not (it needs proper synchronization). Pipewire is the project that can solve the issue

If I understand the OP correctly, this sort of philosophy is deeply troubling to some people. For simplicity-oriented folks, trivial things should be trivial, as a matter of principle. If some trivial thing becomes slightly less convenient so that complex stuff may be possible, this is an unacceptable compromise; or at least a very worrying one. When taking static screenshots requires an entire "project" that is "just ready this year" , the threshold of unacceptability is long surpassed.

I get that wayland folks do not share this worldview and they want to do the right thing, even at the expense of sacrifying things that were previously easy. But, to other people, this rubs them in a very wrong way.

Re:Xorg-Server 21.1.0 by md8z on Thursday October 28, 2021 @11:25AM (#29027205)
"If I understand the OP correctly, this sort of philosophy is deeply troubling to some people. For simplicity-oriented folks, trivial things should be trivial, as a matter of principle."

I suspect those people don't matter to this conversation and would not be working on things related to Linux graphics at all. Once you start involving DRM and Mesa (or the proprietary nvidia drivers...), everything gets really complicated, and it's not easy to come up with a one-size-fits-all approach.

In particular: the lack of GBM/dmabuf support prevented having any kind of consistent API for efficient screen capture when using the nvidia drivers, but I think that is changing slowly.

Re:Xorg-Server 21.1.0 by kaba0 on Wednesday October 27, 2021 @06:32PM (#29019881)
wlroots does implement a very simple screenshot protocol, the reason I didn’t mention it was that it is not cross-wayland-implementation. But there is nothing inherent in wayland that would prevent this functionality — they just try to find a good abstraction they all can stick to (as these APIs will likely be used for a long time), and gnome and plasma people have a different view on that.

(Also, if we have a complex program that does all the things we need and a simple program+the complex one, we will have more complexity in the latter case so the previous one may be preferred)

Re:Xorg-Server 21.1.0 by craftinator on Wednesday October 27, 2021 @03:24PM (#29017878)
> As an exercise I recommend to write a native universal applicable Wayland application that takes screenshots.

As someone who tried to do this... Ouch. Things like this are why X will still be around in 15 years.

Re:Xorg-Server 21.1.0 by markstos on Wednesday October 27, 2021 @04:03PM (#29018404)
Wayland as a `screencopy` protocol and the `wlroots` library packages it for other compositors to use.

Is the issue that compositors don't implement the `screencopy` protocol themselves or use the implementation provided by wlroots?

Ref: https://wayland.app/protocols/wlr-screencopy-unstable-v1

Re:Xorg-Server 21.1.0 by folmar on Wednesday October 27, 2021 @06:25PM (#29019838)
Not really - to quote the page you reference:

> "Warning! The protocol described in this file is experimental and backward incompatible changes may be made.

and the compositors were there way before 2018, so it's a bit too much to expect them to jump on the protocol.

Re:Xorg-Server 21.1.0 by craftinator on Friday October 29, 2021 @06:04PM (#29044049)
> Is the issue that compositors don't implement the `screencopy` protocol themselves or use the implementation provided by wlroots?

In general, when your diagnosis to a problem is "the people using my product are all just too lazy to use it right", the problem is almost always that your product is the problem.

Re:Xorg-Server 21.1.0 by tosihakkeri on Wednesday October 27, 2021 @03:27PM (#29017907)
Based on what you just wrote, it sounds to me that you might be assuming the wrong abstraction yourself.
Re:Xorg-Server 21.1.0 by bitwize on Wednesday October 27, 2021 @05:23PM (#29019323)
> As a result every Toolkit/Compositor has to implement that additional functionality itself and most of the time it is incompatible to the competitor for no apparent reason.

Or, compositors can use these wonderful things we have called dynamic libraries, and simply link against implementations of that desktop functionality, such as wlroots -- which implementations, by the way, will be far less crufty and ad hoc than the equivalent X11 solution!

Much of the reason why X is the way it is is because back in the day, Unix lacked dynamic libraries in general, so in order to share an implementation of, say, graphics primitives, the best way was to write a server that implemented them and have clients communicate with that server. Now that we have dynamic libraries, we can share a single implementation of graphics rendering across multiple programs, and still have all the speed advantages of doing all the rendering client side!

Re:Xorg-Server 21.1.0 by xxpor on Wednesday October 27, 2021 @03:23PM (#29017856)
Why are objections like this not solved with things like wlroots?
Re:Xorg-Server 21.1.0 by folmar on Wednesday October 27, 2021 @04:02PM (#29018379)
wlroots are not used by the two main desktops, so to get basic features like screenshots you need to support 3 different ways already.
Re:Xorg-Server 21.1.0 by boudin on Wednesday October 27, 2021 @04:25PM (#29018653)
You're mistaken, that's not the role of wayland. If you're looking into an universal way to takr screenshots, screesncast, etc..., you're looking for xdg-desktop-portal. There'is implementations for wlroots, gnome, qt, and others.
Re:Xorg-Server 21.1.0 by wing-_-nuts on Wednesday October 27, 2021 @05:22PM (#29019313)
>You're mistaken, that's not the role of wayland.

A side note, but I really hate this ideology of 'x does one thing' outside of command line tools. This is a display server we're talking about. It should be able to enable normal desktop usage. Maybe not everything but core features like brightness control, screen sharing, screenshots, etc. Otherwise every wm that comes along is going to have to reinvent the wheel. There are tons of really great window managers out there, where the authors have looked at all the work it will take to get running on wayland, and have simply thrown their hands up in frustration.

It seems to me the only people that really benefit from the switch to wayland are the wayland devs themselves.

Re:Xorg-Server 21.1.0 by xxpor on Wednesday October 27, 2021 @08:34PM (#29020906)
All I know is as a user, Wayland lets me have reasonable HiDPI support (where 2 monitors can have different scale levels). And I can't on X.
Re:Xorg-Server 21.1.0 by dralley on Wednesday October 27, 2021 @11:34PM (#29022087)
Wayland is not a display server, it's a display protocol. There is no "display server" in the architecture.
Re:Xorg-Server 21.1.0 by wing-_-nuts on Thursday October 28, 2021 @11:33AM (#29027299)
I, as a user, do not give a rats ass if it's a protocol or server. I don't want to lose functionality just because some group of devs prefers to do a rewrite of something.

I've used gnome wayland, and sway. It's pretty damning that so few other window managers support wayland due to the sheer difficulty of the task.

Re:Xorg-Server 21.1.0 by md8z on Thursday October 28, 2021 @11:48AM (#29027458)
Wayland is a protocol specifically for compositing window managers, the point of it was to simplify the implementation of window managers that already existed as X compositors, e.g. Mutter, KWin, Enlightenment. If other window managers weren't doing that then it wouldn't really make sense to port them to Wayland, because that entails also redesigning them as a compositor. I know many older X window managers never bothered to implement a compositor and just recommended people use compiz, compton, picom, etc.

Someone could build a compatibility layer based on picom or something, and that has been talked about for a while, but I don't think it will happen unless somebody funds it with some real dollars. And I'm skeptical of whether people using those window managers would even pay for it at all, based on the comments here it seems they would rather put the money towards keeping Xorg alive.

Re:Xorg-Server 21.1.0 by kaba0 on Wednesday October 27, 2021 @04:16PM (#29018571)
Wlroots is an implementation of wayland protocols — if gnome and plasma implement the same protocol according to specification, you only have to write code to that protocol, once.
Re:Xorg-Server 21.1.0 by yjftsjthsd-h on Wednesday October 27, 2021 @04:49PM (#29018917)
Right, but that protocol isn't in wayland proper and isn't standardized, so GNOME and KDE and wlroots all have different takes.
Re:Xorg-Server 21.1.0 by dralley on Wednesday October 27, 2021 @05:27PM (#29019355)
Right, but the point is that the protocol doesn't need to be in Wayland proper, so long as it's standardized somewhere. And it is.

https://flatpak.github.io/xdg-desktop-portal/portal-docs.htm...

Re:Xorg-Server 21.1.0 by bitwize on Wednesday October 27, 2021 @06:14PM (#29019756)
I'm sure the architects of Xorg have a much better idea of which abstraction to use and why it's superior to Wayland.

Oh wait, the architects of Xorg designed Wayland!

X11 is a dead end. Its authors have deprecated it and offered an upgrade path: Wayland. Time to make like Elsa and let it go.

Re:Xorg-Server 21.1.0 by a1369209993 on Wednesday October 27, 2021 @07:15PM (#29020245)
> the architects of Xorg

Xorg was designed decades ago. The architects of Xorg are dead, retired, or overwritten with their stupider future selves; you're talking about maintainers.

Re:Xorg-Server 21.1.0 by marcodiego on Wednesday October 27, 2021 @10:54PM (#29021847)
Xorg was not designed. It organically evolved.
Re:Xorg-Server 21.1.0 by a1369209993 on Wednesday October 27, 2021 @11:05PM (#29021912)
... Okay, that's fair, but not really my point.