Grand Theft Auto V Version originale

Grand Theft Auto V Version originale

25 évaluations
GTA5 and Debian GNU/Linux using Proton/steamplay
De celkaris
How to get GTA5 running flawlessly under Debian GNU/Linux operating system using steam's wine implementation ("proton" / "steamplay").
   
Récompenser
Ajouter aux favoris
Favoris
Retirer des favoris
warning
expect no support from anyone when using this method.
proton 4.11-X note
using proton 4.11-8 none of the commands below are needed anymore :
1. enable steamplay,
2. install the game and hit play ; launcher may crash once in a while, but game runs just fine after that.

I keep the original content below, just in case..
preface
Today, lots of game developers are taking the most illogical path when implementing their games, first implementing their game using the less portable, most specific operating system and toolset (window$ and directX), later trying to port it to a greater amount of platforms (and failing).

While it's actually easier to port code developed on any POSIX-compliant system (actually following posix standards that is) to those specific isolated operating systems and tools, game developers are still focussing on the window$ platform.

Fortunately, 25 years ago (1993) the wine project was started, as an easy way to run windows applications on GNU/Linux operating systems.

Ever since, individual developers from all around the world contributed to the project, leading to a solution that actually works quite well nowadays.


In 2010 Valve announced the upcoming "steamplay" feature, allowing (but not only) GNU/Linux users to run native windows games.

Combined with vulkan&dxvk, most recent directx games are now usable while running a GNU/Linux operating system.

GTA5 now runs flawlessly using our favorite kernel & operating system, thanks to wine ("proton"/steamplay), vulkan & dxvk.



I've been using Unix & GNU/Linux operating systems for a long time now (starting with slackware in late 1993 i think, RedHat 5+&6+, Debian, Gentoo, Solaris, NetBSD, OpenBSD, ...), but i frequently kept a window$ installation at hand, to run a few games unavailable on my favorite platform ; you probably kept one at hand too for the same reason (gaming).

A few months ago i finally got entirely rid of that crappy operating system taking ages to execute any simple action, wasting hundreds of megabytes of RAM (if not GigaBytes) killing your harddrives with constant activity while not running a single service, asking for reboot on simple tasks really not needing any reboot at all, phoning home every now and then, sending personal informations to m$, looking for that hidden simple option i wanted to toggle, clicking hundreds of times to finally find it .. you know what i'm talking about.

I got many recent video games running under my Debian GNU/Linux operating system (yes, i became lazy and don't run source distributions anymore), including that great Grand Theft Auto 5 game.

Although it works quite well, i must be honest, it's not yet that simple to get it working, but thanks to dxvk, vulkan and really involved companies such as Nvidia (integrating most recent vulkan implementations in their drivers rapidly) it gets better every week.

In this guide i'll give instructions on how to get it running, unfortunately this guide can't be seen as a comprehensive guide covering any GNU/Linux operating system / distribution ; i'll be focussing on current (stretch / 9.6) Debian GNU/Linux operating system.

Not using AMD graphics cards anymore, i'll focus on nvidia graphics cards.
Major requirement - recent video driver
Vulkan API being actively implemented by graphics cards manufacturers, USING a RECENT videocard driver is an ABSOLUTE REQUIREMENT for GTA5 to actually work properly.

I wasted quite a long time trying to get it running because of the old nvidia drivers i was using, because of two unimplemented extensions.

Using the debian distribution (i already hear you laugh), i obviously can't use my package manager to install the most recent drivers for my operating system (the driver i'm now using was released 3 days ago, on nov. 28th 2018), so i had to uninstall my current nvidia drivers and tools previously installed using my package manager then install the latest nvidia beta drivers (415.18.02 version, that is) :

first obtain list of packages to uninstall ("just in case" you need it later) :
# i was previously using nvidia driver, tools + libs in 384.130-1 version dpkg -l '*nvidia*'|grep ^ii | grep 384.130 | tee $HOME/nvidia-uninstalled.txt

Uninstall those packages using your package manager (i used dpkg and awk, but you can use any method you want).

Then install nvidia beta drivers, downloaded from following url ("Developer Beta Driver Downloads" section) :
https://developer.nvidia.com/vulkan-driver

i personally used "NVIDIA-Linux-x86_64-415.18.02.run"


you may need to enable the "non-free" debian repository :
deb http://ftp.debian.org/debian/ stretch main contrib non-free

Install vulkan library and utils :
apt-get install libvulkan1 libvulkan1:i386 mesa-vulkan-drivers vulkan-utils




If you can't manage to get recent graphics drivers, don't bother continuing, it's an absolute requirement.
winetricks setup
we'll use winetricks to install a few libraries into GTA5 wine/proton prefix, including dxvk.

We'll use the "winetricks" package provided by the debian foundation in current Debian stable (stretch) release, from stretch/contrib repository :

Ensure you enabled the debian "contrib" repository :

# /etc/apt/sources.list # or # /etc/apt/sources.list.d/whatever.list # note: you should use a local mirror instead of ftp.debian.org deb http://ftp.debian.org/debian/ stretch main contrib non-free

then install winetricks :

apt-get update && apt-get -y install winetricks

check installation :

$ winetricks --version 20170101 - sha1sum: c844fda0cca25ac9ed0ed1b55cd138cab6a4af16
obtain GTA5 appId
We'll need GTA5 steam's appId and gta5 install directory.

Steam creates a unique wine PREFIX per installed game, associated to the game's "appid" identifier.

Obtain GTA5 appid :
The easiest way to obtain this identifier is by visiting the GTA5 store page, it's URL including the appid we need :

https://store.steampowered.com/app/271590/Grand_Theft_Auto_V/

GTA5's appid is : 271590


obtain GTA5 proton prefix directory
Because everyone's setup may differ, i can't point you to a unique WINEPREFIX directory (i personally use a different steam library for some games, using lvm2 on top of my raid array for example).

If you did not mess around with steam library dirs, your GTA5 install dir and gta5 WINEPREFIX should reside under the following path :

$HOME/.steam/steam/steamapps/....

In the following steps, we'll consider you're using the previous path.

steam WINEPREFIX for gta5 becomes :

$HOME/.steam/steam/steamapps/compatdata/271590/pfx

Ensure this directory actually exists :
# fist hit the "Play" button on your gta5 steam library page # to eventually create this WINEPREFIX directory structure. # (use your own gta5 WINEPREFIX directory of course) [ -d "$HOME/.steam/steam/steamapps/compatdata/271590/pfx" ] && echo "good" good

Do not continue until the previous command echoes "good"

We'll now refer to this directory ("$HOME/.steam/steam/steamapps/compatdata/271590/pfx") as gta5 WINEPREFIX
steamplay activation
Before continuing, we need to enable the "steamplay" feature in steam client settings :

In the steam client, hit Steam / Settings / Steamplay and check following checkboxes :
- "Enable Steam Play for supported titles" (checked)
- "Enable Steam Play for all titles" (checked)
- "Use this tool instead of game-specific selections from Steam" (checked)

- Compatibility tool : choose "Proton 3.16-4 Beta" (or later)

your settings should look like this :



Restart the steam client.

Upon restart, it should download some files, associated to GTA5 in the download manager.

Once download finishes, hit gta5 play button. It won't work right now but it should create the proper directory structure (WINEPREFIX) if not already created.
dxvk setup
dxvk : "Vulkan-based D3D11 and D3D10 implementation for Linux / Wine"

We'll tell steam to use dxvk by "injecting" modified DLL library files into gta5 wine/proton prefix, later also pointing to a dxvk configuration file to use when starting GTA5 using steam.

For simplicity, we'll put our local dxvk installation under the following directory : $HOME/downloads/games/gta5/ :

mkdir -p $HOME/downloads/games/gta5/

Download latest dxvk release from https://github.com/doitsujin/dxvk/releases : download latest tarball

I personally used https://github.com/doitsujin/dxvk/releases/download/v0.93/dxvk-0.93.tar.gz

Extract dxvk release tarball content under the directory you created :
cd $HOME/downloads/games/gta5/ wget https://github.com/doitsujin/dxvk/releases/download/v0.93/dxvk-0.93.tar.gz tar zxvf dxvk-0.93.tar.gz

You should have the following directory structure & content :
$ find $HOME/downloads/games/gta5/dxvk-0.93 /home/yourusername/downloads/games/gta5/dxvk-0.93 /home/yourusername/downloads/games/gta5/dxvk-0.93/x64 /home/yourusername/downloads/games/gta5/dxvk-0.93/x64/d3d10_1.dll /home/yourusername/downloads/games/gta5/dxvk-0.93/x64/d3d10core.dll /home/yourusername/downloads/games/gta5/dxvk-0.93/x64/dxgi.dll /home/yourusername/downloads/games/gta5/dxvk-0.93/x64/d3d11.dll /home/yourusername/downloads/games/gta5/dxvk-0.93/x64/d3d10.dll /home/yourusername/downloads/games/gta5/dxvk-0.93/setup_dxvk.verb /home/yourusername/downloads/games/gta5/dxvk-0.93/x32 /home/yourusername/downloads/games/gta5/dxvk-0.93/x32/d3d10_1.dll /home/yourusername/downloads/games/gta5/dxvk-0.93/x32/d3d10core.dll /home/yourusername/downloads/games/gta5/dxvk-0.93/x32/dxgi.dll /home/yourusername/downloads/games/gta5/dxvk-0.93/x32/d3d11.dll /home/yourusername/downloads/games/gta5/dxvk-0.93/x32/d3d10.dll

We now "inject" dxvk "fake"/modified dll libraries into gta5 WINEPREFIX :
cd $HOME/downloads/games/gta5/dxvk-0.93 WINEPREFIX="$HOME/.steam/steam/steamapps/compatdata/271590/pfx" winetricks --force setup_dxvk.verb


In case you need it later, we create a new dxvk configuration file for gta5 :

$ cat > $HOME/downloads/games/gta5/gta_dxvk.conf #dxgi.customDeviceId = E366 #dxgi.customVendorId = 1002

(i commented mine, because i finally didn't need to force the use of a specific device.)

proton configuration update
We'll tune proton 3.16 configuration for gta5.

Note: unless you really need it, do not keep the WINEDEBUG variable active ; it will generate a lot of IO generating millions of lines in $HOME/steam-271590.log otherwise.

$ cd $HOME/.steam/steam/steamapps/common/Proton 3.16/ $ cp user_settings.sample.py user_settings.py

Then edit user_settings.py :
$ vi $HOME/.steam/steam/steamapps/common/Proton 3.16/user_settings.py

Comment a few lines to get this content
$ cat $HOME/.steam/steam/steamapps/common/Proton 3.16/user_settings.py user_settings = { # "WINEDEBUG": "+timestamp,+pid,+tid,+seh,+debugstr,+module", "DXVK_LOG_LEVEL": "info", # Enable DXVK's HUD # "DXVK_HUD": "devinfo,fps", # Use gl-based wined3d for d3d11 and d3d10 instead of vulkan-based dxvk #"PROTON_USE_WINED3D": "1", #Disable d3d11 entirely #"PROTON_NO_D3D11": "1", #Disable in-process synchronization primitives "PROTON_NO_ESYNC": "1", }
wine/proton prefix libraries injection
We'll "inject" a few libraries into wine/proton prefix using winetricks.

WINEPREFIX="$HOME/.steam/steam/steamapps/compatdata/271590/pfx" winetricks corefonts directx9 vcrun2012 win7
GTA5 steam launch options
We'll point to a custom dxvk configuration file when launching GTA5 using steam&steamplay.

Back to the steam client, right click GTA5, select Properties and set launch options :

DXVK_CONFIG_FILE=/home/yourusername/downloads/games/gta5/gta_dxvk.conf %command%

Playing GTA5
You should now be ready to hit that play button :)

Note : although vulkan and dxvk provides really impressive performance, you may have to lower a few options in game settings ; game settings were made to be used, lots of people complain about not being able to max out video settings for this or that game .. that's actually the sole point of having video settings, later being able to benefit from updated hardware ...stop being a jerk.

I had to change the ingame mouse input setting to prevent a weird problem happening randomly (being unable to re-center camera when in vehicles) ; setting it to directinput worked for me.

I personally don't see any performance hit at all, it runs as if i was running that window$ crappy thing :)

My hardware :
- Intel core i7 2600K 3.4 GHz
- 16GB ram
- Nvidia GeForce GTX 1050 Ti
- raid0 array of 3x 1TB mechanical harddrives

Software :
Linux kernel : 4.9.0-8 from debian stretch stable repository
OS : Debian GNU/Linux stretch - stable flavor (updated multiple times a week)
Nvidia beta driver 415.18.02
Window manager : openbox with tint2 (i like it simple & lightweight :p )
filesystems : ext4 on top of lvm2 logical volumes, PV&VG(s) being created on top of my raid0 md device.

3 commentaires
stinker 11 déc. 2018 à 14h25 
good guide. Might switch me to linux for good. After all, gta is the only reason I stay on winblows
The Botfather | botfather.si 10 déc. 2018 à 17h36 
nice one, i myself am still windows user, but i develop on linux machine but i will rethink that now since i don't really use a lot windows only application Linux :rockon:
Shit_Boring696969 3 déc. 2018 à 11h54 
usefull guide :D