Fix 'D3D Error (0x887A0005)' in Games
DirectX device hung or crashed usually due to unstable GPU overclock, overheating, or corrupted drivers. Quick fix: reset GPU clocks and reinstall drivers.
Quick answer
Reset your GPU to stock clocks, reinstall DirectX runtime, and run sfc /scannow in an admin command prompt. 90% of the time that kills it.
Why this happens
This error appears when your GPU driver tells Windows it can't finish rendering a frame in time — Windows then kills the driver to stop the system from freezing. The official code is DXGI_ERROR_DEVICE_HUNG. Happens most often in newer games like Cyberpunk 2077, Starfield, or Call of Duty: Modern Warfare III. The top three causes are:
- Unstable GPU overclock or undervolt
- Corrupted or outdated graphics driver
- Overheating GPU (hitting 85°C+ under load)
Don't bother with Windows Game Mode toggles or random registry edits — they rarely fix the root cause.
Fix steps (in order of likelihood)
- Reset GPU clocks. Open MSI Afterburner or your GPU tuning tool. Hit the 'Reset' button. If you're on an NVIDIA card with Auto OC, disable it in GeForce Experience. For AMD, turn off Radeon Chill and any overclock in Adrenalin. Reboot.
- Clean reinstall the graphics driver. Download DDU (Display Driver Uninstaller) from Guru3D. Boot into Safe Mode, run DDU, select 'Clean and restart'. Then install the latest driver from NVIDIA or AMD — not the one Windows Update pushes. Reboot again.
- Check GPU temps. Run a stress test like FurMark or Unigine Heaven for 10 minutes. If your GPU hits 90°C or higher, clean the dust out of your case, check fan curves, and make sure your case has airflow. Thermal paste replacement may be needed if it's 3+ years old.
- Increase TDR timeout. This is a registry tweak as a last resort. Open Regedit, go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers. Create a DWORD (32-bit) namedTdrDelay. Set value to8(decimal). This gives the driver 8 seconds to respond instead of 2. Reboot. Note: this only masks the problem — if the fix helps, still look for the real cause above. - Verify game files. In Steam, right-click game > Properties > Installed Files > Verify integrity. For Battle.net or Xbox app, use their repair tools. This catches corrupted shader caches or game assets.
Alternative fixes if the main one fails
- Disable real-time protection in Windows Defender temporarily — some game anti-cheats (EAC, BattlEye) conflict with it and cause timeouts.
- Switch from DirectX 12 to DirectX 11 in the game's graphics settings. Many games let you change this in the launcher or config file. DirectX 11 is more forgiving on older or unstable hardware.
- Run the game in windowed fullscreen mode — some GPUs handle borderless windowed better than exclusive fullscreen.
- Update your motherboard chipset drivers — especially if you're on an AMD system. The chipset driver controls PCIe lane stability. Grab it from your board vendor's site, not Windows Update.
Prevention tip
Once you've fixed it, here's how to keep it from coming back: stop chasing max overclocks for daily use. Run your GPU at stock or a mild undervolt — you lose 2-3% FPS but gain months of stability. Also update drivers once a quarter unless a game specifically requires a newer one. And for heaven's sake, don't install beta drivers on your gaming rig.
Was this solution helpful?