News for hackers. Stuff that matters.
Re:XFCE Wayland Development Roadmap by jeroenhd on Thursday September 14, 2023 @06:24AM (#37507103)
If scaling is off, there's a good chance the application is using GTK. GTK4 doesn't support fractional scaling but I believe GTK5 might.

If applications are written in GTK2/3/4, fractional scaling won't work well and lead to blurry windows.

Integer scaling (1x, 2x, 4x) should work just fine, but fractional scaling isn't implemented consistently across GUI frameworks. Hopefully Wayland will fix the inconsistencies between implementations, though GTK and some other GUI frameworks will likely remain broken for a while.

Re:XFCE Wayland Development Roadmap by d-k-bo on Thursday September 14, 2023 @06:39AM (#37507198)
On Wayland, GTK3/4 windows work well with fractional scaling (on GNOME). They are rendered at 200% and then downscaled by the compositor, which looks mostly fine.

Blurryness is often caused by GTK2/old Qt5/Electron applications that don't support Wayland and are rendered using XWayland at 100% and then upscaled by the compositor.

Re:XFCE Wayland Development Roadmap by vetinari on Thursday September 14, 2023 @08:52AM (#37508303)
There is a new wayland extension, that allows for rendering at fractional scales directly in the application, so when you use a display with fractional scaling, there is no downscaling done by the compositor.

Support for this kind of rendering is going to wait until Gtk 5 -- implementing it in Gtk 4 would break ABI, and then the world would have to listen to cries about Yet Another Breakage. The current system, rendering at integer scale and then compositor-downscale is working fine since Gtk 3. Btw, exactly this way is how Apple does it, and it was lauded as a great way to support scaling.

Re:XFCE Wayland Development Roadmap by jeroenhd on Thursday September 14, 2023 @09:02AM (#37508422)
I think "mostly looks fine" is the crux here.

I also believe this is only the case for Wayland, so X11 users may be out of luck here. Actual fractional support would require breaking API compatibility, which is why integer scaling+downscaling is necessary.

Re:XFCE Wayland Development Roadmap by csdreamer7 on Thursday September 14, 2023 @06:37AM (#37507179)
> GTK4 doesn't support fractional scaling but I believe GTK5 might.

I do not think this is current info, but otherwise might be the reason as it is an experimental feature.

For example, you can enable fractional scaling in GNOME right now.

https://www.youtube.com/watch?v=BjfZ8TSXsps

This phoronix article shows the variable to enable it in GTK.

https://www.phoronix.com/news/GTK-4.11.1

Edit: added a little clarification + cited the specific bit of text I was responding to.

Re:XFCE Wayland Development Roadmap by bitwize on Thursday September 14, 2023 @06:56AM (#37507322)
Then it really is time to pull the plug, and remove X11 support from the major toolkits and DEs.
Re:XFCE Wayland Development Roadmap by bandrami on Thursday September 14, 2023 @07:52AM (#37507694)
What is this obsession people have with ripping out working code?

Debian still ships support for token ring; the idea that X11 is ever "going away" really misunderstands how free software works.

Re:XFCE Wayland Development Roadmap by resoluteteeth on Thursday September 14, 2023 @09:18AM (#37508622)
There are going to be apps that only run on x11 for a long time and will need to use xwayland, so it's unlikely that linux distributions will stop distributing x11 libraries entirely.

However, development of xorg is completely dead so it is pretty likely that distributions will stop support running xorg sessions in the future, and at some point xorg will likely not run on new graphics cards anymore.

KDE has announced plans to discontinue support for running x11 sessions and only runs on wayland in the upcoming plasma 6 version.

For now all the gui toolkits will presumably continue to support x11, but at some point, it is likely that new applications will only care about supporting wayland, and after that, it is possible that future versions of gui toolkits will stop supporting x11.

Maybe "ripping out working code" is a bad thing, but at a certain point people would have to put in extra effort to ensure that x11 stays "working" and if nobody steps up to put in that effort and x11 support breaks, it won't be ripping out "working" code anymore.

Re:XFCE Wayland Development Roadmap by yjftsjthsd-h on Thursday September 14, 2023 @11:29AM (#37510286)
> development of xorg is completely dead

I don't think that's true; didn't it just recently get a new maintainer who put out a bug fix release and everything?

Re:XFCE Wayland Development Roadmap by bandrami on Thursday September 14, 2023 @01:13PM (#37511751)
It's weird the certainty with which people say "wayland is the future" when that's not how free software works; nobody knows what "the future" is because it depends largely on volunteer labor (even if some FDo devs are paid, the packagers aren't for the most part and that's who actually gets the software to users).
Re:XFCE Wayland Development Roadmap by bandrami on Thursday September 14, 2023 @11:44AM (#37510499)
Xorg, possibly, but Xenocara is an X11 implementation that is currently maintained and regularly updated. The OpenBSD team says it's largely feature-complete so there won't be new big changes, but it's getting regular commits. OpenBSD is a small userbase but it's important enough in security circles that I have trouble imagining toolkit implementors will drop support simply because some people have a weird need to delete working software.
Re:XFCE Wayland Development Roadmap by bitwize on Thursday September 14, 2023 @05:46PM (#37515280)
Work has already begun to get Wayland working on OpenBSD. With the major toolkit and DE projects removing X support in upcoming releases, even Xenocara's long-term relevance is very much in doubt.
Re:XFCE Wayland Development Roadmap by bandrami on Thursday September 14, 2023 @06:41PM (#37515758)
Not really. Matthieu's done some work to almost get it usable, but if there's been any talk of ever taking it out of ports and into the base system it hasn't happened on any public mailing lists. Given that xenocara is rootless and pledged there's not really a security argument for it, and there just isn't that much interest from the team, at least not that they've expressed.
Re:XFCE Wayland Development Roadmap by bandrami on Thursday September 14, 2023 @06:47PM (#37515827)
I suppose OpenBSD might not ever have a GTK5 desktop if GTK5 for whatever reason drops X11 as a target (remember they still support DirectFB) but I don't think that's really a showstopper since users seem to prefer cwm anyways.
Re:XFCE Wayland Development Roadmap by bitwize on Thursday September 14, 2023 @05:48PM (#37515293)
The X code path has to be maintained as the toolkit evolves. X is old, bletcherous code written for graphics hardware of the 80s and 90s. It's holding modern apps back. No one working on modern apps wants to maintain anything having to do with X.
Re:XFCE Wayland Development Roadmap by bandrami on Thursday September 14, 2023 @06:43PM (#37515774)
And network stacks would be simpler if they took out token ring support, too, and that doesn't happen either. An interface once shipped is basically frozen whether people like it or not. The toolkits still support DirectFB, even if it's not built by default.
Re:XFCE Wayland Development Roadmap by vetinari on Thursday September 14, 2023 @08:59AM (#37508385)
There are two different things mixed together:

- fractional scaling of the display output

- app rendering at fractional scales.

The first one works fine with Gtk 3 and newer; the application renders its output at nearest higher integer scale, and then the compositor downscales it to requested fractional scale (i.e. app renders at 200% and compositor downscales it to 175%). Apple does exactly this same thing (just with slightly different scales; they won't show you nice 150% or 175% for a reason; they optimize for different thing).

The second one is rendering at fractional scales directly by the application; then the compositor doesn't downscale anything, just displays the buffer as it is (i.e. app renders at 175% and compositor displays it as it is). Since rendering at fractional scales is more demanding (just think about fractional mouse coordinates or how to display 1px straight line and don't get lost in the rounding errors), it took longer to materialize. It is this support that will have to wait for Gtk 5.

But meanwhile, your (Gtk) apps will be displayed at fractional sizes using the first method.

Re:XFCE Wayland Development Roadmap by blueflow on Thursday September 14, 2023 @06:36AM (#37507177)
The constant GTK rewrites are a disaster. Why should applications even bother starting with GTK(n) if it will be obsolete and incompatible when GTK(n+1) comes around?
Re:XFCE Wayland Development Roadmap by dvdkon on Thursday September 14, 2023 @06:59AM (#37507349)
You're exaggerating. GTK2 came out in 2002, GTK3 in 2011 and GTK4 in 2020. That' s almost a decade for each version, and you have to consider that GTK2 was maintained for a long time after 3's release and that current Linux distros still package it. And the GTK3 to 4 transition required some changes, but far from a rewrite.

If you need multi-decade support from your GUI layer, I can recommend raw Win32 or VT100 terminal codes. There's hardly any other API with that kind of backwards compatibility.

Re:XFCE Wayland Development Roadmap by j16sdiz on Thursday September 14, 2023 @07:20AM (#37507464)
It's the downstream projects.

It take 2-3 years to iron out the bugs. Non-gnome downstream take another 3 years to adopt and stabilise.

By the time the adoption is finished, another major version emerges.

We don't have any good way to maintain compatibility that long.

Re:XFCE Wayland Development Roadmap by robinsonb5 on Thursday September 14, 2023 @08:18AM (#37507917)
That's assuming downstream is even still around to adopt the new version. There are plenty of simpler tools which are "done" - itch scratched - and the author has long since moved onto new things. Duct-taping the bitrot inflicted by toolkit churn is something that requires resources - if nothing else it consumes time and energy that people could otherwise be spending on current interests and projects. That's where the "open-source means everything's free" mindset can be a problem, since it's just assumed the authors will step up and do work made necessary by the decisions of others, with no remuneration or consideration.
Re:XFCE Wayland Development Roadmap by badsectoracula on Thursday September 14, 2023 @07:26AM (#37507505)
> There's hardly any other API with that kind of backwards compatibility.

X11/Xlib, though obviously you have to do the GUI bits yourself (but then you mentioned VT100 terminal codes so i guess that is acceptable).

Also AFAIK Motif is backwards compatible going back to the 90s.

Re:XFCE Wayland Development Roadmap by vetinari on Thursday September 14, 2023 @08:47AM (#37508236)
Motif is compatible, because it is dead.
Re:XFCE Wayland Development Roadmap by pjmlp on Thursday September 14, 2023 @12:18PM (#37510931)
Well, there is Open Motif for those that feel like using it.
Re:XFCE Wayland Development Roadmap by badsectoracula on Friday September 15, 2023 @10:51AM (#37523945)
I meant OpenMotif as pjmlp mentioned. These days it seems to mainly receive patches to keep it working but it maintained API (and ABI where possible) compatibility even when it was more actively developed as it was a design choice, not a byproduct of not receiving updates. AFAIK it is how Lesstif managed to be a (mostly) drop-in binary compatible alternative to Motif before the latter became open source.
Re:XFCE Wayland Development Roadmap by layer8 on Thursday September 14, 2023 @07:42AM (#37507621)
Multi-decade support should be the norm for GUI toolkits. Why should all GUI apps of the world have to be rewritten every decade? That’s just a wasteful use of developer resources, and also a wasteful disruption of end user habituation.
Re:XFCE Wayland Development Roadmap by bzzzt on Thursday September 14, 2023 @08:21AM (#37507938)
Because requirements change and you can't keep API's sane when only bolting on new functionality. You can disagree about the support timeframe, but in 10-15 years time we've gotten used to high resolution screens, HDR, HFR, multitouch etc. If you don't ever change API's you're leaving a lot of potential on the table.
Re:XFCE Wayland Development Roadmap by layer8 on Thursday September 14, 2023 @08:31AM (#37508039)
Windows added all those functions without breaking compatibility. Yes, applications might have to be modified to take advantage of new features that make sense for the application in question, but that doesn’t imply that they should have to switch toolkits.

While Windows doesn’t provide a unified GUI toolkit, win32 UI controls of different generations can be mixed freely within an application, enabling gradual upgrades.

Re:XFCE Wayland Development Roadmap by tristan957 on Thursday September 14, 2023 @09:55AM (#37509081)
Windows is a paid operating system with thousands of developers working on it. GTK has 3 regular developers. Please step up if you're going to complain.
Re:XFCE Wayland Development Roadmap by layer8 on Thursday September 14, 2023 @10:17AM (#37509420)
I guess that’s why the year of the Linux desktop will never come.
Re:XFCE Wayland Development Roadmap by bandrami on Thursday September 14, 2023 @07:50AM (#37507672)
Meanwhile a Windows application compiled 25 years ago still runs today. A Windows application compiled 30 years ago runs with a very small compatibility shim you can ship with it as a DLL.
Re:XFCE Wayland Development Roadmap by arp242 on Thursday September 14, 2023 @09:12AM (#37508538)
> a Windows application compiled 25 years ago still runs today

*Usually, not always.

A GTK 2 application compiled 25 years ago usually still runs today, too. Just because GTK 3 is available doesn't mean GTK 2 stopped existing.

Re:XFCE Wayland Development Roadmap by bandrami on Thursday September 14, 2023 @11:45AM (#37510527)
A GTK 2 application compiled 25 years ago was before the Big Glibc Switch that caused us so many headaches in the early 00's, so no, it won't.
Re:XFCE Wayland Development Roadmap by arp242 on Thursday September 14, 2023 @05:00PM (#37514768)
My xv copy has a mtime of Aug 4 1998 (pre-compiled binary from the RPM on the website). It runs on my current Void Linux system. Not GTK, but that's a detail: point is it runs, and is 25 years old. I've also run old Opera copies from the 90s, although that's longer ago and I'm not sure if that still works.
Re:XFCE Wayland Development Roadmap by asoneth on Thursday September 14, 2023 @09:35AM (#37508847)
Having discussed this issue with friends at Microsoft, they apparently spend astronomical amounts of time, money, and effort to maintain backwards compatibility while still adding new capabilities, functionality, and toolkits. They know that this is a key reason many organizations rely on Windows.

I have no specific insight into decision-making in open source organizations, but given that the resources they're working with are several orders of magnitude less it's not surprising to me that they sometimes end up having to choose between stability and new functionality. (While I personally prefer projects towards one end of that spectrum, I'm happy that different projects have different values for other people.)

Re:XFCE Wayland Development Roadmap by bandrami on Thursday September 14, 2023 @11:49AM (#37510569)
Linus is also kind of obsessive about this at the kernel level. I wish more of the userland shared that priority (cough cough)
Re:XFCE Wayland Development Roadmap by tuna74 on Thursday September 14, 2023 @03:22PM (#37513565)
Yeah, the driver ABI in Linux is totally stable. Cgroups as well!
Re:XFCE Wayland Development Roadmap by coldpie on Thursday September 14, 2023 @01:38PM (#37512173)
A big part of it is the ecosystem is mostly/almost entirely open-source, so in theory you can update all your applications to use the new API. So breaking changes are not as big a deal in that world, as they are on Windows where you definitely do not have that option due do the primacy of closed-source software. I think this view is short-sighted, though. If there are 100 users of a given library, then it takes 100x more effort to update all the applications than for the 1 library developer to avoid making breaking changes.
Re:XFCE Wayland Development Roadmap by gettodachoppa on Thursday September 14, 2023 @08:23AM (#37507959)
>There's hardly any other API with that kind of backwards compatibility.

Qt? 99.99% of the API from Qt 4 (2005) is identical in Qt 6 (ongoing). A few headers were renamed, and a few minor functions, generally stuff you can port in 1 day.

When they released Qt 5 and 6 and decided to switch from Qt Widgets to a new GUI toolkit (QML), they didn't say "umm, just rewrite your whole codebase in QML bro", they kept widgets around in perpetual maintenance mode. This is how you respect your users.

Re:XFCE Wayland Development Roadmap by dvdkon on Thursday September 14, 2023 @09:19AM (#37508632)
I think what Qt does is a good compromise, but there are breaking changes. Complex FLOSS projects spent months or years upgrading from Qt4 to Qt5 and then to Qt6. The exact timeframe is a matter of priorities and available developers, but someone had to put a not insignificant amount of work into porting. A far cry from decades-long ABI compatibility.
Re:XFCE Wayland Development Roadmap by ndsipa_pomu on Thursday September 14, 2023 @06:38AM (#37507190)
Just checked and I've got my current laptop screen set to 175% global scaling for a 3840x2160 screen.