Wine Wayland Driver Prepares Display Mode Change Emulation

Written by Michael Larabel in WINE on 28 January 2024 at 10:08 AM EST. 203 Comments
WINE
Now being past the Wine 9.0 code freeze and the bi-weekly development releases back underway with eyes now set on Wine 10.0 next year, the 12th part of the Wine Wayland driver has been published for review. This latest set of Wine Wayland work is on implementing display mode change emulation.

Alexandros Frantzis continues leading work on the Wine Wayland driver and on Friday sent out the latest patches for enabling display mode change emulation. This support in turn is important for running Windows games on Wine under Wayland full-screen but running at a lower resolution. Frantzis explained in that merge request:
"This MR uses the existing compositor side surface scaling in the driver (through wp_viewporter, currently used for Hi-DPI scaling) to emulate display mode changes. This works wonderfully in coordination with fullscreen since the compositor is required non only to scale the surface, but also to position it properly and provide opaque surroundings (note: some compositors don't implement the last two features properly!).

Since: 1. Wayland doesn't allow clients to change the actual display configuration, and 2. there is no queryable service that holds the display information in a consistent manner (à la xrandr), the MR uses the win32 device settings as the source of truth for the current display mode. We let win32u handle the display mode change in the default manner (i.e., just updating the registry settings), and provide access to the current mode when updating the display devices through a new gdi_display_manager.get_adapter() function.
In order to be able to consistently (across all processes) associate an adapter device with its corresponding wl_output the MR introduces per-adapter driver data.

Note for people trying this out: many modern games don't change the hardware display settings, but rather scale themselves in right way to achieve the visual effect of a mode change (similarly to how this MR works, but they do it on the application side). To exercise most of the functionality in this MR you need an application that actually uses the ChangeDisplaySettings win32 API."

More details for those interested via this merge request that is now under review for mainlining soon to upstream Wine.

Wine Wayland Part 12 MR


It will be interesting to see how far along the Wine Wayland support comes this year and ideally there will be very solid native Wayland support by the time Wine 10.0 rolls out next January.
Related News
About The Author
Michael Larabel

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