Proton icon indicating copy to clipboard operation
Proton copied to clipboard

Plans to enable a native wayland driver

Open gracicot opened this issue 4 years ago • 93 comments
trafficstars

Feature Request

I confirm:

  • [X] that I haven't found another request for this feature.
  • [X] that I have checked whether there are updates for my system available that contain this feature already.

Description

This issue is mainly to ping, so we can prepare for the future.

As some of you may know, there is a wayland display driver that is the work in wine. There's a recent report in the mailing lists that show the advancements made.

Proton should prepare for eventual compatibility with wayland.

XWayland is not a perfect solution. HDR won't be supported in X and won't benefit from the synchronisation features wayland exposes for low latency and reliability.

Justification

This is being introduced in wine. As far as I remember, Proton has its own display driver and will need to catch up feature-wise on wayland support to not lag behind once it hits stable releases.

Risks

The experimental driver being worked on could be flawed for games (even though super tux cart was showcased). This could impact proton as it needs to support gaming needs such as pointer capture, variable refresh rate (Freesync, GSync), raw input and more.

References

Video showcase of the recent progress of the wayland driver for wine

gracicot avatar Feb 19 '21 21:02 gracicot

An alternative Proton using Wayland would be excellent to test and get useful feedback, without jeopardize those who don't use Wayland yet.

Maybe this could also help in some way with Gamescope.

FurtadoPires avatar Feb 25 '21 00:02 FurtadoPires

https://github.com/varmd/wine-wayland/

romulasry avatar Mar 12 '21 05:03 romulasry

Wine Wayland support PR is in review step by step. Now there is part 2. https://gitlab.winehq.org/wine/wine/-/merge_requests/2476

CoelacanthusHex avatar Apr 19 '23 12:04 CoelacanthusHex

Onto phase 3 https://gitlab.winehq.org/wine/wine/-/merge_requests/2712

Kommynct avatar Apr 28 '23 08:04 Kommynct

part 4 https://gitlab.winehq.org/wine/wine/-/merge_requests/2944

Kommynct avatar Jun 04 '23 07:06 Kommynct

Part 10.3, vulkan only presentation https://gitlab.winehq.org/wine/wine/-/merge_requests/4522 And mouse look support https://gitlab.winehq.org/wine/wine/-/merge_requests/4593

Both of these appear to have landed for 9.0-rc1

This comment outlines the features still missing. https://gitlab.winehq.org/wine/wine/-/merge_requests/4522#note_54220

covers1624 avatar Dec 10 '23 15:12 covers1624

Could someone consider making a fork like Proton-ge for people that want to try it in the meantime but don't feel like Wine compiling from source? Could also be good for getting more people using the driver and finding bugs, I don't think it's ready to upstream though for sure but it seems it's at the point where it's usable for some games

nonetrix avatar Dec 11 '23 06:12 nonetrix

There isn't keyboard input yet, i'd wait until that's merged before people should even bother testing honestly.

Kommynct avatar Dec 11 '23 10:12 Kommynct

well already done just test it

bohanubis avatar Feb 05 '24 09:02 bohanubis

Proton 9 beta is already out and it seems to lack winewayland.drv at all. Why not turn it on? I understand that things like launchers are broken right now in wayland, it's not suitable for everyone, but still people want to test and play games in wayland native environment plus it might help nvidia users, just hide it under some PROTON_WAYLAND=1 variable.

SopaDeMacaco-UmaDelicia avatar Feb 24 '24 00:02 SopaDeMacaco-UmaDelicia

Proton 9 beta is already out and it seems to lack winewayland.drv at all.

Which is kinda sad. It’s the one feature I was looking forward to.

alterNERDtive avatar Feb 24 '24 01:02 alterNERDtive

I agree that it should at least be available to the user to enable if they want to. I've been testing Wine 9 with the Wayland driver for the past couple months, other than some quirks and issues with launchers and keyboard/mouse inputs, it works great for rendering and displaying games in a smooth manner. A PROTON_WAYLAND=1 variable like stated above would be great.

nokia8801 avatar Feb 24 '24 08:02 nokia8801

would absolutely love to see this added to proton 9, its a pain using tkg proton to use the wayland driver because you have to go into the registry editor for each game to enable wayland

zeak-z avatar Feb 25 '24 00:02 zeak-z

@zeak-z Are you building your own proton-tkg or using the ones available on proton-up qt

bohanubis avatar Feb 25 '24 18:02 bohanubis

This exists, I got it working with some registry edits. Seems fairly stable if the same launches with it, some don't and just crash or don't make a window, also no mouse input only keyboard or controller and cursor uses default GTK light theme. Oh yeah, and mangohud or the Steam FPS overlay doesn't work so I have no idea how well it's running, but seems the same as XWayland. Also I wouldn't report bugs upstream to Wine it's a month out of date now https://github.com/Melechtna/Proton-with-Wayland

nonetrix avatar Feb 25 '24 21:02 nonetrix

… why would I run some random person’s build when nothing works with it?

alterNERDtive avatar Feb 25 '24 22:02 alterNERDtive

@zeak-z Are you building your own proton-tkg or using the ones available on proton-up qt

proton-up qt, i just wish it didnt require registry editing each game...

zeak-z avatar Feb 26 '24 04:02 zeak-z

Has anyone suggested just making it a environment variable to up stream Wine?

nonetrix avatar Feb 26 '24 04:02 nonetrix

… why would I run some random person’s build when nothing works with it?

Because, it has Wayland support. Duh, I wasn't aware that proton-tkg had it enabled

nonetrix avatar Feb 26 '24 04:02 nonetrix

FWIW if anyone wants to build 9.0 you have to add the --with-wayland flag to the wine build config (the easy part), but you first need to build a custom proton SDK with libxkbregistry included and follow the steps here to add the lib to your runtime https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/main/docs/slr-for-game-developers.md#running-in-a-modified-platform-or-sdk-environment. Unfortunately I tested risk of rain 2 which ran fine but refused to use the mouse at all, and the CS2 workshop tools which failed on CSwapChainVulkan::CreateSwapChain->SDL_Vulkan_CreateSurface->vkCreateWin32SurfaceKHR but rendered the UI correctly besides the viewports.

PeakKS avatar Feb 26 '24 17:02 PeakKS

… why would I run some random person’s build when nothing works with it?

Because, it has Wayland support.

It has no working mouse. Like, wat.

alterNERDtive avatar Feb 26 '24 17:02 alterNERDtive

@alterNERDtive You're not being constructive. This repo IS the current state of wayland in proton. It's not in 9.0 because that's the current state of wayland in proton. If that doesn't work for you, don't use it and wait until it gets a more complete implementation. If you want to get involve, you can test it, identify the reasons why some things are not working and help. That repo is meant for development and testing, not for day to day use. When it's gonna be ready for day to day use, it's gonna be advertised as so.

gracicot avatar Feb 26 '24 20:02 gracicot

Wine Wayland has working mouse support.

alterNERDtive avatar Feb 26 '24 20:02 alterNERDtive

@alterNERDtive Maybe, but not proton. Wine is a different project. I opened this issue so we can discuss about the plans and the progress, not to ask "when is done?" or "why not done?". It's actually nice there exists a repo with a wayland implementation in progress. If you wish, I can ping you once wayland support is more to the beta level and ready to try, where some games gets actually playable. Other than that I would like to keep this discussion for constructive and helpful comments only. Thank you for understanding.

gracicot avatar Feb 26 '24 21:02 gracicot

Replying to https://github.com/ValveSoftware/Proton/issues/4638#issuecomment-1964659764

were did you get libxkbregistry? the steam runtime proton sdk seems to be based off a version of ubuntu / debian that does not have a version of libxkbregistry

TuxTheAstronaut avatar Feb 27 '24 21:02 TuxTheAstronaut

Replying to #4638 (comment)

were did you get libxkbregistry? the steam runtime proton sdk seems to be based off a version of ubuntu / debian that does not have a version of libxkbregistry

You have just have to add it to the SDK's dockerfile package installation list here: https://github.com/ValveSoftware/Proton/blob/1ef9a3674bae0e50ece8b8d074fc76ae94dacb82/docker/proton.Dockerfile.in#L54

Just add libxkbregistry-dev and libxkbregistry-dev:i386 to the list of packages there and build the SDK. Then when that is finished it can be used for compiling proton. Then to add the libraries to the runtime export the docker image and copy the libraries into the runtime.

PeakKS avatar Feb 28 '24 15:02 PeakKS

@PeakKS btw did you have to do modify anything for steam runtime on the local system? I can launch proton with wayland but if it runs inside the steam runtime then it can only use Xwayland same thing happens if i launch system wine inside steam runtime as well

TuxTheAstronaut avatar Mar 01 '24 06:03 TuxTheAstronaut

I would love to see experimental Wayland support (preferably behind an env var like PROTON_WAYLAND=1).

nVidia users could really benefit from this because nVidia is refusing to implement implicit sync.

I get that it's gonna be buggy but as long as it's locked behind an experimental option that shouldn't be an issue right?

CNR0706 avatar Mar 09 '24 15:03 CNR0706

The wayland features are included in wine 9.5. They seem to work pretty well for playing Star Citizen on Wayland with an Nvidia card.

ODeadlock avatar Mar 25 '24 20:03 ODeadlock

I would love to see experimental Wayland support (preferably behind an env var like PROTON_WAYLAND=1).

nVidia users could really benefit from this because nVidia is refusing to implement implicit sync.

I get that it's gonna be buggy but as long as it's locked behind an experimental option that shouldn't be an issue right?

I feel like Wine should have this upstream instead of just Proton, having to edit a registry file is rather annoying. I would prefer if I could just set something like that system wide, that would just leave Krita and Steam in XWayland I guess

nonetrix avatar Jun 11 '24 07:06 nonetrix