Still having this problem and almost got banned again because of it so decided to try and find a fix.
The functions CreatePixelShader and CreateVertexShader seem to be causing the problem and making csgo take 2mins or more to start every time. I remembered about some shader update in a recent version of steam client so looked for the changelog and found that I could do
STEAM_ENABLE_SHADER_CACHE_MANAGEMENT=0
With that variable set to 0 csgo starts up in about 20 secs again.
I am currently using nvidia driver 384.69
I deleted the shadercache directory and tested again with shader cache management enabled but it still takes a long time to start. It did recreate ~/.local/share/Steam/SteamApps/shadercache/730/nvidiav1/ but the directory remains empty even after the games has been running for a few minutes.
I have had the same issue with another game - XCOM2, which started only after I purchased the "War of the Chosen" expansion.
This expansion adds a loading screen with a progressbar, which always took 3-4 minutes to go through on my computer. I thought this was normal, until I read in some review article that only the first run should be this slow. This was fixed after Feral support suggested using "steamapps" folder name for my game library instead of "SteamApps". They suggested that I rename the folder, and readd it as game library in Steam.
To test this without having to readd the library, I simply created a symbolic link "steamapps" pointing to "SteamApps", right next to it in ~/.local/share/Steam. And voila, on the second run, the loading screen was done within seconds!
Afterwards, I deleted the symlink and verified that subsequent game starts are slow again, which they of course were. Then I restarted Steam with the abovementioned STEAM_ENABLE_SHADER_CACHE_MANAGEMENT=0 (and the symlink still deleted), which also caused the loading screen to finish quickly on second and any subsequent game start.
I am using GeForce GTX 970 card with nvidia drivers 375.82.
This should actually already be fixed in the Beta client, we fixed a problem where older libraries that still had the SteamApps name would accidentally disable the shader cache. This client will be released sometime soon, so you can either switch to the Beta or wait for it to be released to confirm that it fixes these symptoms for you.
I just tried again without STEAM_ENABLE_SHADER_CACHE_MANAGEMENT=0 and csgo still takes a long time to start and load the menus for me. My games are in SteamApps and the shadercache directory remains almost empty, apart from creating 730/nvidiav1.
I created a link from steamapps to my SteamApps now and my shadercache is getting populated. It took a very long time to start still first time (since it was creating the cache) but the second run it started in just under 20 secs like it did with STEAM_ENABLE_SHADER_CACHE_MANAGEMENT=0.
I am using steam beta version Oct 10 2017, at 17:44:37
Should I just rename SteamApps to steamapps? :)
Thanks for confirming it doesn't fix it, I will take a closer look.
Can you try on today's build?
I just deleted my steamapps symlink and the contents of shadercache and retried with beta client Oct 11 2017.
The first time I ran csgo it took about 2.5mins to start and another 20secs to finish drawing the menu. Inside my SteamApps/shadercache the 730/nvidiav1 directory was created but it was empty.
The second time I ran csgo it took 2.5mins again, but this time the GLCache directory was created and populated.
The third time I ran it took 20secs to get to the menu and finish drawing it.
I don't know why it didn't create the GLCache directory first time around, unless it was still using steamapps and after running it once it updated to SteamApps somewhere.
Thanks for retesting @af7567, closing as fixed.
Nothing extracted yet.
Your system information
Tested with nvidia drivers 384.59, 375.82, 381.22, 375.66 with the same results
Please describe your issue in as much detail as possible:
With the beta steam client, csgo is taking a long time to start every time, just showing a black screen for ages. With the stable client it can take a while the first time but once stuff is cached it starts a lot faster. Map loading times don't seem to be affected, just the game startup.
With the stable client the start time is about 17secs to get to the main menu, then 1-2secs for the main menu background and stuff to load.
With the beta client it takes 1m25secs - 1m30s to get to the main menu then another 15secs until the rest of the stuff is loaded.
These times are after the game has already been started once, so some data is cached.
I tried using strace to see what is going on and it is a lot of
a bit of
and sometimes
The strace output from launch to main menu is 400MB big so too big to upload here.
gdb gives this if I attach to the csgo process
I get a similar backtrace every time I let it continue then break again during startup