Live data from Hacker News

Ancient X11 scaling technology

flak.tedunangst.com

221–230 of 264 posts

Re: Ancient X11 scaling technology

#221

Earlier quoted context omitted.

I'm struggling to imagine why would anyone ever want to do that. It's not even an edge case at this point, it's over the edge.

I have two monitors, but only one of them is 4k and a couple cm bigger, and I dont like to buy stuff unless I really need. It is good enough for me. But this case also comes up on the edge of my laptop when I have the 4k plugged in at the same time. In the days of eclipse I'd keep the code editor top half on monitor, and the console output on the laptop, worked quite nice.

That sounds like you just want to detach the console window, to be honest.

Re: Ancient X11 scaling technology

#222

Earlier quoted context omitted.

> Free-scaling UIs were tried for years before that and never once got to acceptable quality. The web is a free-scaling UI, which scales "responsively" in a seamless way from feature phones with tiny pixelated displays to huge TV-sized ultra high-resolution screens. It's fine.

That's actually a different kind of scaling. The one at issue here is closer to cmd-plus/minus on desktop browsers, or two-finger zooming on phones. It's hard to make that look good unless you only have simple flat UIs like the one on this website. They did make another attempt at it for apps with Dynamic Type though.

User scale and device scale are combined into one scale factor as far as the layout / rendering engine is concerned and thus are solved in the same way.

Re: Ancient X11 scaling technology

#223

Earlier quoted context omitted.

I used to see it all the time on X11. I'd see it on YouTube/Firefox. I'd see it on VLC. I'd see it on MPV. Any video player, playing any fast paced video you'll see X11 struggle to keep up with drawing full frames that it'd just give up and draw half of one frame and another half of another frame and call it a day. The Intel driver luckily had an xorg.conf setting I could add to make this less of an issue -- I guess…

> It just works without any faffing around as Windows, MacOS, etc has done since the mid 1990's. Unless you like your applications to save your window positions. I like Firefox to be on my left monitor, and if I use Wayland I have to manually drag it there every time I start it, because Wayland, in the year 2025, still lacks this basic feature that Windows, macOS, and X11 have had for like 40 years now. (unless I use…

Isn't positioning windows a window manager problem? I can't see how that is an X11 vs Wayland issue except that the window managers you are using are different.

Re: Ancient X11 scaling technology

#224

Earlier quoted context omitted.

I'm struggling to imagine why would anyone ever want to do that. It's not even an edge case at this point, it's over the edge.

It happens. You might push a window aside so that it's partially on a second screen and still see activity on the second screen. It should be the expected behavior.

I'm not saying it doesn't happen. Of course it will happen. I'm just saying it isn't something that needs to be handled perfectly, specially when handling it perfectly requires immense design changes at a fundamental level.

Why can't you just display a blurry rectangle until the mouse cursor goes to the other screen and then you switch the primary resolution from one screen to the other?

I feel like trying to be extremely clever to handle this particular problem would lead to a solution that handles far more common situations much worse for everybody...

Re: Ancient X11 scaling technology

#225
post #4

That's probably better than most scaling done on Wayland today because it's doing the rendering directly at the target resolution instead of doing the "draw at 2x scale and then scale down" dance that was popularized by OSX and copied by Linux. If you do it that way you both lose performance and get blurry output. The only corner case a compositor needs to cover is when a client is straddling two outputs. And even in…

I’ll just add that it is much better than fractional scaling.

I switched to high dpi displays under Linux back in the late 1990’s. It worked great, even with old toolkits like xaw and motif, and certainly with gtk/gnome/kde.

This makes perfect sense, since old unix workstations tended to have giant (for the time) frame buffers, and CRTs that were custom-built to match the video card capabilities.

Fractional scaling is strictly worse than the way X11 used to work. It was a dirty hack when Apple shipped it (they had to, because their third party software ecosystem didn’t understand dpi), but cloning the approach is just dumb.

Re: Ancient X11 scaling technology

#226
post #181

It's not "can you provide the screen DPI to a window?" people bemoan, it's "can you draw one window across two screens with differing DPIs, transparent to the application?"

I have never had a window open across two screens if I could help it. Complete non-problem.

If you have more than one display, and you want to be able to drag windows from one to another and want them to have a similar size after dragging, it's a hard problem.

Re: Ancient X11 scaling technology

#227
post #201
post #4

That's probably better than most scaling done on Wayland today because it's doing the rendering directly at the target resolution instead of doing the "draw at 2x scale and then scale down" dance that was popularized by OSX and copied by Linux. If you do it that way you both lose performance and get blurry output. The only corner case a compositor needs to cover is when a client is straddling two outputs. And even in…

If you did it right you would render the damaged area of each window for each display it's visible on, but that would require more rigerous engineering than our software stacks have.

It would also mean that moving the window now either needs to wait for repaint or becomes a hell lot more complicated and still have really weird artifacts.

Re: Ancient X11 scaling technology

#228
post #64
post #4

That's probably better than most scaling done on Wayland today because it's doing the rendering directly at the target resolution instead of doing the "draw at 2x scale and then scale down" dance that was popularized by OSX and copied by Linux. If you do it that way you both lose performance and get blurry output. The only corner case a compositor needs to cover is when a client is straddling two outputs. And even in…

If the initial picture is large enough the blur from down-scaling isn't so bad. Say 1.3 pixel per pixel vs 10.1 pixels per pixel.

That also means you need a 10x as powerful GPU though.

Re: Ancient X11 scaling technology

#229
post #31
post #4

That's probably better than most scaling done on Wayland today because it's doing the rendering directly at the target resolution instead of doing the "draw at 2x scale and then scale down" dance that was popularized by OSX and copied by Linux. If you do it that way you both lose performance and get blurry output. The only corner case a compositor needs to cover is when a client is straddling two outputs. And even in…

Wayland has supported X11 style fractional scaling since 2022: https://wayland.app/protocols/fractional-scale-v1 . Both Qt and GTK support fractional scaling on Wayland.

Fractional scaling is the problem, not the solution! It replaces rendering directly at the monitor’s DPI, which is strictly better, and used to be well-supported under Linux.

Re: Ancient X11 scaling technology

#230
post #181

It's not "can you provide the screen DPI to a window?" people bemoan, it's "can you draw one window across two screens with differing DPIs, transparent to the application?"

I have never had a window open across two screens if I could help it. Complete non-problem.

You have never used two monitors with different scaling (eg laptop and desk monitor), and have never moved windows between them? Ever?

If so, good for you, but there are plenty of people who do so.

Hell, in X11 it even sucks if you use the screens one at a time, eg if you turn plug your laptop into the monitor and turn off the laptop screen, and then later unplug and continue your work on the laptop, the scaling will be off on at least one device.

Post reply on HN