Custom Resolution With GPU Scaling On Wayland

KDE Plasma 6.8.0 has removed X11 Support.

On X11, it’s possible to scale from 4:3 (or any other resolution) to 2560x1440 by

xrandr --output DP-2 --scale-from 1920x1440

However, Wayland does not have this feature yet.

There’s only custom resolution on Wayland, however nether it nor custom EDID is the solution, the monitor can’t handle the stretch, it has to be done by gpu.

kscreen-doctor output.DP-2.addCustomMode.1920.1440.320000.full

I hope this feature will be supported, otherwise I have to stuck on X11.

Can you share the details of the monitor and what problem you are solving?
What is the native resolution of the monitor?
Is it using square pixels?

The monitor is native 2560x1440 320Hz.

I should like to scale it to 1920x1440 or even 1600x1440, exactly what this does in X11:

xrandr --output DP-2 --scale-from 1920x1440

What does that command do? Does it stretch round icons (e.g., Firefox) to ellipses on your monitor?

Yes. This will stretch the screen horizontally. So round will be ellipses.
The most important is that the GPU does the stretching, so the monitor still receives native resolution.

A regular custom resolution, the stretch is done by the monitor.

Gamescope is the only Wayland compositor I know that allows changing the aspect ratio. Usually you can scale, rotate, mirror. But aspect ratio seems to be a rare use case that everybody seemingly ignored.

What is your scenario? Why do you want to stretch the image on that monitor?

For gaming, playing FPS games.

Gamescope is certainly an option, but I think people are misusing it for just a aspect ratio stretching. It isn’t designed for mainly desktop PCs, and nested compositor introduces additional latency.

I did tried it for a while, it does not support native wayland well; and it cannot support KWin direct scanout unless set to sdl backend, which actually runs on X11, I cannot let it runs with --expose-wayland . Overall I rather runs on native resolution than bear the input latency it brings.

Thus I prefer a native Kwin stretching feature, but that option seems not to exist yet.

I don’t think we can do a direct scanout here, unless your monitor natively supports the resolution. Otherwise, the stretching must happen in the GPU somewhere, so your game must draw on an offscreen buffer.

Anyway, IIUC, you want apps to render to an arbitary “virtual resolution”, then kwin stretches it to a real resolution of your monitor (not keeping the aspect ratio). You might want to make a feature request on bugs.kde.org for this.