Skip to content

Instantly share code, notes, and snippets.

@Nithanim
Last active July 1, 2023 23:09
Show Gist options
  • Save Nithanim/443362f7b76d9a8d18abea2cb0daa00e to your computer and use it in GitHub Desktop.
Save Nithanim/443362f7b76d9a8d18abea2cb0daa00e to your computer and use it in GitHub Desktop.
GuildWars 2 on Linux (Ubuntu 22.04) with ARCDPS

For best performance use a kernel with fsync support, like xanmod. At the time of writing, 6.2.12-x64v4-xanmod1 is installed.

Also update your graphics drivers! Like https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers

Download the newest Glorious Eggroll Wine version here: https://github.com/GloriousEggroll/wine-ge-custom/releases At the time of writing it is https://github.com/GloriousEggroll/wine-ge-custom/releases/download/GE-Proton8-8/wine-lutris-GE-Proton8-8-x86_64.tar.xz

Here is a table of all env params used:

Key Value Note
WINEDEBUG -all Suppresses most log messaages, improving performance
WINEFSYNC 1 Enables fsync if kernel supports it
WINEESYNC 1 Enables esync if supported, but is ignored, if fsync is requested and supported
DXVK_ASYNC 1 Not sure if still needed but improves performaance enabelling the dxvk async patch
STAGING_SHARED_MEMORY 1 Not sure
DXVK_HUD fps Shows some info of dxvk. For more, use devinfo,fps or even full
DXVK_STATE_CACHE_PATH /tmp/dxvk_state_cache_gw2 Not sure if still needed but improves performance because lookup in memory
ENABLE_DEVICE_CHOOSER_LAYER 1 I you ahve multiple graphics cards and want to expose a specific one using https://github.com/aejsmith/vkdevicechooser. Since we aare using dxvk, also the internal dxvk devvice filter could be used
VULKAN_DEVICE_INDEX 1 See device chooser layer
MESA_DISK_CACHE_SINGLE_FILE 1 Not sure
MESA_SHADER_CACHE_DIR /tmp Not sure but theoretically improves lookup performance if folder is in ram
RADV_PERFTEST gpl,nggc Allegedly improves performance using aa new "nggc" feature

To start the game:

  • Set your wine folder to one specifically for the game. Example: export WINEPREFIX=$(pwd)
  • Set your wine installation. Example: `export PATH=/your/path/to/wine/lutris-GE-Proton8-8-x86_64/bin:$PATH
  • Export all env vars from the table. Example: export WINEDEBUG=-all
  • Start the game exe using wine. Example: wine 'Z:\home\user\wherever\GW2-64.exe'

The game should now work with ok-ish performance. If it runs like shit you are probably out of luck. I wasted so much time on performance and I think it is still far from Windows.

What about ARCDPS?

Well, you probably found yourself with a non-starting game complaining about not finding a graphics context with DX9. If you re-enable logging you find that it can't load the d3d11.dll (arcdps) because it can't find d3dcompiler_47.dll. This is weird because it works flawlessly without arcdps. It does not help if we copy the one from C:\Windows\System32 because it results in the same error.

The one from wine is (I assume) a wine custom built version that fails with arcdps (because it does some weird stuff). You can get some official windows (or whatever) one by finding it redistributed by other apps. Examples are in this thread: Winetricks/winetricks#1012

What I did was to use Winetricks/winetricks#1012 (comment) specifically. I just unpacked the github desktop exe and then the nupkg with the default installed unpacker gui and copied the d3dcompiler_47.dll from there in the game directory. OR you have winetricks and use the MS d3dcompiler_47.dll verb but I have not testet it. (uses the Firefox installer internally)

The game should now start normally and load arcdps. You should be greeted by the options window in the main manu. (The sortcut is alt+shift+t if you are wondering).

However, I got some weird performance problems loading stiff from disk but I had them gneraally for the whole system. Even the shell and every command having to lookup something from disk became slow. BUT that might be some wird other thing and completely unrelated.

Not sure how that would even interfere to be honest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment