Live data from Hacker News

Ancient X11 scaling technology

flak.tedunangst.com

141–150 of 264 posts

Re: Ancient X11 scaling technology

#141

It’s astounding to me that in Linux, in 2025, I can’t just simply output a custom resolution. You are probably typing a response right now with some xrandr nonsense and I PROMISE you, it won’t do it. I can’t even scale my screen within a normal resolution to make it fit within a boundary. But I can do this in windows with an nvidis gpu. Crazy

You don't have to use xrandr to create a custom framebuffer with scaling and/or centering, although it is capable of doing so. You can also use Gamescope ( https://wiki.archlinux.org/title/Gamescope ), which works on both X11 and Wayland, and with any GPU. Traditionally it's used to launch a full-screen application, usually a game, but you can launch your window manager through it, if you want your desktop session to…

Thanks I will look into this

Re: Ancient X11 scaling technology

#142
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…

As someone who just uses Linux but doesn't write compositor code or really know how they work: Wayland supports fractional scaling way better than X11. At least I was unable to get X11 to do 1.5x scale at all. The advice was always "just increase font size in every app you use".

Then when you're on Wayland using fractional scaling, XWayland apps look very blurry all the time while Wayland-native apps look great.

Re: Ancient X11 scaling technology

#143

It’s astounding to me that in Linux, in 2025, I can’t just simply output a custom resolution. You are probably typing a response right now with some xrandr nonsense and I PROMISE you, it won’t do it. I can’t even scale my screen within a normal resolution to make it fit within a boundary. But I can do this in windows with an nvidis gpu. Crazy

[flagged]

> As for xrandr nonsense, get AMD card!

CUDA, and ray tracing performance.

I get it, I've heard the same from the sway maintainer, maintaining their crusade against Nvidia for a couple years now (the --unsupported-gpu flag used to be something like --my-next-gpu-will-be-amd), with some good arguments about how anti-foss Nvidia is. And if that's how sway wants to be then that's how sway's gonna be.

But with steamdeck and now steam os showing better performance than windows on handheld gaming devices, and with people getting more and more annoyed with Microsoft's bullshit in windows (like unwanted AI integrations), I think all of us Linux enthusiasts have a really good opportunity here to pull a huge influx of people in, if we're willing to budge just a bit on some of our dogmatic crusades against companies like Nvidia.

There's more Nvidia cards in the wild than AMD, according to steam surveys by a huge margin. If we can get Wayland display managers working well on Nvidia thenthat's a lot of new people we can bring into the fold!

Re: Ancient X11 scaling technology

#145
post #28
post #19

Earlier quoted context omitted.

Why is Wayland trying to monkey patch something that's broken elsewhere?

Do you want to be right or do you want to display apps.

How many apps will you display if you don't display them right? Are you ready to tell me poor graphics is not one of the reasons people not use Linux? You won't display apps to the users you lost. Instead Windows will.

Re: Ancient X11 scaling technology

#146
post #108

Brilliant. This is another piece of evidence on the pile of why we got Wayland: it's because people who understood X11 mostly retired and everyone else couldn't be bothered to learn X11 because it's "yucky C code" or something. And it bothers me that we lose remote rendering with Wayland (unless one fights with waypipe) that was just built-in to X11. Yes, it was slow, but actually if you're running a VM on your local…

> Yes, it was slow, Not particularly if you are on a low latency network. Modern UI toolkits make applications way less responsive that classical X11 applications running across gigabit ethernet. And even on a fast network the wayland alternative of 'use RDP' is almost unusable.

the approach used in this blog post requires rdp. It's not drawing using X, so there's no vector network transparency.

Re: Ancient X11 scaling technology

#147
post #46

It's like the "oh no, X11 suffers from tearing video" problem that they pull out all the time. (A) I have no idea what "video tear" is and (B) I play video all the time on my crappy laptop running X11 and it seems fine for me. But can I ssh to my remote server and run emacs or another program completely transparently yet with Wayland? Nope. I do that with X11 continuously.

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'd turn on some internal Intel driver logic to skip frames or something else if it wasn't able to draw the entire video frame in time for display. However as soon as Debian made Wayland the default this issue 100% disappared and I no longer needed to edit a conf file to make my display work correctly. This is hands-down the singular reason I love Wayland. It just works without any faffing around as Windows, MacOS, etc has done since the mid 1990's. Wayland has achieved more in 5 years than X11 has done in the last 25 years.

Re: Ancient X11 scaling technology

#148
post #74

Earlier quoted context omitted.

> can't do anything about the fact that part of the window will look wrong if it overlaps two displays with different scaling It's silly that people keep complaining about this. It's a very minor effect, and one that can be solved in principle only by moving to pure vector rendering for everything. Generally speaking, a window will only ever span a single screen. It's convenient to be able to drag a window to a separ…

> It's silly that people keep complaining about this. It's a very minor effect, and one that can be solved in principle only by moving to pure vector rendering for everything. If you have DPI virtualization, a very sufficient solution already exists: pick a reasonable scale factor for the underlying buffer and use it, then resample for any outputs that don't match. This is what happens in most Wayland compositors. Ex…

>users may want to scale differently anyways

Users think they want a lot of things they don't really need. Do we really want to hand users that loaded gun so that they can choose incorrectly where to fire?

Re: Ancient X11 scaling technology

#149
post #49

Earlier quoted context omitted.

> That's still mostly the case in what's shipping right now I believe All major compositors support fractional scaling extension these days which allows pixel perfect rendering afaik, and I believe Qt6 and GTK4 also support it. https://wayland.app/protocols/fractional-scale-v1#compositor...

That's great, however why do we use a "scale factor" in the first place? We had a perfectly fitting metric in DPI, why can't I set the desired DPI for every monitor, but instead need to calculate some arbitrary scale factor? I'm generally a strong wayland proponent and believe it's a big step forward over X in many ways, but some decisions just make me scratch my head.

> We had a perfectly fitting metric in DPI, why can't I set the desired DPI for every monitor, but instead need to calculate some arbitrary scale factor?

Because certain ratios work a lot better than others, and calculating the exact DPI to get those benefits is a lot harder than estimating the scaling factor you want.

Also the scaling factor calculation is more reliable.

Re: Ancient X11 scaling technology

#150
post #6

Drawing a circle is kind of cheating. The hard part of scaling is drawing UI elements like raster icons or 1px hairlines to look non-blurry.

>> The hard part of scaling is drawing UI elements like raster icons or 1px hairlines to look non-blurry. And doing so actually using X not OpenGL.

Toolkits don't use X to do much (if any) drawing these days. They all use something like cairo or skia or -- yes -- OpenGL to render offscreen, and then upload to X for display (or in the case of OpenGL, they can also do direct rendering).
Post reply on HN