XWayland Adds New Option To Expose Dummy Modes For Gamescope / Steam Deck
Written by Michael Larabel in Wayland on 20 May 2022 at 05:27 AM EDT. 8 Comments
WAYLAND --
Merged yesterday to the mainline X.Org Server for XWayland is the "-force-xrandr-emulation" option added for Valve's Gamescope / Steam Deck usage.

The new "-force-xrandr-emulation" option for XWayland allows for additional, non-native modes to be exposed to the X11 client (in this case, games). This is intended for use with Wayland compositors where the Viewporter extension isn't exposed, such as the case with Valve's Gamescope compositor in use on the Steam Deck or setup by Linux gamers for use in other distributions/environments. Wayland's Viewporter protocol is what normally exposes cropping/scaling capabilities for Wayland surfaces that can be used when a surface size doesn't match the frame-buffer size. Thus important for those wanting to run their games at lower, non-standard resolutions.


Joshua Ashton, who works for Valve on different Linux components from DXVK/VKD3D to Vulkan and other Linux graphics bits, made this latest XWayland addition. In the commit he summed up the -force-xrandr-emulation option as:
Adds a -force-xrandr-emulation cmdline switch that always exposes extra modes when viewporter isn't exposed by the Wayland compositor.

Having the additional modes exposed by the X server is important for games to function and be configured

Compositors, such as Gamescope (the compositor for Steam Deck), support only a single window that is rendered in the centre of the screen that is scaled up to fill the screen by the compositor based on some user scaling settings.

Exposing viewporter, wouldn't make sense here, and could mislead native Wayland clients, so exposing dummy modesets in X is preferred here.

The patch is queued into X.Org Server Git for the next XWayland standalone release -- and presumably picked up sooner by SteamOS for Steam Deck integration.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week