netbrain / zwift

Easily zwift on linux
The Unlicense
286 stars 32 forks source link

Wayland Wine 9 does not work #118

Closed sHedC closed 5 months ago

sHedC commented 6 months ago

Describe the bug Wayland in Wine 9 does not display, it actually does not work but after small fix gives a message saying screen not big enough. Fixing that just brings up a white box (but notepad works).

To Reproduce Enable wayland expermimental

netbrain commented 6 months ago

To be clear, this is an issue is regarding the experimental wayland support in wine 9?

sHedC commented 6 months ago

Yes

sHedC commented 6 months ago

I can run wine notepad and explorer etc using Wayland, however with Zwift it is looking for capabilities of OpenGL and reporting it needs OpenGL 3.1 or higher.

Wine 9 is reporting a later Open GL so its down to capablities, I have seen that connecting to a TV or certain cards can cause this issue so it checking things like screen size etc.

Any ideas of what reg overrides or dll overrides that would allow for changing the reported capabilities?

netbrain commented 6 months ago

Well zwift is developed partly atleast using c#, so if c# is asking for capabilities. then you might find some dev docs on the topic in order to track down which dll is responsible for this.

In any case we could probably use a good reverse engineer who could look at the binary and see what's going on under the hood prior to the error message.

sHedC commented 6 months ago

After research, it seems OpenGL is not fullly implemented in the Wayland Wine its being worked on for this year, will follow it.

sHedC commented 6 months ago

Yes so Wine 9.4 has initial OpenGL for Wayland.

Bundled vkd3d upgraded to version 1.11. Initial OpenGL support in the Wayland driver. Support for elevating process privileges. More HID pointer improvements. Various bug fixes.

netbrain commented 6 months ago

I guess we should try to upgrade to wine 9.4 then.

On Wed, May 22, 2024, 21:26 Richard Holmes @.***> wrote:

Yes so Wine 9.4 has initial OpenGL for Wayland.

Bundled vkd3d upgraded to version 1.11. Initial OpenGL support in the Wayland driver. Support for elevating process privileges. More HID pointer improvements. Various bug fixes.

— Reply to this email directly, view it on GitHub https://github.com/netbrain/zwift/issues/118#issuecomment-2125590715, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACTNCZRK3DSDRCR3C672ODZDTWNHAVCNFSM6AAAAABHUBWMTCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRVGU4TANZRGU . You are receiving this because you commented.Message ID: @.***>

sHedC commented 6 months ago

Trying to wine 9.9 but getting vulkan3d errors.

sHedC commented 6 months ago

Wine 9.9 is still devel but managed to get it to work (once) having issues with setup.

Bascially we need an additional item d3dcompiler_47

However I could only get everything to install if I did it all manually, I will try once then note in the doc and submit my work, but something wrong with these lines that causes the updater to fail.

    # install zwift
    wget https://cdn.zwift.com/app/ZwiftSetup.exe
    wine ZwiftSetup.exe /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /NOCANCEL

    #wine ZwiftLauncher.exe SilentLaunch
    wine ZwiftLauncher.exe SilentLaunch

if I manually run

wine ZwiftSetup.exe
wine ZwiftLauncher.exe

It updates then I can continue and build the container.

So something to do with the settings as automated if does not do anything, weird, just final test then will note int he update_zwift.sh file and submit changes so you are able to see.

sHedC commented 6 months ago

Ok update, didn't spend a lot of time but build time takes ages about 99% of it, to get this to work.

WINE_BRANCH="devel" - I made the update use the WINE_BRANCH Environment Variable and devel is 9.9. Issue was that for some reason to get this working you need to put it in quotes (something to do with the keyword stable)

WINE_MONO_VERSION=9.1.0 - Or it tries to install it anyway

For the Build I needed to include d3dcompiler_47 or you get shader crashes.

Also for some reason had to sleep for 5 seconds between the ZwiftSetup and the Check for updates otherwise it just stopped the installer, but now it displays a nice bar.

I think this should be changed back to stable branch for wine and hopfully keep latest mono, then just wait (can always put WINE_BRANCH as an environment varialble for build with default as stable.

Anyway checked it into branch 118 so you can try but works with both docker and podman on my build :)

netbrain commented 6 months ago

I'll take a look at it soon.

sHedC commented 6 months ago

Have been using the wayland with wine 9.9 build for my training (only 45 min or so a time) but seems stable. I have locked the docker build to wine 9.9, allows testing when they release new items.

But it seems to work well with X and Wayland.

netbrain commented 5 months ago

Great news! Are you working on a PR for this?

sHedC commented 5 months ago

yes as soon as you want me to, its currently in branch sHedC/issue118.

Also fixed the icon when using the desktop push and couple of other minor things.

sHedC commented 5 months ago

PR Created