We're hiring!
*

A Wayland driver for Wine

Alexandros Frantzis avatar

Alexandros Frantzis
December 15, 2020

Share this post:

Wine is a compatibility layer capable of running Windows applications on Linux, MacOS and other systems. It's been developed and used for over two decades and it's also what Steam Proton uses under the hood to enable Windows games to run on Linux systems.

On Linux systems Wine currently uses its X11 driver to interface with the X11 display server. In many modern systems, where Wayland has become the display server protocol of choice, another layer is needed to translate between X11 and Wayland. This comes in the form of a special X11 server called XWayland.

This setup works but the extra dependency on X11/XWayland is a source of complexity and possible inefficiencies. It would be ideal if Wine could talk directly to Wayland to enable a leaner and more efficient stack on modern systems.

After several months of work, we are excited to announce a first proposal for a Wayland driver for Wine. At this point the proposal is in the form of an RFC (Request For Comment), in order to explore how to best move forward with the upstreaming and further development of the driver.

The Wayland protocol is by design more constrained compared to more traditional display systems like X11 and win32, which brings a unique sets of challenges in the integration of Wayland with Wine. Since Wayland's window model is not based on a single flat 2D co-ordinate space, as X11's was, the Wayland protocol doesn't allow apps to control their absolute position on the screen. Win32 applications heavily rely on this feature, so the Wayland driver uses a few tricks to accommodate many common cases, like transient windows (menus, tooltips etc).

The Wayland driver currently supports GDI and OpenGL/DirectX applications, with resize and window state handling (except minimizing), mouse and QWERTY keyboard input, and a single monitor. This already gives us access to a large pool of apps. Some applications that I have tried and already work well are Firefox, Stellarium, Supertuxkart, 010Editor, Battle For Wesnoth and GIMP (with some caveats).

Vulkan is not currently supported but there is already another project at https://github.com/varmd/wine-wayland/ that focuses solely on Wine Wayland+Vulkan. We hope that as the driver matures and moves to upstream, we will be able to consolidate all further development efforts.

For people that want to play with the Wayland driver, the wine-devel RFC announcement provides some more instructions and technical details.

If you are curious about what things look like here is a video showcasing a few Windows applications running with the Wine Wayland driver on the Weston reference Wayland compositor:

Enjoy!

 

Comments (2)

  1. Henrik Harmsen:
    Dec 27, 2020 at 07:58 PM

    So, I guess this will finally allow accelerated Windows games in Wayland with Wine/proton with Nvidia cards (EGLstreams)?

    Reply to this comment

    Reply to this comment


Add a Comment






Allowed tags: <b><i><br>Add a new comment:


 

Search the newsroom

Latest News & Events

PanVk: An Open Source Vulkan driver for Arm Mali Midgard and Bifrost GPUs

25/03/2021

The Panfrost project started as a reverse engineering effort to understand Arm Mali Midgard and Bifrost GPU internals. With the driver getting…

Linaro Virtual Connect - Spring 2021

22/03/2021

Join us this week at the Spring edition of Linaro Virtual Connect, as we discuss bringing stateless video decoding support to Linux, and…

OpenGL on DirectX: Conformance & upstreaming of the D3D12 driver

10/03/2021

One year ago, we announced a new partnership with Microsoft to build OpenGL mapping layers to DirectX 12. Today, we're excited to share…

Open Since 2005 logo

We use cookies on this website to ensure that you get the best experience. By continuing to use this website you are consenting to the use of these cookies. To find out more please follow this link.

Collabora Ltd © 2005-2021. All rights reserved. Privacy Notice. Sitemap.

Collabora Limited is registered in England and Wales. Company Registration number: 5513718. Registered office: The Platinum Building, St John's Innovation Park, Cambridge, CB4 0DS, United Kingdom. VAT number: 874 1630 19.