Every article tag can be clicked to get a list of all articles in that category. Every article tag also has an RSS feed! You can customize an RSS feed too!
A message to Nvidia Users and Disk Shader Cache Limitation.
Avehicle7887 Sep 18, 2018
As some (or many) of you are aware, the Nvidia drivers by default have a 128MB Shader cache pool which is shared by all programs/games and as a result of that it would fill up quickly.

A common solution to this problem was by dedicating a folder per game through the use of __GL_SHADER_DISK_CACHE_PATH= , giving them 128MB disk cache each.

Yesterday, Arthur Huillet from Nvidia made an interesting post regarding this. By using __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1 the 128MB limit is removed. This will come in handy for some of those games with very large shaders, Witcher 3 is a good example of this, the game is able to eat up over 10mb in the starting area alone.
Ehvis Sep 18, 2018
I put it in my Overwatch install. It didn't grow big enough yet to see if it works though.
Ehvis Sep 22, 2018
It's an environment variable. It only makes sense if you either set it globally or combine it with games you give a specific shader cache path. So far I've only set it in a couple of Lutris/Wine games that I gave their own directory because they have very large shader caches. But you could also put it in the Steam launch options. Not sure how that combines with steams own shader cache options though.
Avehicle7887 Sep 22, 2018
Quoting: GuestWhere do we put this option? In the nvidia control panel or steam launch option?

I don't know how it works on Steam. For non-Steam games though, you can just put the env-variable in the .sh launch script. As Ehvis said, this is more useful for some Wine games with very large shaders such as Witcher 3, Overwatch and GTA V.

Enabling these variables it's an easy 2 lines edit in your start script (you can put them at the start of the script):

export __GL_SHADER_DISK_CACHE_PATH="$HOME/.nv/Game_Name_1" <--for this line to work you need to create the directory manually
export __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1

Rinse and repeat for the other games.
jens Sep 22, 2018
  • Supporter
Yes,you can use this in your Steam launch options. Mine for GTA5 in Steam Play looks like:

__GL_SHADER_DISK_CACHE_PATH=~/.steam/cache/271590 __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1 LD_PRELOAD=$LD_PRELOAD:/usr/\$LIB/libgamemodeauto.so.0 %command%

Please make sure that the directory exists, it wont be created automatically. The GTA5 cache is still ~7MB after playing two hours or so, not sure if this will make such a difference.

(Note that I'm using latest DXVK 0.72 for Proton, that's why I don't have a reference to a DXVK config file with the AMD override in my launch options.)
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.

Buy Games
Buy games with our affiliate / partner links: