Does anybody know how to fix d3d device being lost?

Unreal Engine is exiting due to D3D device being lost. (Error: 0x887A0020 - ‘INTERNAL_ERROR’)
this only happens in UE4 and it crashes every 10-15 minutes randomly, while i can use UE5 perfectly with zero crashes i have not got one crash from UE5.

i have uninstalled UE4, verified the files and the problem persists. i also have my gpu up to date using the studio drivers, windows is up to date, and i have no antivirus.

im using a 2070super, ryzen 5 3600, 32G of ram so my specs are clearly above the recommended especially since i can run UE5 flawlessly with the new features like lumen and not get any crashes at all.

3 Likes

I have it in both 4.26 and 5.0, but I don’t have it in 4.23. The thing I hate the most in this situation is that there is no proper support. I can’t submit a bug report to somebody and then get simple: «Hey, we are aware and working on that!»
We are not alone with this problem but this problem isn’t very common either.
My issue.

1 Like

Weird. I only get that crash when using UE5

2 Likes

I’ve the same issue with 4.26 and .27. No problems with UE5 too.
Do you have the issue with raytracing enabled or also with out raytracing enabled?

Cheers,
Ridder

I was building a second gamedev machine with some parts I had laying around to use at my father’s (he is ill and need someone to be there for few days) and I started to have “D3D device being lost” with some projects that my main machine was not showing. So I will present a comparison between both hardware and the software fix which removed the issue, at least for now.

main machine: AMD Ryzen 1700 with 32GB RAM and RTX 3070 8GB, project files on a NVMe SSD and tools on a SATA hard drive, OS into a SATA SSD. Motherboard ASUS with 450 chipset

machine with issues: Intel i5 with 32GB RAM and RX5700XT 8GB, project files on a SATA hard drive, tools on a SATA hard drive, OS into a SATA SSD. Motherboard ASUS with B85 chipset

There were project with not much complex shaders which were ok on the second machine, but the projects with complex shaders was hanging for a bit, terminating with a crash reporting the message in question. So, all pointed out that a long operation was making the software stack at the very bottom to think there were issues with the GPU and sent the fault, which was producing then a fault cascade on all the upper software layers, so meaning something between Windows 10 and the GPU drivers.
Then I remembered that Allegorithmic has presented in the past some changes into Windows 10 registry to add a delay to the GPU to give some time for the GPU to finish a long operation and then not producing that fault. These are the steps they suggested:

1 - Open the Run window

Click on Start then Run or press the Windows and R key .
It will open the Run window.

2 - Launch the registry editor

Type " regedit " in the text field and press " OK ".

3 - Navigate to the GraphicsDrivers registry key

The registry window will open.
In the left pane, navigate in the tree to the GraphicsDrivers key by going into: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers

Be sure to stay on “GraphicsDrivers” and to not click on the Registry keys below before going through the next steps.

4 - Add or Edit the TdrDelay value

If the TdrDelay value doesn’t exist yet , right-click in the right pane and choose New > DWORD (32bit) Value . Name it " TdrDelay ". The case is important, be sure to follow it (and check that there are no other characters such as trailing space).

In the right pane , double click on the value TdrDelay . Change the Base setting to Decimal . Set the value to something else than the default 2 (we recommend 60 ).

This value indicates in seconds how long the operating system will wait before considering that the GPU is unresponsive during a computation.

5 - Add or Edit the TdrDdiDelay value

If the TdrDdiDelay value does not exist , right-click in the right pane and choose New > DWORD (32bit) Value . name it " TdrDdiDelay ". The case if important, be sure to follow it (and check that there are no other characters such as spaces).

In the right pane , double click on the value TdrDdiDelay . Change the Base setting to Decimal . Set the value to something else than the default 5 (we recommend 60 ).

This value indicates in seconds how long the operating system will wait before considering that a software took too much time to leave the GPU drivers.

Hexadecimal is the default value, simply switch to decimal to display the right value. Note that 3C (Hexadecimal) equals to 60 (Decimal).

6 - Finish and Restart

Close the Registry editor. Restart the computer by using Start then Restart .

The TdrValue is only looked at when the computer start, so to force a refresh a reboot is necessary.

I hope this info help you aswel. Values bigger than 60 are possible since they represent the amount of seconds of delay, so you can try 90 or even 120 there.

1 Like

Tried that. It still doesn’t work :frowning:

There are some reports around that NVidia card users are able to get rid of this particular issue by installing the NVidia Studio Driver instead of the Game Ready Driver. While I was not experiencing the issue on one machine, definitely the Studio driver reduced the amount of engine crashes by a lot.

It didn’t work. Thank you for the suggestion!

The crash happens:
• Only in FULLSCREEN.
• Only in earlier versions (I think from 4.26.1, anyway I’m sure with 4.23 it doesn’t happen).
• Only if the integrated GPU (Intel(R) HD graphics 630) is active.
• When Unreal creates a UI (for example: clicking with the right mouse button on the content creator, overlying the cursor on a level/mesh/anything in content creator/modes/word outliner…).

Some people claim they solved it by reinstalling Windows or changing the Windows version because it happens only in Windows 10. So another condition could be:
• Only in Windows 10 devices.

I’m gonna create a new topic I guess, thank you again for your time.

I’ve seen the “device lost” problem for two reasons:

  1. Because of the “MPO” (mis)feature in the NVIDIA graphics drivers. There’s a registry file you can load to fix this, if it’s the reason. (Typically, this will make overlay windows and menus turn black a while before you’d get a device lost problem)
    After updating to NVIDIA Game Ready Driver 461.09 or newer, some desktop apps may flicker or stutter when resizing the window on some PC configurations | NVIDIA

  2. Because of some hardware problem in CPU / Motherboard / Power supply / Graphics card. For me, upgrading the power supply to be significantly more than “should be enough,” and then moving the graphics card one slot away from where it was, solved the repeated problems.

2 Likes

WOW, thank you so much. After literally hours (in more days) I finally got the solution.

I’m going to create an article on my website so that nobody will lose as much time as I did with non-working solutions (if they even find one, because you’re the first pointing out this). Thank you again!

What do you mean by moving the graphics card one slot away from where it was ? Make sure the gpu is still placed on a pcie X16 for full performance.

Yes, my motherboard luckily has several PCI-Ex x16 slots, I moved my card from slot 1 to slot 2 and it worked well there, when it hadn’t in slot 1.

But even so, if you had the choice of “PCI-Ex x8 and it works, or PCI-Ex x16 and it crashes,” I think you would be less unhappy with the the working x8.

Also: The PC-Ex transfer rate really isn’t the limiting factor for many things we do – VRAM is so much faster anyway, that if you’re PCI-Ex limited, you’ll probably need to tune that anyway :slight_smile:

1 Like

same here

For anyone having this issue or experiencing of getting an “Unhandled Exception: EXCEPTION_ACCESS_VIOLATION” when using DirectX 12. I found the fix that works for me:
On windows desktop, right-click, Display Settings, Graphics Settings, Choose an app to set preferences, Browse, select UE4Editor.exe (mine is at C:\Program Files\Epic Games\UE_4.27\Engine\Binaries\Win64) then select Power saving.
This works for me and I hope it will work for everyone.

2 Likes

I had this issue with a RTX 3080 Nvidia Card on the Razer 15"

This issue was plaguing me for a long time. Ultimately, I solved the problem by installing the latest Studio Driver for NVIDIA through GeForce Experience

And then following this Registry Edit:

https://nvidia.custhelp.com/app/answers/detail/a_id/5157/~/after-updating-to-nvidia-game-ready-driver-461.09-or-newer%2C-some-desktop-apps

Try some of the things mentioned here: Unreal Engine is exiting due to D3D device being lost.

Like others have mentioned, install the Studio Driver for NVIDIA using GeForce Experience instead of the Game Ready driver. Then you do need to update the registry like mentioned above only 60s isn’t good enough for me and increased to 120s. Make sure to restart your computer after installing the Studio Driver.

thanks!!!

oh i m working it !! again

I have the same problem and I tried all the same as you. i need help