Since the release of DXVK 2.0, the Nvidia 525 driver, and the work done in Mesa on the GPL, the necessity of state cache file has been almost entirely elimited. There have been no contributions to this file since late Oct to early Nov 2022. Because of this, I will no longer be actively maintaining a cache file for others to use. At the start of Apex Season 16 this repo will be archived. Thank you to everyone who contributed entries and helped make Apex Legends a great experience on Linux.
The first time a new player on Linux tries to play Apex Legends it can be a horrible experience. From occasional stuttering when a new shader is cached, to complete freezes and crashes as hundred or thousands of new shaders a processed. These problems also plague long time Apex Legends on Linux players as each new map update has a huge impact on game performance requiring re-rendering of shaders. This repository will hopefully become a large community effort to make Apex Legends on Linux a smooth and enjoyable experience for everyone.
Apex Legends uses the Direct3D 11 rendering engine which is not supported on Linux. Instead, Proton uses DXVK to provide a Vulkan-based implementation of D3D11 and 10. While this works great for most games, some have a lot of shaders that need to be accessed while you play the game. The Valve team handles most of the pre-caching of these shaders from community sourced files, but they do not distribute this one file which assists with accessing these pre-cached shaders. A more detailed explanation of what goes on behind the scenes can be found in this r/linux_gaming thread.
Instead of each player having to drop in multiple times with unplayable rendering lag and stutter, we can combine the efforts of multiple Apex Legends players by combining our dxvk-cache files using the dxvk-cache-tool created by DarkTigrus. Lutris provides a build of this tool here.
This effort was originally started by u/ryao in this r/linux_gaming thread. This thread worked well for a while but will eventually get lost in the history of the subreddit and may not be easy to find, especially for new players. Additionally, the history of the cache file is not readily available and cannot be quickly reverted in the event of a bad merge. This repository will also add more transparency to each merge, make it easier to give credit to each contributed, and can be more easily forked/transferred should I or any future maintainers decide to stop working on this project.
Apex Legends MUST be using a Proton compatibility tool that uses dxvk state cache file version 15. The current cache file uses v15 and no attempts will be made to support earlier versions. As of Aug 10, 2022, Proton Experimental and GE-Proton7-27 or later are fully compatible.
This single line will download the cache, and save it in the default Apex Legends state cache directory.
curl -LO --output-dir ~/.local/share/Steam/steamapps/shadercache/1172470/DXVK_state_cache/ https://github.com/bcook254/apex-legends-cache/raw/main/r5apex.dxvk-cache
Or if you're using flatpak
curl -LO --output-dir ~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/shadercache/1172470/DXVK_state_cache/ https://github.com/bcook254/apex-legends-cache/raw/main/r5apex.dxvk-cache
If the output location does not exist, curl will display an error letting you know that the folder does not exist. This is most likely due to your state cache folder being in a different location. If your state cache folder is in a non-default location, you must change the --output-dir
option and re-run the command.
You could also clone this repository to your local machine and either manually or automatically pull each update and copy your local repository files to the same location listed above. This does require installing and setting up git and git-lfs for which there are many guides available online.
As this is a new project, I am open to new ideas on how we can make this process easier and faster for contributors and maintainers. If you would like to propose new ideas or start a discussion around this, please open an issue.
For some reason with each map change, Apex Legends no longer uses any of the previous state cache entries. This is leaving a lot of unused entries behind and creates a larger than necessary file. Therefore with each map change the current cache file will be reset and populated with new entries. This mean you MUST delete your old state cache file and begin generating a new one. Submissions with old entries will be rejected if they contain these entries for the time being.
Begin by downloading the most recent version of the cache file from this repository here, r5apex.dxvk-cache file, or this direct link.
Next, copy your local cache file in to the same folder that contains that cache file you downloaded. Assuming you are using the command line and are currently working out of said folder it might look something like this.
cp ~/.local/share/Steam/steamapps/shadercache/1172470/DXVK_state_cache/r5apex.dxvk-cache ./r5apex-local.dxvk-cache
Merge the downloaded cache file with your local cache file. Building off the previous command it should like something like this.
dxvk-cache-tool ./r5apex.dxvk-cache ./r5apex-local.dxvk-cache
Upload the output.dxvk-cache
generated file to your preferred location and make a publicly accessible link for it.
Open up an issue, making sure to use the Cache File Entry issue template. You can also use this link, Cache File Entry. Please fill out the entire template! It makes it that much easier for me.
Contributors may still create pull request as described in earlier versions of this document, but it will no longer be the preferred method. This method led to a lot of merge conflicts at the beginning of each map change as multiple people contribute to the project.
TheMethodicalJosh An automatic download script at TheMethodicalJosh/apex-legends-cache-automated
u/ryao (original maintainer on r/linux_gaming)
u/Melon__Bread
u/najodleglejszy
u/PsychologicalLog1090
u/a9dnsn
u/LilCalosis
u/Flubberding
u/AnyEntertainment8080
u/arvind-d
u/DAVE_nn
u/yourfavrodney
u/jumper775
u/Tiflotin
u/NineBallAYAYA
u/CaptainKrisss
u/Nik0ne
u/Tenshar
u/-ThunderFox - 3604 entries
u/EpicCreeper713
u/Kitchen-Drop236
u/SneakySnk
u/K1f0
u/gudhost
u/wanna_play_r5
u/baryluk
u/sP6awFXL94V6vH7C
@cybersandwich - 88 entries
@codebam - 278 entries
@xPakrikx - 1336 entries
@maxxnino - 558 entries
@bagusnl - 45 entries
@Enluka - 35 entries
Whom - 12845 entries
@NotTheTime - 5 entries
@SohamMalakar - 814 entries
@RMED24 - 2371 entries
@Nightails - 570 entries
This would not be possible without everyone who originally contributed to this file when Apex Legends first supported Linux and could not continue to be possible without each contribution and user from the community.
Together, we will slátra our enemies.