Collaborate has been working for months on the development of a driver that allows Wine work natively in Wayland, a goal that is unlikely to be achieved by seeing Alexandre Julliard’s skepticism.
Wayland is a graphical protocol that promises to root out Xorg’s unsolvable problems like security and tearing, in addition to providing a simplification of the graphic stack that is already leading to lower energy consumption. However, it has the disadvantage of being difficult to implement, an obstacle that is the second time that Wine has tried to overcome.
Yes, you read correctly. The Collabora initiative is the second attempt to provide Wine with native Wayland support. Alexandre Julliard, Head of Wine and a senior person at CodeWeavers, said he started writing a driver years ago, but its development stalled when it happened. “Realized that there was essentially no way to do decent window management, and that the best we could do would be the equivalent of X11 desktop mode, where we manage the windows ourselves. I do not have the impression that the situation has improved in all that time, nor that there is interest in improving it “.
But Julliard’s skepticism hasn’t discouraged Collabora, which has continued with its work. According to the company responsible for the online implementation of LibreOffice, both the functionality and the stability of the Wayland driver for Wine have been greatly improved, being able to withstand, although possibly not cleanly, the following:
- Handling the window state: resizing, maximizing, minimizing (although there is often no proper minimized window content), and full screen.
- OpenGL and Vulkan (including the use of WineD3D and DXVK).
- Display mode changes (emulated with Wayland’s composer scale, rather than actual display hardware mode changes).
- Multiple monitor support.
- Mouse capture / cropping / relative movement (but keep in mind that Wayland composers tend not to handle non-full screen cases very well).
- Pop-ups, menus, and other transient windows (except in cross-processes).
- Keymaps configured and updated from the Wayland composer should work seamlessly.
- HiDPI scaling (configurable to use the app’s composer scale / Wine or Wayland’s).
- Copy and paste both ways, allowing drag and drop in the direction from native Wayland to Wine.
- Support for the system tray (minus the position of the context menu).
There is currently an open issue related to cross-process rendering, which is particularly relevant for Chromium-based applications. In Collabora they have some ideas on the table to solve this in the coming months, a detail that indicates that we will have to continue to have patience to see the Wayland support enabled by default in Wine.
Not only does the Wayland driver for Wine have to work, but, if it wants to be an official feature, has to meet certain requirements imposed by the project leaders, the most important being the fact that cannot be tied to any specific composer.
What would Wayland’s native support for Wine bring to Proton?
Proton has been a boon for Wine, as the use of Windows API reimplementation has declined due to the proliferation of cross-platform applications. Proton, in addition to putting Wine back at the center, has become the great powerhouse of Linux Gaming.
About the contribution of the Wayland support, it would be more noticeable in the eye than in the rate of images per second. The purposes of Wayland are to reduce latencies and offer better technologies for the display of graphics, so users should perceive a smoother and cleaner experience with the image projected by the monitor.
No, on paper Wayland would not contribute to improving game performance, although in the end it may do provide some improvement as a collateral consequence of the stack it proposes for displaying the graphics, which is simpler than the one used through Xorg.
On the other hand, we can find the paradox of seeing the old 2001 Max Payne running natively on Wayland and old native Linux video games running on XWayland. We leave you with the Collabora video that shows the current state of the Wayland driver for Wine.