Issue Description (Required):
Minimum fps during normal sessions : 140
Maximum fps during normal sessions : 250
Minimum fps during affected sessions : 40
Maximum fps during normal sessions : 250
I reinstalled the game recently. The game runs fine for a couple days until it starts stuttering like crazy, with insane fps drops and input lag every few seconds. Each time I reinstall the game, the problem is gone.
Attempted Solutions (Optional):
Preface : I recently got back to serving the emperor, and I sadly encountered a lot of stuttering after a few sessions. Uninstalled the game, reinstalled it, and the game was working again for a while, until it started stuttering real bad again, every couple days after a reinstallation… The game would go from very playable : 200 fps most of the time, 140~ during hordes, to stuttering every few seconds, sometimes seeing my fps dropping down to 40 - 50 with insane input lag.
I scratched my head for a while and tried every “fix” under the sun : changing worker threads, using process lasso to manage which cores are used, disabling portrait rendering and so much more I can’t remember.
Then I remembered about all the posts talking about various shader building issues the game has had in the past, and thought I might try clearing the cache by myself. Turns out it worked for me!!
The fix : First, I’d like to specify that I’m using an AMD GPU. If you’re not using an AMD GPU, I’m providing another script that’s not clearing AMD’s shader cache for DX12 games, so pick the right script for your setup! I don’t have access to an NVIDIA GPU right now so I didn’t try writing another version which clears the NVIDIA DX12 shader cache. If someone wants to make modifications to the script and share it bellow for NVIDIA folks, you’re welcome to do so.
Here’s a powershell script that will clear your DX12 shader cache for all games, and clear Darktide cache. I suspect some of the cache the script deletes might be launcher / in-game shop cache which isn’t related to the issue, but I prefer playing it safe and deleting every piece of cache I found.
$dx12CacheFolder = $env:LOCALAPPDATA + “\AMD\DxcCache”
$EBWebViewCacheFolder = $env:APPDATA + “\Fatshark\Darktide\EBWebView\Default\Cache\Cache_Data”
$hansCacheFile = $env:APPDATA + “\Fatshark\Darktide\shader_cache.hans”
Get-ChildItem $dx12CacheFolder | Foreach { Write-Output ("Deleting " + $.FullName); Remove-Item $.FullName }
Get-ChildItem $EBWebViewCacheFolder | Foreach { Write-Output ("Deleting " + $.FullName); Remove-Item $.FullName }
if (Test-Path $hansCacheFile) {
Write-Output “Deleting hansCacheFile…”
Remove-Item $hansCacheFile
}
Read-Host -Prompt “Press Enter to exit…”
Below is the same script that NVIDIA users should use, I just removed the parts specific to AMD GPU users.
$EBWebViewCacheFolder = $env:APPDATA + “\Fatshark\Darktide\EBWebView\Default\Cache\Cache_Data”
$hansCacheFile = $env:APPDATA + “\Fatshark\Darktide\shader_cache.hans”
Get-ChildItem $EBWebViewCacheFolder | Foreach { Write-Output ("Deleting " + $.FullName); Remove-Item $.FullName }
if (Test-Path $hansCacheFile) {
Write-Output “Deleting hansCacheFile…”
Remove-Item $hansCacheFile
}
Read-Host -Prompt “Press Enter to exit…”
-
Copy and paste this code into a new text file
-
Save it in the .ps1 format (it’s the format for Powershell scripts)
-
If like me you encounter stuttering issues every few play sessions, just close the game, Right click on the file → Run with Powershell
-
Next time you start the game, you’ll notice the shader cache is going to be rebuilt and you should hopefuly be stutter free
Disclaimer 1 : Because the script clears all DX12 shader cache for AMD users, your other DX12 games might have some stutters on their next startup until the AMD driver builds its shader cache again, which generaly only takes a few minutes. Be mindful of that.
Disclaimer 2 : I’m not gonna pretend this script will magicaly fix stuttering issues for everyone. This is not an optimization script : If your rig isn’t capable of running the game, this won’t help. But if you found yourself in the same situation as me and can’t run the game properly despite having a very beefy PC, this might save you countless hours of internet scraping and headaches trying to figure out what the duck is going on!
I hope this post doesn’t break the forum rules. I’m just trying to help my fellow rejects out I’ll see ya’ll in game!
Platform (Required):
PC - Steam