CS2 and video drivers


What is this pop up? And, do I need this every time I open CS2? As you can see I can also skip this part. And, I am not completely sure if skipping this have any impacts on the performance, i was unable to find any difference. I get approximately 260 on low, 170 on medium and 115 on high. I installed a few extrapackages but they seems useless and did not increase the fps. The matter is that should i keep these lines I added or should I remove them and keep as it was? I use Intel Arc A750 as my main graphics card and It has 8 GB vram. And I will list the packages (drivers) I installed.

{
 hardware.graphics = {
  enable = true;
  extraPackages = with pkgs; [
   vpl-gpu-rt
   libvdpau-va-gl
   intel-media-driver
   intel-compute-runtime
  ];
 };
};

Preloading the shaders more or less translates to the CPU* doing shader drawing in advance and storing them on disk instead of rendering them live in the game, this can actually improve performance under some circumstances but its not universal.

If its taking FOREVER to do this, and it does it EVERY time you start the game, you’ve encountered a known bug.

The vulkan shaders like to hang in steam occasionally due to some technical reason that escapes me at the moment, you can disable/uninstall vulkan but its likely to break shit outside of just steam so i’d advise against that.

The known fix for this issue is to go into the shaders directory by hand and clear it out, exit steam and restart steam and launch the game again to draw new shaders from scratch to disk.

You have a few options aside from completely disabling or removing libs/deps from nix as a whole.
Quick and dirty:
Add this as a launch option to the game under steam

-vulkan_disable_steam_shader_cache

This may or may not work, depends on your build.

If you are more interested in disabling shader pre-caching all together in steam:

1. Go to Steam > Settings > Shader Pre-Caching.
2. Untick Enable Shader Pre-Caching.

Reboot steam

Last, find where the shaders themselves are being stores for CS2 on disk and clear the directory with a rm command from shell and reboot steam.

They should be located in your home directory in a hidden dir called .cache

[jason@Beast:~]$ ls .cache/mesa_shader_cache/
27/    35/    48/    4f/    54/    67/    71/    b0/    c9/    cd/    df/    e7/    f5/    fa/    index  

[jason@Beast:~]$ ls .cache/mesa_shader_cache_db/
index   part1/  part12/ part15/ part18/ part20/ part23/ part26/ part29/ part31/ part34/ part37/ part4/  part42/ part45/ part48/ part6/  part9/  
marker  part10/ part13/ part16/ part19/ part21/ part24/ part27/ part3/  part32/ part35/ part38/ part40/ part43/ part46/ part49/ part7/  
part0/  part11/ part14/ part17/ part2/  part22/ part25/ part28/ part30/ part33/ part36/ part39/ part41/ part44/ part47/ part5/  part8/  

mesa shader cache and db are the folders to wipe.

EDIT: It should also be noted that unchecking the shader precaching option in steam and restarting it once clears the cache unless something is broken in the cache, you can re-enable it after and reboot steam one more time if you dont want to fuck with your .cache file.

1 Like