GNOME/Mutter - Wayland Fractional Scaling Breaks VM Display Resolution
I originally reported this to the applications Virt-Manager and GNOME Boxes, which this bug affects. I then sent it to QEMU (qemu-project/qemu#2231), but they said this would be the correct forum. Below is an edited version of my QEMU report:
Host environment
- Operating system: Fedora 39
- OS/kernel version: Linux 6.7.9-200.fc39.x86_64
- Architecture: x86
- QEMU flavor: qemu-system-x86_64 (I think)
- QEMU version: 8.1.3 (qemu-8.1.3.4.fc39)
- QEMU command line: I am a new user, and I am running via GUIs, namely virt-manager and GNOME Boxes, not the CLI
Emulated/Virtualized environment
- Operating system: any (Tested Fedora 38,39, GNOME OS Nightly, and Windows 10,11)
- OS/kernel version: any
- Architecture: x86
Description of problem
VMs are rendered at a higher resolution than the pixel count of their window, seemingly because mutter is rendering at a higher resolution then downscaling for fractional scaling. Spice reports the higher-than-native resolution to the guest OS, which then resizes to the higher resolution, and is downscaled to the actual resolution by GNOME.
Steps to reproduce
- Enable GNOME Mutter experimental fractional scaling
- Launch VM
Additional information
This only occurs when wayland fractional scaling is enabled, not when text is scaled. Since GNOME/mutter accomplishes fractional scaling by downscaling, I think the VM is being told its window has a higher resolution than it actually has, so it is rendering the VM at a higher resolution, which is then downscaled by GNOME and displayed at the display's real resolution. This VM should render at the actual resolution of the panel when set to do so. The display itself should not be scaled; only the VM viewer's GUI should be affected by this. This is a problem because it is still slightly blurry, takes more resources, and prevents me from using VMs to test graphical and scaling-related issues on my laptop without toggling scaling to 100% every time I launch a VM.
In the screenshot below, my resolution is 2256 x 1504 and I have set fractional scaling to 125%. It is worth noting (2256 / 1.25) / 3606 is approximately 0.5.
EDIT: Uploaded wrong screenshot
I apologize if the report is unsatisfactory. I will provide more detail if instructed.