How to Fix DirectX Errors in Windows – Full Guide

DirectX errors are among the most frustrating PC problems for gamers and content creators alike. Whether you're seeing DXGI_ERROR_DEVICE_HUNG, a "DirectX function" crash popup, or a missing d3d11.dll message, these errors disrupt your work and gaming experience. DirectX is Microsoft's core API for graphics and multimedia — when something goes wrong with it, games crash, applications freeze, and video playback fails. This guide explains every major DirectX error type and how to resolve each one systematically.

Most Common Causes of DirectX Errors

  • Outdated, corrupted, or incompatible GPU drivers — the #1 cause of DirectX crashes
  • GPU overheating — causes the graphics device to stop responding (TDR event)
  • Unstable GPU overclock — memory or core overclock causes rendering failures
  • Missing or corrupted DirectX DLL files (d3d11.dll, d3d12.dll, dxgi.dll)
  • Outdated Windows — DirectX 12 updates arrive through Windows Update
  • Missing or corrupted Visual C++ Redistributable packages
  • Game file corruption — incomplete installation or failed update
  • Third-party overlays (Discord, MSI Afterburner, RTSS) conflicting with DirectX

How to Fix DirectX Errors – Step by Step

  1. Run the DirectX Diagnostic Tool (dxdiag)Press Win+R, type dxdiag, press Enter. Check the System tab for your DirectX version and the Display tab for any reported errors. Note the GPU driver version and date — if it's more than 6 months old, update it.
  2. Update GPU drivers (clean install)Download the latest driver from nvidia.com or amd.com. During installation, choose "Clean Install" or "Factory Reset" option. If issues persist, download DDU (Display Driver Uninstaller), boot to Safe Mode, run DDU to fully remove old drivers, then install fresh.
  3. Run Windows UpdateDirectX 12 is delivered via Windows Update. Go to Settings → Windows Update → Check for updates. Install all cumulative and optional updates. Restart and test.
  4. Install DirectX End-User Runtime (for legacy DX9/10/11 components)Search "DirectX End-User Runtime Web Installer" on Microsoft's Download Center. Run it — it installs older DirectX components that many games still depend on. This repairs missing d3dx9_XX.dll errors.
  5. Repair Visual C++ RedistributablesOpen Control Panel → Programs → Uninstall a Program. Find all "Microsoft Visual C++ Redistributable" entries, uninstall them all, then download and install the latest x86 and x64 versions from Microsoft's website.
  6. Run sfc /scannow and DISMOpen CMD as Administrator. Run sfc /scannow and wait for completion. Then run DISM /Online /Cleanup-Image /RestoreHealth. Restart. These commands repair corrupted Windows files including DirectX DLLs.
  7. Verify game files and disable overlaysIn Steam, right-click the game → Properties → Local Files → Verify integrity. Disable all overlays: Discord, GeForce Experience, MSI Afterburner, RTSS. Test if the error persists without them.
  8. Check GPU temperatures and remove overclockIf the error occurs under graphics load, use HWiNFO64 to monitor GPU temperatures and MSI Afterburner to reset all clocks to stock. GPU-Z can also help identify if the card is operating at correct voltages.

Most Common DirectX Error Codes

Code / IDError NameSeverity
0x887A0006DXGI_ERROR_DEVICE_HUNGCritical
0x887A0005DXGI_ERROR_DEVICE_REMOVEDCritical
0x887A0007DXGI_ERROR_DEVICE_RESETHigh
0x887A0020DXGI_ERROR_FRAME_STATISTICS_DISJOINTMedium
d3d11.dll missingDirect3D 11 DLL not foundHigh
d3dx9_43.dll missingLegacy DirectX 9 component missingMedium
DirectX Function ErrorGeneric game-reported DirectX crashHigh

Frequently Asked Questions

What causes DXGI_ERROR_DEVICE_HUNG?
DXGI_ERROR_DEVICE_HUNG means the GPU stopped responding to Direct3D commands and the driver reset it. Common causes are GPU overheating, unstable overclock, outdated drivers, or a game-specific bug. Fix by updating GPU drivers, reducing clock speeds, and ensuring proper cooling.
How do I check which version of DirectX I have?
Press Win+R, type dxdiag and press Enter. The DirectX Diagnostic Tool shows your installed version in the System tab. Windows 11 and Windows 10 (version 1903+) include DirectX 12 Ultimate by default.
Can I reinstall DirectX on Windows 10 or 11?
DirectX 12 cannot be reinstalled separately — it's part of Windows. However, you can repair DirectX 9/10/11 components via the DirectX End-User Runtime Web Installer from Microsoft. Running sfc /scannow also repairs any corrupted DirectX DLL files.
Why does my game crash with a DirectX error only?
Game-specific DirectX crashes are usually caused by: (1) outdated or corrupted GPU drivers, (2) GPU overheating, (3) corrupted game files — verify via Steam, or (4) conflicting overlays. Try disabling Discord overlay, RTSS, and MSI Afterburner while testing.