XWayland HiDPI broken in 3.38
Affected version
Using NixOS unstable, with Gnome 3.38.2 on Wayland.
Bug summary
I'm using a laptop with a 13" 4k display and sometimes an external 27" 4k display. I'm happy with 200% scaling on the internal and 100% scaling on the external display.
In 3.36, HiDPI used to work with XWayland, in that X programs showed at the same scaling as the Wayland programs. Now in 3.38, there's no scaling applied.
Steps to reproduce
- Use the Displays pane to set scaling to 200% for internal
What happened
XRandR reports:
$ xrandr
Screen 0: minimum 16 x 16, current 3840 x 2160, maximum 32767 x 32767
XWAYLAND0 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 310mm x 170mm
3840x2160 59.98*+
It is not possible to set scaling, even 1x1 is not accepted:
$ xrandr --output XWAYLAND0 --scale 1x1
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 139 (RANDR)
Minor opcode of failed request: 26 (RRSetCrtcTransform)
Value in failed request: 0x20
Serial number of failed request: 21
Current serial number in output stream: 22
For comparison, when running under XOrg I do this to make the scaling work:
xrandr --output eDP-1 --scale 1x1 --pos 0x3240 --output DP-2 --scale 1.5x1.5 --pos 0x0
What did you expect to happen
X programs should use the same scaling as the Wayland programs