Making the absolutely proprietary multiplayer mod work on Proton/Wine.
The Problem
Windows game mods aren't as straightforward on Linux, but luckily, it's only a matter of a few more steps in place of the usual process.
However, currently there is a bigger issue. Even though GTA Connected has "support for Windows XP and WINE"[gtaconnected.com], optimisations added to Proton/Wine over the years have caused issues getting it to work: namely, Fsync and Esync.
Related issue on GTA Connected issue tracker[bugs.gtaconnected.com]
Sadly, disabling these optimisations comes at a significant performance loss, however, it is required to make the mod playable as of the time of writing.
This guide goes over both the installation of GTA Connected itself and the workaround for the aforementioned issue.
Make sure to subscribe to the comment section of this guide and bookmark the issue page[bugs.gtaconnected.com] in order to know when the issue is fixed!
However, currently there is a bigger issue. Even though GTA Connected has "support for Windows XP and WINE"[gtaconnected.com], optimisations added to Proton/Wine over the years have caused issues getting it to work: namely, Fsync and Esync.
Related issue on GTA Connected issue tracker[bugs.gtaconnected.com]
Sadly, disabling these optimisations comes at a significant performance loss, however, it is required to make the mod playable as of the time of writing.
This guide goes over both the installation of GTA Connected itself and the workaround for the aforementioned issue.
Make sure to subscribe to the comment section of this guide and bookmark the issue page[bugs.gtaconnected.com] in order to know when the issue is fixed!
Setting up on Proton
- Download old binaries compatible with GTA Connected
- In your game library, right click the game > Manage > Browse local files
- Unpack the Retail directory from the downloaded archive into the game directory, as such (no files should be overwritten):GTAIV ├── GTAIV.exe (unmodified) ├── Retail │ ├── GTAIV.exe │ └── (other files) └── (other files)
- Install winetricks[wiki.winehq.org] and protontricks[github.com] to your system
- Desktop system: Use your package manager if the packages are available on the repos or use install instructions from linked pages
- SteamOS: Skip installing winetricks, use Flatpak-specific instructions[github.com] to install protontricks
- Desktop system: Use your package manager if the packages are available on the repos or use install instructions from linked pages
- Download the latest GTA Connected client installer from the download section[gtaconnected.com] of the official website
- Run the installer
- GUI method: Open a file manager, navigate to where the file was downloaded, then right click > Protontricks Launcher, and from the list, select Grand Theft Auto IV (12210)
- CLI method: Change directory to where the file was downloaded, then (adjust file name to the downloaded version):
protontricks-launch --appid 12210 GTAC-x.x.x.exe
- GUI method: Open a file manager, navigate to where the file was downloaded, then right click > Protontricks Launcher, and from the list, select Grand Theft Auto IV (12210)
- Either deselect "Run GTA Connected" in the installer, or close the client before proceeding
- Navigate here (replace <steam-library> with the path to the Steam library where the game is installed):
<steam-library>/steamapps/compatdata/12210/pfx/drive_c/users/steamuser/AppData/Local/Jack's Mini Network/Grand Theft Auto Connected - Set up a way to quickly launch GTA Connected
- Shortcut method: Create a shortcut of Launcher.exe, name it "GTA Connected", and replace the Command field with this (TODO: check if disabling Fsync and Esync works):
PROTON_NO_ESYNC=1 PROTON_NO_FSYNC=1 protontricks-launch --appid 12210 Launcher.exe - Shell script method: Make a script like this:#!/bin/sh # Path to the GTA Connected client cd "/path/to/Grand Theft Auto Connected" # Access violation workaround export PROTON_NO_ESYNC=1 export PROTON_NO_FSYNC=1 # Launching protontricks-launch --appid 12210 Launcher.exe
- Shortcut method: Create a shortcut of Launcher.exe, name it "GTA Connected", and replace the Command field with this (TODO: check if disabling Fsync and Esync works):
- Launch GTA Connected
- In the process of selecting your game executable, make sure to select GTAIV.exe stored in the Retail directory from earlier
- Play the game, hopefully it should work out of the box!
The Gist: Workaround Only
Provided that you already went through the procedure to install GTA Connected prior to reading the guide, and are greeted with the access violation error whenever you attempt to play on any server, all you need to know is that Fsync and Esync need to be disabled.
If you use Lutris, Bottles or another Wine prefix manager, there are most likely switches to disable Fsync and Esync you can use instead, however don't forget to toggle them back before playing the base game.
If you use Lutris, Bottles or another Wine prefix manager, there are most likely switches to disable Fsync and Esync you can use instead, however don't forget to toggle them back before playing the base game.
Wine environment variables
WINEFSYNC=0
WINEESYNC=0
Proton environment variables
PROTON_NO_FSYNC=1
PROTON_NO_ESYNC=1
Troubleshooting
Mods
GTA Connected has a form of anti-cheat that only allows whitelisted mods[wiki.gtaconnected.com]. This, unfortunately, means that even mods that fix the game won't work, most notably those that fix the memory-related issues.Launch arguments and commandline.txt not working
Note: This method does not work if GTA Connected client is restarted after an update. It must be started cleanly.Steam launch arguments won't work because protontricks assumes the program you are trying to run isn't the game itself.
On the other hand, commandline.txt is supposed to be read by the game, but if the game is launched through GTA Connected, it is ignored.
Instead, modify the shortcut/shell script you use to launch GTA Connected by appending the launch arguments to Launcher.exe. The launcher will forward these arguments to the game.
Example:
(...)-launch --appid 12210 Launcher.exe -availablevidmem 2452.0
The game reverts to safe mode
This is caused by the game's faulty VRAM check that breaks if the GPU selected by the game has over ~2 GB of VRAM. Even if the same launch arguments are used as the ones to make the base game work properly, if the detected number is over 2 GB, this procedure must be followed.Procedure for 1.0.8.0 (absolute value)
Use this argument:-availablevidmem 2452.0
Procedure for 1.0.7.0 (relative value)
- Take note of the VRAM amount detected by the game in the Graphics menu (the second number in the Resource Usage line)
- Divide 2452 with the number obtained from the previous step, only the first one or two decimals are enough
- Use this argument (replace X.X with the number from the previous step):
-availablevidmem X.X
The game freezes on launch
Whenever this happens, kill GTAIV.exe.Selecting Window mode under Tools > Game Settings... may make this freeze less likely to happen.
Attribution
Sources:
- arisu's discovery that Fsync and Esync have to be disabled
- Downgrading GTA IV to work on GTA Connected - GTA Connected Wiki[wiki.gtaconnected.com]