Potential fix for stuttering

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 :slight_smile: I’ll see ya’ll in game!

Platform (Required):

PC - Steam

4 Likes

This is awesome and i may try it out of curiosity, AMD cpu/gpu rig also, the best fix i found for stuttering was uninstalling the amd adrenaline software and using a driver only setup. Have you tried this? I rarely have stuttering to the point i dont think about it anymore. Always on the lookout for ways to reduce my fps dips in hordes tho.

Hey! No I haven’t tried doing that, however I rolled back to the 23.11.1 version of the driver (and AMD adrenalin) because the lastest drivers were not as performant while playing Darktide, at least for my rig. If I have further issues I’ll try getting rid of Adrenalin, but so far I’m using it to undervolt my GPU so I prefer keeping it if I can :slight_smile:

You can undervolt just fine with MSI afterburner, just a little less user friendly by having to click a very tiny square on a graph but a short vid will set you up. Its a nice upgrade having rivatuner display live metrics to me after keybinding it, with that you open rivatuner and add darktide.exe to the group list

After troubleshooting and testing all the different solutions for stutters in this game, this has been the only solution that has help me fix in some way with the bad performance.

With that, I had to went a different route like the original post. The script didn’t work so I’ve to manually go into the files “App folder” and start deleting the cache files. Granted this is a temporal fix, so I’ve to do it once a week.

Here’s the video I used as reference:

Thanks for this suggestion. I was losing hope I could play the game without stutters but until Fatshark finds a solution, this is my only option to make Darktide playable.

If for some reason you are reading this post, please like the original post made by TheSunRyze. This post was made in September and a very few folks have seen this solution so it will be nice to make it visible for other people and maybe … Fatshark.