For reference, the bug report is IN-41214.
So this unrecoverable error can happen for many but essentially your graphic card resets because it’s been busy for too long. In my case, if I didn’t click ok fast enough I would get a BSOD VIDEO_TDR_FAILURE. I’m listing all the fixes I’ve found and tried, hoping that it helps you find a fix faster. if you find a fix that’s not on the list, please comment on the thread. Remember to include links.
In my case, Unity was using my integrated GPU instead of my dedicated one.
To any Unity devs reading this: I completely get that resources are limited and the forum and bug reports are what we should be using, when on a free license. However, this error seems like quite a pain point for the community and it would be great if someone could look into this and make solving this error a bit easier. I hope my collection of solutions makes it easier to investigate. I’m taking the liberty of tagging some Unity devs who have responded to threads about this error. @Tautvydas-Zilys @Soner-Sen @LeonhardP @aleksandrk
As for bug reporting, in my case, this seems to corrupt some of the files and so the bug report application would throw an error about files being unreadable. And customer support told me they were nontech support only. I eventually got a project to crash without corrupting the files and was told to check my drivers (IN-41214).
I hope I don’t offend anyone with the tags, I’ve been chipping at this for weeks in my spare time and am genuinely willing to help out in any way I can. Please reach out if I can help.
1) Set the Prefered graphics card in Windows settings (this worked for me)
Note: I had confirmed that the editor was using my integrated Intel GPU through the Task Manager’s Performance tab. The integrated graphics card is less powerful so it’s understandable that this one crashes. And noticed a message in the Nvidia Control Panel that said graphic card selection was handled by Windows now.
Settings>System>Display>Graphic Settings>“choose an app to set preference”>Desktop app>browse
Find the unity.exe for the editor install you’re using and selected, “options” I selected “High performance” which listed my Nvidia GPU
2) Nvidia Control Panel Settings
Note: there are two tabs, one for your system and one for specific processes. Use the one for specific processes.
3) Exclude unity.exe from your processes in your Antivirus settings
There are a few sources claiming you should disable your antivirus, I suspect that the safety features are slowing down or blocking the GPU processes. I don’t recommend turning your antivirus off permanently. you could try temporarily. I don’t have all the links but some people have reported success excluding the process or changing antivirus.
4) Delete the library file in the project file
5) Inplace Windows Update
A Microsoft person recommended I do an in-place upgrade/install of the latest Windows version, just make sure you select the option to “keep my files” and optionally “keep my apps”. Not keeping the apps will also reset your settings which is more likely to help.
NOTE: I have not tried the remaining solutions, as I wanted to avoid changing settings that would affect other applications and I eventually found my solution. However, others have reported success. I highly recommend trying the above solutions first as they are less risky (well… number 7 is fine).
6) Changing TDRDelay and TDRDdiDelay
Note: this is a more risky fix as it basically tells Windows to ignore your graphic card when it’s unresponsive for a bit longer than usual. this could also cause crashes on your laptop if you completely remove the TDRDelay or set it beyond reasonable values. By crash I mean BSOD VIDEO_TDR_FAILLURE kind of crash. Make sure you bookmark the Adobe link as it has instructions on how to undo this change. it could be the only solution that works if your integrated graphics card is too old/weak to handle the unity graphic demands fast enough to avoid Windows resetting the graphics card.
Constant Crashes - Failed to present D3D11 swapchain due to device removed. page-3
Use the guide below to make the change as it explains in nice detail what you’re doing.
https://substance3d.adobe.com/documentation/spdoc/gpu-drivers-crash-with-long-computations-tdr-crash-128745489.html
7) -force-d3d11 or -force-d3d12
Note: this overrides some of the unity settings, my guess is that without the overrides the dedicated GPU is selected instead of the integrated one.
more info:
8) Disable Integrated graphics card
Note: Don’t do this if you only have one graphic card. In fact, you should probably be using the above methods if you have a dedicated graphics card. But hey if nothing works, then you can try this.