PAYDAY 2

PAYDAY 2

Not enough ratings
Comprehensive Guide to PAYDAY 2 on Linux Through Wine/Proton
By oruga
Learn the how, what, and why of running PAYDAY 2 on Linux through Wine/Proton, including modding support.
   
Award
Favorite
Favorited
Unfavorite
Disadvantages of Native

There are three reasons you may want to run Payday 2 through Wine/Proton instead of running its native port:

Stability
  • Although anecdotal, the Linux port for I and many others appears to be far less stable than the Windows version.
  • In the past, updates have broken matchmaking between Windows and Linux, (as during icebreaker), and running the game through Wine/Proton will at least ensure you can matchmake with the majority of players after any update.

Performance
  • Payday's implementation of OpenGL kinda sucks, and using Wine/Proton's DirectX wrappers increases performance despite introducing additional overhead.
  • VR (supposedly) works great through Proton and poorly or not at all on Native. Unable to test.
  • Fullscreen and borderless windowed modes can be functional without the same alt-tabbing issues present on native. This is WM/DE dependant however.

Mod Support
  • Many mods use functions or dependencies that are partially or fully incompatible with the Linux version. Running the Windows version of the game ensures that basically all mods (save for the Linux-specific patches) will be compatible with your OS.
  • A popular library BeardLib[github.com] has some functions that do not work in Linux, which prevents some mods which depend on it from functioning. The BeardLib Editor[github.com] supposedly is feature-incomplete in Linux as well.
  • SuperBLT[superblt.znix.xyz] currently (as of writing) does not compile or run[gitlab.com] properly for Linux native as of the latest update, requiring running the Windows build if you want the latest features. This issue is resolved
  • Some custom maps may be missing features, and other add-on content often do not work due to how asset loading works (or rather, doesn't) in Linux. There are workarounds for updating older mods to support the relatively recent introduction of Linux asset loading, however it is just easier to use the Windows version instead of manually updating older mods.
Step 1: Enabling Wine/Proton
Firstly, you must ensure Wine/Proton is enabled for ALL games

Go to Steam -> Settings -> Steam Play
Click 'Enable Steam Play for all other titles'

You must also have 'Enable Steam Play for supported titles' enabled or this setting will be greyed out.

Choosing the Wine/Proton version is not required, however I suggest using the latest available build of Proton.
Step 2: Configuring PAYDAY 2
Next, enable Proton for Payday 2.

Note: this step requires a partial redownload of Payday 2, this process is automatic but may take some time. Ensure you have a stable and non-metered connection before proceeding

To enable Proton, find Payday 2 in your library
Right click Payday 2 -> Properties -> Compatibility

Check 'Force the use of a specific Steam Play compatibility tool'

Select a Proton version, the latest build is a safe bet. You can some confirmed functional Proton builds (including custom forks) on ProtonDB[www.protondb.com] user reports

Do NOT select 'Steam Linux Runtime', that is the native port you were already running, not the windows build through wine

Be patient as Steam redownloads some files.
Optional Step: Installation and Usage of SuperBLT
Installation and usage of SuperBLT is identical to on Windows, with two major exceptions.

Install SuperBLT[superblt.znix.xyz] like normal as directed on the webpage

Manually download and install the latest SuperBLT basemod[gitlab.com] from the official GitLab repo[gitlab.com]. Extract its contents into 'PAYDAY 2/mods/base/'
Alternatively, you can clone the repository directly into 'PAYDAY 2/mods/base/' using
$ git clone https://gitlab.com/znixian/payday2-superblt-lua.git "[YOUR STEAM LIBRRY FOLDER HERE]/steamapps/common/PAYDAY 2/mods/base/"
Obviously requires git

You must also instruct Proton to load SuperBLT with the game launch option
WINEDLLOVERRIDES="wsock32=n,b" %command%
This tells Wine/Proton to load 'wsock32.dll' (the SuperBLT Lua hook) as a native .dll in binary (compiled) form.

You may add this to Payday 2 similarly to how you enable Proton, except under 'General -> Launch Options'

It may be required to manually install the 'Microsoft Visual C++ 2017 Redistributable package (x86)', as instructed by the webpage. If so you must install it into the Payday 2 Wine Prefix.
You can find more in the 'Tips, Tricks, and Troubleshooting' section of this guide.
Final Step: Profit!
If all steps were properly followed, you now have a functional copy of the Windows version of Payday 2!

If you chose to install SuperBLT: installation, support, and usage of mods is exactly the same as on Windows.

If you now have a functional copy of PAYDAY 2, if you had to make additional tweaks, or if it does not work at all, write a report on ProtonDB[www.protondb.com] with as much detail as you can provide.
Tips, Tricks, and Troubleshooting
Preface
Here is a compilation of fixes I and others have discovered for common problems relating to Wine/Proton with Payday 2. Many of these were aggregated on ProtonDB[www.protondb.com] as well.

When referring to the Payday 2 Prefix, I am talking about the Wine Prefix (can also be referred to as the Wine Bottle) which Steam uses for Payday 2, usually located at
~/.steam/steam/steamapps/compatdata/218620/pfx
The location will vary if your game is installed on another drive.

Note that it is not suggested to modify your prefix using any tools not linked to the same Proton version you run Payday 2 with


Worse performace/stability than native
This generally should not happen, however there are a few solutions to gain more performance even if the game runs fine.

Force D9VK
Forcing DirectX 9 Vulkan wrapper may help, requires large address aware flag to prevent memory-related crashes.
Prepend
PROTON_USE_D9VK=1 PROTON_FORCE_LARGE_ADDRESS_AWARE=1
to launch options

To fix possible crashing as a result of D9VK, you should go into parent folder of the Payday 2 prefix and add
[payday2_win32_release.exe] d3d9.evictManagedOnUnlock = True
to dxvk.conf

If that file does not exist, create it.

Feral Gamemode
Read about it here[github.com]
Install, configure, then prepend
gamemoderun
to '%command%' in launch options

Memory restrictions
Firstly, ensure you have
PROTON_FORCE_LARGE_ADDRESS_AWARE=1
in your launch options.

Payday 2 is a 32 bit program and subsequently has significant problems with out of memory crashes.

If the large address aware flag does not alleviate your problems, lower your ingame settings (specifically textures). If you have many mod_overrides type mods, consider removing some.

There are also mods such as to reduce Payday's memory usage such as Clear Texture Cache by TdlQ[pd2mods.z77.fr]


Audio issues
This section can vary wildly depending on your personal Linux setup. This only will cover those who use PulseAudio

Audio slowdown
Restart PulseAudio by issuing the command
$ pulseaudio -k
and restarting the game.
From what I understand this is a result of mismatched sample rates, mostly impacting those on USB DACs.

Although there are permanent and more complicated solutions to this, including modification to your PulseAudio config, I suggest doing your own research on your own setup and making frequent backups as you do.

Audio crackling
Prepend
PULSE_LATENCY_MSEC=90
(or 60) to launch options.

No audio with certain mods
Wine/Proton can sometimes have issues with xAudio that is included with SuperBLT. There is no fix for this I am aware of without recompiling SuperBLT.


Fullscreen and windowing
The vast majority of these issues vary widely depending on your window manager or desktop environment.
Personally I use DWM so my troubles are simultaneously self-inflicted and easy to resolve, DE users may not have the same issues with Fullscreen.

Cannot tab back into the game
This is a result of fullscreen, run the game in windowed to resolve this.

You may also run the game in fullscreen but in a Wine Virtual Desktop to maintain gamma control. You may do this by running winecfg in the prefix and enabling a virtual desktop at the desired resolution.

Otherwise, you can attempt using Borderless Windowed Updated by Shatyuka and Sora[modworkshop.net] and adding the included dll to WINEDLLOVERRIDES

VSync
There are inconsistient reports about the effects of VSync on the Windows build of the game. Try having it disabled at first, but enable it if you run into trouble.


Graphical degredation

Artefacting on blurred surfaces
Disable depth of field in the game settings.

Excessive screen tearing
If on fullscreen, ensure game is running at the native resolution, or attempt to fullscreen a Wine virtual desktop (mentioned in 'Fullscreen and windowing') with a fullscreen, native-to-desktop resolution. This varies depending on WM/DE.


Mod development through Wine

Enabling console
If you have the console enabled but cannot see it, you must install the Windows CMD.

The easiest way to do this is through protontricks[github.com]

This should allow the console log to appear as a window.

Note that this is mostly incompatible while running Payday 2 in a Wine Virtual Desktop

Running external mod tools
Most external mod tools are run independent of Payday 2 itself, and as such do not need to be run in the Payday 2 prefix.

Many of these have Linux builds, and those that don't can easily be run on Wine.

They are also usually open-source and as such can be fixed for Linux (if applicable) so long as you have the technical knowledge.

Closing Notes
Thanks for reading my guide!

Most of this was gathered from ProtonDB and firsthand experience, if you need additional assistance please comment with as much information as possible.
6 Comments
Shrimp Fried Rice Oct 12, 2021 @ 9:03am 
God bless you for making this, I was wondering why I'd drop from like 100 frames or so to like 50 constantly. Much appreciated friend :D
oruga  [author] Jul 31, 2021 @ 2:33pm 
thanks for your feedback, i edited the guide a bit for clarity.

any possible incompatibilities or issues are important to bring up. dont want the game turning Borderlands 2 and breaking cross platform play with the hd texture pack installed.

while custom maps do work, there is room for incompatibility depending on how the creators develop their maps. many maps and (iirc) portions of the beardlib editor use functions which are not supported on linux. portions of libraries used by many mods (such as beardlib's fileio) have functions that do not work either.

asset loading using the conventional function db:create_entry() requires different arguments for windows and linux, which can be resolved with superblt's implementation, but requires the mod maker to know of its existence

note the 'as of writing' previously written in the loader update section

it is specifically noted that the stability and performance note has no data and is clearly stated to be anecdotal
Dribbleondo-Van-Pelt Jul 31, 2021 @ 12:55pm 
The updates breaking thing is such an odd thing to bring up, considering this hasn't happened in almost three years. And i've always fixed it in less than two minutes. This isn't an issue.

Custom maps DO WORK on Linux, as do a surprising number of addons. Saying otherwise is untrue.

The loader has already been fixed; it's just waiting for a merge pull. I even compiled it myself and put it on my own guide.

I've never had any issues to do with stability, and, if anything, i've had MORE issues with the windows ports' performance than Linux. Maybe the game happens to runs well on AMD hardware, but the port is, in my opinion, one the best on Linux.

All in all, unless you really are having issues running the game on Linux, I see no reason to use it through proton.
society Jul 26, 2021 @ 8:50am 
nice
Abalei Bob Jul 14, 2021 @ 10:01pm 
pretty poggers
MrLarryMan Jul 14, 2021 @ 6:35pm 
3/10 not enough gay intercourse