UE4 crash D3D device being lost

Hi there, I’m Celine and I am a game art student. At school we use UE4 a lot and I recently had a group project where we had to create a small game in UE4. During this period I’ve experienced a lot of issues on my laptop with Unreal Engine until the point it was basically unusable for me.

While opening any project in Unreal Engine 4, when the project has opened and loaded, it crashes the moment I try to do something. My laptop freezes and I get a black screen for a few seconds and then I get the crash report.

This is the error I get: Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Windows/D3D11RHI/Private/D3D11Util.cpp] [Line: 198] Unreal Engine is exiting due to D3D device being lost. (Error: 0x0 - ‘S_OK’)

I looked this up of course and have tried about everything I can find on the internet. Teachers and programmers have also tried to help me but nothing seems to work.

I updated my drivers, did a clean install, I set the 3D settings to my NVIDIA high performance processor, specifically selected UE4 to use my NVIDIA high performance processor in the control panel, I’ve tried to change my windows graphics settings and set UE4 to preferred high performance, a programmer wrote a piece of code in some Unreal Engine file that should force my laptop to use my NVIDIA graphics card, but nothing of this has worked. I’ve tried other UE4 versions, I know UE 4.24 worked perfectly for me, but the same issue occurs when using EU 4.25. I’ve tried UE5 as well and it seems to work.

The only thing I can do is disabling my intel graphics so my laptop is forced to use my NVIDIA graphics card, but when I do that, my laptop becomes really slow and then I still can’t work in Unreal Engine, and my HDMI port is connected to my intel graphics, so I can’t use my second screen anymore. I know the issue lies with making my laptop use my NVIDA graphics card instead of the intel graphics because I can see in the task manager which GPU engine it’s using. As soon as I try something in Unreal Engine it switches over to my intel graphics and then the software crashes.

My laptop is a bit old (about 3 years now I think), but I can’t find anywhere on the internet my laptop isn’t good enough to run UE4.

I have a Lenovo Legion Y520
GPU: NVIDIA GeForce GTX 1050 2 GB
CPU: Intel(R) Core™ i7-7700HQ CPU @ 2.80GHz
Memory: SK Hynix 16.0 GB

I don’t really know what you need to know about my laptop, I hope this is enough
Does someone know how I can fix this issue?

Thank you in advance!

Celine