New distro new issues with wine launcher

Hey everyone, I previously had Zwift running fine on Ubuntu 18.04 using the wine launcher. I’ve upgraded to 20.04 on the same hardware but am having trouble getting things going.

I’ve yet to find anything useful in the logs or console output but my familiarity with wine and lutris is limited so it’s completely possible I’m not looking in the right places.

On trying to run the lutris install script, it prompts for and installs wine, mono and gecko. I see that the lutris yaml requires dotnet35sp1 win10 so I’m guessing mono and gecko are dependencies for dot net 3.5 sp1? I’ve tried several different versions of wine and mono in hopes of blind luck getting through this to no avail.

Any suggestions for troubleshooting would be welcome!

Try to contact the (script?) author here: https://zwiftinsider.com/zwift-on-linux/

I might give that a try if I get stuck. I figured I’d boot up the old 18.04 OS and compare to what I’ve got on 20.04 as well as poked around on Lutris some more to familiarise myself more with it.

So first thing, Lutris has a lot of wine management that I wasn’t familiar with and I think that me trying to do wine myself in the OS probably wasn’t having an effect on the Lutris managed wine that Zwift was using, seems that there’s a setting to have Lutris use the OS wine config but that wasn’t enabled for me.

With that in mind, the version of Lutris is the same 0.5.8 on both versions of the OS I’ve been using but wine was defaulting to 6.0 rc1 on my new install but 5.7.11 on my old setup. I used the lutris built in tools to install 5.7.11 on 20.04, skipped the mono install as I was thinking it may have been contributing to the issue but went ahead with gecko. Forcing the app to use 5.7.11 and installing dot net 3.5 sp1 I got an incompatibility warning when trying to start the launcher, the message suggested I needed version 4.something so I tried dot net 4 kb something, now I can start the launcher but trying to start the app still fails.

I’ll have to compare more to see what errors matter and what don’t, but getting the following now:

launcher
Running /home/matt/.local/share/lutris/runners/wine/lutris-5.7-11-x86_64/bin/wine /home/matt/Games/zwift/drive_c/Program Files (x86)/Zwift/ZwiftLauncher.exe
Initial process has started with pid 34034
Start monitoring process.
Crash Annotation GraphicsCriticalError: |[0][GFX1]: Potential driver version mismatch ignored due to missing DLLs 0.0.0.0 and 0.0.0.0 (t=55.2062) [GFX1]: Potential driver version mismatch ignored due to missing DLLs 0.0.0.0 and 0.0.0.0

app

DEBUG 2020-12-20 18:36:06,241 [command.start:132]:/usr/share/lutris/bin/lutris-wrapper Zwift 0 0 gamemoderun /home/matt/.local/share/lutris/runners/wine/lutris-5.7-11-x86_64/bin/wine /home/matt/Games/zwift/RunFromProcess.exe ZwiftLauncher.exe ZwiftApp.exe
Running gamemoderun /home/matt/.local/share/lutris/runners/wine/lutris-5.7-11-x86_64/bin/wine /home/matt/Games/zwift/RunFromProcess.exe ZwiftLauncher.exe ZwiftApp.exe
Initial process has started with pid 34260
Start monitoring process.
ERROR: ld.so: object ‘/usr/$LIB/libgamemodeauto.so.0’ from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object ‘/usr/$LIB/libgamemodeauto.so.0’ from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Monitored process exited.
Initial process has exited (return code: 65280)
All children have exited.
Exit with returncode 65280

Figured it out, it was using the 32 bit version of run from process when I needed the 64 bit version

Just setup a script to do the launch for me

#!/bin/bash


# Environment variables
export SDL_VIDEO_FULLSCREEN_DISPLAY="off"
export STEAM_RUNTIME="/home/matt/.local/share/lutris/runtime/steam"
export LD_LIBRARY_PATH="/home/matt/.local/share/lutris/runners/wine/lutris-5.7-11-x86_64/lib:/home/matt/.local/share/lutris/runners/wine/lutris-5.7-11-x86_64/lib64:/lib/i386-linux-gnu/sse2:/lib/i386-lin>
export WINEDEBUG="-all"
export WINEARCH="win64"
export WINE="/home/matt/.local/share/lutris/runners/wine/lutris-5.7-11-x86_64/bin/wine"
export WINEPREFIX="/home/matt/Games/zwift"
export WINEESYNC="0"
export WINEFSYNC="0"
export WINEDLLOVERRIDES="winemenubuilder.exe=d"
export WINE_LARGE_ADDRESS_AWARE="1"
export TERM="xterm"
# export WINEDEBUG="warn+all"

# Command
# gamemoderun /home/matt/.local/share/lutris/runners/wine/lutris-5.7-11-x86_64/bin/wine /home/matt/Games/zwift/RunFromProcess.exe ZwiftLauncher.exe ZwiftApp.exe
gamemoderun $WINE $WINEPREFIX/drive_c/Program\ Files\ \(x86\)/Zwift/ZwiftLauncher.exe &
sleep 30
gamemoderun $WINE $WINEPREFIX/RunFromProcess-x64.exe ZwiftLauncher.exe ZwiftApp.exe

The sleep 30 is crude, but it works. I’ve set it high to allow for updates that the launcher retrieves. Uncomment the winedebug variable if you want really really verbose logging ha! Way too verbose, but maybe it’ll come in handy someday.

Anyways, the way to launch before was:

  1. Launch lutris
  2. select game
  3. on the wine menu, select run exe in wine prefix
  4. navigate through the directories and pick the launcher
  5. wait for it to launch
  6. run the game

now, it’s just:

  1. run the script

sorry, script above has one long line cut off

I should mention that to generate the script, one can use the following to get started to avoid setting up for your env from scratch manually

lutris zwift-windows --output-script zwiftTest.sh

once that generates, just modify as required

If you don’t want to type your password each time, here’s what I’ve added to my startup script:

credentials='zwiftCreds'
sed -n '2,$p' <"$credentials" | awk '{printf $0}' | xclip -selection c

Basically, throw your credentials into a file named zwiftCreds, username on line one, pw on line two, then chmod 400. Install xclip if you don’t have it and when you run the script, all you have to do is hit ctrl+v to paste into the pw prompt (email seems to be remembered just fine by zwift)

Make sure you understand the risks of storing a password in plain text, the risk of having it on the clipboard, how to restrict access to the file etc. For me, this unique (only for this game login), strong password being stored locally in plain text was an acceptable tradeoff for the convenience.