by zamalek · 3y ago · 0 comments
Not exactly, they have thrown out everything that almost nobody uses - such as networking. They have, however, added things that most people do care about - such as different HiDPI across multiple monitors and an extremely thin (low latency) render path.
> That Wayland is 10 years old and still barely usable
And that has changed in the past 2 years (with exception to whatever Ubuntu does to screw it up, but such is Ubuntu).
I keep hearing this: "they've added things people care about, such as..." then a shopping list of utterly irrelevant stuff I can't even see.
>1 screen with different DPI is THE ONLY thing Wayland does that I want.
I don't give a flying monkey about rendering pipelines, refresh rates, tearing, or any of that stuff.
If someone found a way to add variable DPI to Xinerama, job done, and I could continue to use X for another decade or two, and ignore the weird arcane stuff that the Wayland folks want and AFAICS nobody else cares about...
Just as with GNOME, or systemd, or OStree, or Flatpak, or almost anything else new out of Red Hat and its community in the last decade.
What does different DPI mean for you though?
Xinerama causes the server to report the same fake DPI across monitors for backwards compatibility reasons (last year or so Xorg was released with a better approximation for DPI but it apparently broke a bunch of programs so it was reverted in the next release), but applications that care about DPI can still use the RandR extension to obtain not only per-output DPI but all sorts of output-specific information.
The X server had functionality for years, from what i can tell the issue isn't on X11/Xorg/Xinerama/Xwhatever anymore but on the clients (toolkits, window managers, etc) to use it to do something useful.
1. The toolkit/applications needs to support scaling, preferably using arbitrary (aka fractional) scaling.
2. The window manager needs to obtain per-output (output=monitor) DPI and associate a scaling value for each output (note that scaling and DPI are not necessarily tied - someone might e.g. want a high scaling factor for a secondary 1440p monitor because they have it farther away than their primary monitor).
3. The application/toolkit needs to tell to the window manager that it supports scaling as well as know that the window manager supports scaling. Window properties can be used to do that.
4. The window manager needs somehow to communicate to the toolkit/application to scale a window. This can happen either because the window was dragged to a monitor (output) with different output but it could also be because, e.g. the user explicitly requested to scale a window from the window menu (e.g. for making a screencast for youtube). This "somehow" is basically a set of messages since the mechanism is already used for other things already.
5. If a toolkit/application does not support scaling (i.e. it does not have the appropriate properties) the window manager may decide to fake it itself (e.g. by redirecting the window output to a pixmap and then drawing that pixmap scaled). If a toolkit/application does support scaling but the window manager doesn't then it is up to the toolkit/application to decide, e.g. it may do its own scaling by tracking the output the window is and scaling itself appropriately (this will need some heuristics to avoid being too janky as the toolkit/application is essentially taking over part of what the window manager's job and toolkits/applications may just not want to do that).
If it isn't already obvious, the issue here is that this concerns multiple entities:
1. There needs to be some sort of commonly accepted messages and properties for the window managers and applications to communicate scaling.
2. Toolkits (and applications that use custom toolkits) need to implement support for scaling and handling the above messages and properties.
3. Window managers also need to implement the above messages and properties, implement some sort of scaling configuration and use the appropriate RandR functionality to setup initial per-output scale configuration.
AFAIK of all the above the only thing that exists is that the X server can provide the necessary information and Qt supports fractional scaling. AFAIK it also can use its own root property to set per-output scaling but it does the scaling itself independent from the window manager so it is far from ideal.
For the rest basically the toolkit and window manager developers need to be convinced to work on it and also come up with a common message/property protocol, both of which IMO are the hard parts - compared to that, the technical side is easy :-P.
And color calibration.
>such as different HiDPI across multiple monitors
I had this working with multiple X11 servers 20 years ago.
>And that has changed in the past 2 years
I was told that exact same line 5 years ago. I guess it will be just as true in 5 years again.
Wayland doesn't have all the features we'd like it to have yet, it's missing some big things like global hotkeys and color management. It's not moving as fast as I'd like, but all those things are being actively worked on.
X11 also doesn't have all the features we'd like it to have, such as the ability to render frames without tearing or the ability to lock the screen while a context menu is open or the ability to implement a desktop environment without a ton of race conditions. Those things are not being worked on, and X11 will actually regress as new hardware is released and developers don't focus on hacking X11 to work with that hardware.
For a lot of users (such as myself), Wayland is already better than X; there's a reason lots of distros ship Wayland by default now. The situation is certainly way better now than it was 5 years ago.
But that doesn't mean you have to use it! It's ready for you when it's ready for you, and maybe X's wonkyness doesn't annoy you or you've learned to hack around it (congrats on getting different DPI scaling on different monitors to work! I haven't, despite struggling with it. I didn't even know DPI scaling was a thing 20 years ago. Anyway, it worked out of the box on Wayland.)
What exactly do you mean? My Xorg setup can render frames without tearing just fine, both in video playback (VLC) and in games.
TBH i don't really care about tearing (since it tends to come with input lag even on desktop usage) aside from videos, so i haven't looked much into it. However people are working on tearing in Xorg - see the latest commits by Sultan Alsawaf on the xfree86 subtree[0] (which is the standalone X server). Specifically this[1] commit adds a "TearFree" page flip mode in the modesetting driver for not having any sort of tearing at any setup.
[0] https://gitlab.freedesktop.org/xorg/xserver/-/commits/master...
[1] https://gitlab.freedesktop.org/xorg/xserver/-/commit/a94dd95...
People want to move windows between their screens.
The lack of proper HiDPI support was really starting to become a problem when trying to run Linux on a laptop that isn't from the early 2000s. Fortunately, with wayland, it now seems mostly solved (at least in Gnome and KDE).
You had to hack around X11's shorttcomings.
X11 does not support HiDPI or multiple DPI across multiple monitors without hacks and workarounds. Wayland does. That makes X a non-starter and Wayland the only choice for many users.
Wayland has clearly chosen a set of trade-offs that are far superior for a lot of users and I fully expect anybody sticking with X11 to gradually become more and more of an outlier over time, and that's entirely fine by me.
(I use fvwm2 with a sub-40 line config that starts by turning almost all the usual features off, plain xterm, and heirloom vi, I'm already perfectly used to being an outlier and so long as I can coax it all into keeping working I don't see any reason to complain that lots of other people prefer to use things from this century instead ;)
I myself was not a fan of wayland either, due to a bunch of functionality removed which I use in my workflow, and will stick with XOrg until XFCE forces me to switch to Wayland.
There's a lot of churn in the Linux ecosystem, and some are going to be better received than others. I didn't see the point in Wayland (but I'm not a maintainer of XOrg code to understand how bad the codebase is), I see the principle behind ideas like Flatpak (although not sure if they have a good sandboxing story now, but they sure have their GBs of layers), but when it comes to pipewire, for example, I'm very happy that it exists.