Skip to content

Draft: Add native mode to Xrandr emulation for (fractional) scaling

It would be great if Xwayland clients could render at the native resultion, at least in fullscreen, when (fractional) scaling is used in the Wayland compositor. We can archive that by using the existing Xrandr mode emulation, based on wp_viewporter, in a reversed way. As the scaling happens on the compositor level (possibly even in hardware planes), we only have to ensure a 1-1 mapping of the backing buffer with the native screen resolution, while the viewport destination size matches the logical resolution.

It discovers the native resolution using wl_output and allows me to run games such as Xonotic to be sharply rendered in native resolution (tested with 1920x1080) in a Gnome session with 125% scaling. The correct values are also detected on KDE and Sway.

Edited by Robert Mader

Merge request reports