Proton icon indicating copy to clipboard operation
Proton copied to clipboard

Trackmania Turbo (375900)

Open jolty1 opened this issue 2 years ago • 3 comments

Compatibility Report

  • Name of the game with compatibility issues: Trackmania Turbo
  • Steam AppID of the game: 375900

System Information

  • GPU: RX 6800 XT
  • Driver/LLVM version: Mesa 22.3.3
  • Kernel version: 6.1.0-6-amd64 (64-bit)
  • Link to full system information report as Gist:
  • Proton version: Experimental

I confirm:

  • [X] that I haven't found an existing compatibility report for this game.
  • [X] that I have checked whether there are updates for my system available.

Symptoms

The game comes with an old version of Uplay Launcher that can not connect to Ubisoft servers to self update.

Screenshot_20230322_235937

Reproduction

Launch the game on steam.

Workaround

Copy-in the newer Ubisoft Connect Launcher from Trackmania 2020 from its proton prefix.

Install Trackmania 2020 on Steam, Launch it and Sign into Ubisoft connect. Quit both game and launcher.

Copy ~/.steam/root/steamapps/compatdata/2225070/pfx/drive_c/Program Files (x86)/Ubisoft

Paste ~/.steam/root/steamapps/compatdata/375900/pfx/drive_c/Program Files (x86)/Ubisoft

Write into and replace files.

Game will launch as normal.

Screenshot_20230323_002130

jolty1 avatar Mar 23 '23 00:03 jolty1

Better solution.

Download the latest Ubisoft connect launcher setup file. Save to

~/.steam/root/steamapps/common/Trackmania Turbo/InstallerResources/UbisoftConnectInstaller.exe

Verify integrity of game files from Steam. (So the install script resets)

Edit the install script with text edit

~/.steam/root/steamapps/common/Trackmania Turbo/nstall.vdf

Edit the line from

"process 1" "%INSTALLDIR%\\InstallerResources\\UplayInstaller.exe"

To

"process 1" "%INSTALLDIR%\\InstallerResources\\UbisoftConnectInstaller.exe"

Save and Launch the game.

jolty1 avatar Apr 20 '23 16:04 jolty1

There's an easier (in the sense that it doesn't require copying files around and editinng install scripts) workaround if you install protontricks via flathub:

  1. Launch protontricks
  2. Select TM Turbo (for some reason it takes 20-30s for me until proton-/winetricks reopens with the correct wine prefix selected)
  3. Select "Install an Application"
  4. Select Ubisoft Connect. Follow the install instructions.

If this pre-packaged ubisoft connect install script should stop working at some point you can also download the latest installer and run it manually inside the TM turbo wineprefix via protontricks.

For step 3. select "Select the default wine prefix" instead. Then 4. Select "Run Uninstaller" (Yeah, Uninstaller even though it also installs stuff...) 5. In the top select "Install" 6. Select the UbisoftConnect installer you just downloaded. Follow the install instructions.

Done. (Whichever way you followed).

Bubu avatar Dec 12 '23 17:12 Bubu

Replying to https://github.com/ValveSoftware/Proton/issues/6637#issuecomment-1516617239

You can also simply rename the downloaded EXE file to UplayInstaller.exe and replace the old one and voilà. No need to modify a text file at all.

  1. download
  2. rename
  3. replace

thamulot avatar Oct 16 '24 02:10 thamulot

Does the OpenPlanet UI work for anyone? OpenPlanet plugins themselves work and take effect (i.e. EnableVR plugin) but they are not able to cause any UI effects.

https://github.com/openplanet-nl/issues/issues/609

Atemu avatar Dec 12 '24 03:12 Atemu

@daih27 figured out that this worked in GE-Proton9-7 stopped working in GE-Proton9-8 which corresponds to https://github.com/ValveSoftware/wine/commit/824ccfa43f05bf7eeb39bccaec91b464bc2614e7 vs. https://github.com/ValveSoftware/wine/commit/3e1c699fdcca554f01d3b7d4db7c25f41c18691d. (https://github.com/ValveSoftware/wine/compare/3e1c699fdcca554f01d3b7d4db7c25f41c18691d...824ccfa43f05bf7eeb39bccaec91b464bc2614e7)

This is looking a lot like a Proton/WINE regression though it could also be DXVK between https://github.com/doitsujin/dxvk/commit/fd978704fb75cb965fee32c7e15b167e490f848b and https://github.com/doitsujin/dxvk/commit/afbcd945691f11136a19fb9f2d323f0e7bf0d758.

I'll see to get Proton-GE aswell as regular Proton compiled to bisect this range but no promises as to when I'll be able to try that.

What's also super important to know is that this game is 32bit. OpenPlanet works just fine in TM² and TrackMania 2020 which are both 64bit. If anyone remembers any changes that happened between May and June that could influence d3d overlays on 32bit somehow or can spot a suspicious commit in the linked range, please speak up.

Atemu avatar Dec 13 '24 01:12 Atemu

It works in Proton 9.0-1, bisecting...

Atemu avatar Dec 14 '24 02:12 Atemu

6c7cba9aebeb769aa5eaa895a06b61862d837195 is the culprit which is a WINE bump, bisecting WINE...

Atemu avatar Dec 14 '24 03:12 Atemu

It's https://github.com/ValveSoftware/wine/commit/d9e2631cfd11ef2a11a964183d45847625be575d.

cc @julliard could you verify that your change is correct for 32bit processes?

Atemu avatar Dec 14 '24 03:12 Atemu

The OpenPlanet developer has graciously found a fix but notes that it shouldn't be necessary in theory (and wasn't before https://github.com/ValveSoftware/wine/commit/d9e2631cfd11ef2a11a964183d45847625be575d).

Relaying what she said:

I believe this is a problem with Wine (using WriteProcessMemory on 32 bit builds w/o first calling VirtualProtectEx to make it writable has historically always worked). I'm not sure what the exact problem is; old protection of the memory we are writing is PAGE_EXECUTE_READ, so the linked commit should in theory work.

We were calling VirtualProtectEx on 64 bit builds, but not 32. As an experiment, I've now changed this to also happen on 32 bit builds. This might solve the problem.

Will be in the next edge build for Turbo. When that comes out (later today), let me know if that fixes it. Also, might be worth passing this information off to the Valve Wine folks.

Atemu avatar Dec 20 '24 13:12 Atemu

@Atemu We are trying to look into this regression but we aren't active Trackmania Turbo players ... would you mind giving some step-by-step instructions on how to reproduce the regression in OpenPlanet UI that you are seeing? I'm not personally familiar with OpenPlanet UI at all ... Also - thank you for bisecting and being so proactive!

alasky17 avatar Dec 20 '24 17:12 alasky17

Thanks for looking into this :)

If OpenPlanet is installed (just run the installer in the prefix and provide it the game install location), pressing F3 in the game should bring up a bar at the top that looks like this:

https://openplanet.dev/docs/tutorials/overlay

In current Proton, it just doesn't show up at all. It's super easy to tell.

Atemu avatar Dec 20 '24 18:12 Atemu

Replying to https://github.com/ValveSoftware/Proton/issues/6637#issuecomment-1852468171

Thanks for this

ceclandumitru avatar Dec 23 '24 13:12 ceclandumitru

@Atemu I cannot seem to get the overlay to open with Proton 9.0-1... I think I have Openplanet installed correctly... I used WINEPREFIX=/path/to/Trackmania Turbo/prefix path/to/wine ./OpenplanetTurbo_1.24.2.exe and I got the installer pop-up. I selected the common/Trackmania Turbo folder, and I can see several Openplanet things in my common/Trackmania Turbo folder now. However, when I launch the game to the main menu (Trackbuilder, Online Racing, Campaign, etc options are visible) and hit F3, nothing happens. This is with Proton 9.0-1. Am I missing something obvious here?

alasky17 avatar Dec 23 '24 19:12 alasky17

@alasky17 That was the issue initially. You have to use the edge version of Openplanet: https://openplanet.dev/download/turbo/edge, as the main developer from Openplanet fixed it.

The original issue in case you want to read it: https://github.com/openplanet-nl/issues/issues/609.

Installing the edge version should allow you to show the Openplanet UI when pressing F3.

daih27 avatar Dec 23 '24 20:12 daih27

9.0-1 should work though.

I question whether you actually have that exact version though as it's not trivially accessible through steam. Only 9.0-4 is selectable.

Atemu avatar Dec 23 '24 22:12 Atemu

@Atemu I appreciate your skepticism -- I happen to have access to every Proton version including all the old ones, so I'm confident that I am testing 9.0-1 but yes, it is no longer publically available. I can try the fixed version of Openplanet, but I suspect that I'm doing something generally wrong ... based on your instructions I cannot figure out what yet - any ideas or suggestions are welcome :) I haven't tried on Windows yet and I'm hoping that might give me some additional insight into what I'm doing wrong ...

alasky17 avatar Dec 24 '24 18:12 alasky17

I'd highly recommend you use protontricks because that's generally easiest and what I used.

Atemu avatar Dec 24 '24 20:12 Atemu

@Atemu Were you using protontricks for any steps aside from getting the correct Ubisoft Connect version installed? That was the only step where I saw protontricks mentioned in the discussion above.

alasky17 avatar Jan 02 '25 14:01 alasky17

I used protontricks to install Ubishit Connect and OpenPlanet.

When installing OpenPlanet, you must select the game installation dir where the exe is.

Also ensure you've allowed OpenPlanet to hook the exe via dinput8.dll as documented on their site.

Atemu avatar Jan 02 '25 14:01 Atemu

@Atemu After some additional searching, I finally think I figured out what you are talking about - I'm assuming you are referring to the instructions here: https://openplanet.dev/docs/help/linux. Testing with Proton 9.0-1, I tried setting dinput8=n,b in the launch options (as suggested there) and using winecfg, and neither did the trick -- I know I'm using the right command because this same trick worked for Trackmania, see below. I also tried to install vcrun2019 with protontricks and that didn't help (again, assuming this is where you used protontricks?). I also tried the new OpenPlanet version 1.27.5 which I believe you reported fixes the problem(?) and still couldn't get the overlay to open. I tried installing openplanet by adding the exe as a non-steam game (as I saw recommended on protondb), which was easier in my opinion but still didn't change anything.

I used the same steps (just dinput8=n,b and the correct OpenPlanet exe) and I managed to get OpenPlanet working with Trackmania, but not Trackmania Turbo. So at least I know my F3 key works... I also tried OpenPlanet+Trackmania Turbo on Windows and got it to work, so I know I'm downloading the right thing, putting it in the right place, etc.

Unfortunately, it is very hard to investigate a problem like this without local reproduction (which is why I've been trying to hard to reproduce this issue). I have a few suggestions if you have time - a) writing out steps on exactly how you got openplanet+trackmania turbo working or b) uploading your working prefix somewhere.

alasky17 avatar Jan 03 '25 00:01 alasky17

I also tried to install vcrun2019

Totally forgot about that bit. You need vcruntime.

Make sure you've installed the 32bit version though as the game (and therefore OpenPlanet) is 32bit! I used the M$ installer as the OpenPlanet docs recommend rather than Protontricks but it probably does the same internally but I don't know which bitnesses it installs.

I can absolutely understand your difficulty in reproducing this; it was more involved than I remember. I'll try to actually perform a repro from scratch that you could follow. I've been meaning to set up TM Turbo on my SD anyways.

Atemu avatar Jan 03 '25 00:01 Atemu

@Atemu Thank you! FWIW I did check and protontricks had installed both the 32-bit and 64-bit versions of vcruntime, but I did also give up on that repeating that step with every new repro attempt because I wasn't getting anywhere and I was also dealing with some really annoying mismatched versions between protontricks (I originally had a very old version from the AUR and it was a pain to update) and all the proton versions I was testing. It is possible I had almost the right combination and gave up on vcruntime too soon ... I'm hoping to just wait for your instructions though since you already did this successfully once -- thank you in advance!

Also FWIW - I did check and I had the 32-bit version of dinput8.dll in my common/Trackmania Turbo folder. Trackmania of course had the 64-bit version that came with the other OpenPlanet version. I learned that override is definitely required (as you said) from messing with Trackmania.

alasky17 avatar Jan 03 '25 01:01 alasky17

I haven't been able to get openplanet running either. After installing ubisoft connect and openplanet I saw in the log that openplanet was failing to load, given that the actual error code doesn't seem to be documented, I went with the common troubleshooting step of installing vcrun, having installed vcrun2015, 17,19 and 22 (separately, not concurrently). I found that all of them ended up failing with error code 998, installation included the 32 bit version as well.

simifor avatar Jan 03 '25 18:01 simifor