News for hackers. Stuff that matters.
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.