0x887A0005

Fix DirectX Error 0x887A0005 in Hogwarts Legacy on Windows 11

DirectX error 0x887A0005 pops up in Hogwarts Legacy when your GPU driver or DirectX 12 gets out of sync. Here's the fix that actually works.

You're about twenty minutes into Hogwarts Legacy—rendering the Great Hall—when the screen freezes, the sound stutters, and the game kicks you to the desktop with a pop-up: DirectX Error 0x887A0005 (DXGI_ERROR_DEVICE_REMOVED). This usually happens right after a cutscene or when you fast-travel, not during the quiet moments. The error means your GPU stopped responding to DirectX 12's commands, and the driver either reset or crashed.

The root cause is almost always a driver that's outdated or unstable for this specific game. Hogwarts Legacy is heavy on DirectX 12 features like ray tracing and mesh shaders, and if your driver isn't built for that, the GPU will choke and disconnect. Other culprits: overclocking (GPU or RAM), Windows 11's Hardware-Accelerated GPU Scheduling, or a corrupted DirectX shader cache. But nine times out of ten, it's the driver.

Here's the fix—follow these in order. Don't skip ahead; they build on each other.

Step 1: Update Your GPU Driver (The Real Fix)

If you're on an NVIDIA card (GTX 10-series or newer), or an AMD card (RX 5000 or newer), you need the latest Game Ready driver. As of this writing, NVIDIA's 546.01 or newer and AMD's Adrenalin 23.11.1 or newer have the official Hogwarts Legacy optimizations.

  1. Press Win + I to open Settings, then go to Windows Update > Advanced options > Optional updates. Check for any driver updates listed there—install them if you see any.
  2. Now go directly to the manufacturer's site. Don't use Windows Update alone; it's often months behind.
    • NVIDIA: nvidia.com/drivers — use the auto-detect tool, or manually select your card model and download the latest Game Ready driver.
    • AMD: amd.com/en/support — same deal, auto-detect or pick your model.
  3. Once the driver downloads, run the installer. Choose Custom Installation and check the box for Clean Installation (NVIDIA) or Factory Reset (AMD). This wipes out old driver remnants that can cause conflicts.
  4. Let it finish and reboot your PC. After rebooting, you should see your desktop at the same resolution as before—if not, that's a sign the install went sideways.

Launch Hogwarts Legacy. The error should be gone. If not, move to Step 2.

Step 2: Turn Off Hardware-Accelerated GPU Scheduling (Windows 11 Only)

This Windows 11 feature can interfere with DirectX 12 games, especially if your GPU is older or your VRAM is tight. Disabling it is harmless and can stop the device-removed error cold.

  1. Press Win + I, go to System > Display.
  2. Scroll down and click Graphics.
  3. Under Default settings, click Change default graphics settings.
  4. Toggle Hardware-accelerated GPU scheduling to Off.
  5. Restart your PC. After restart, your screen might flicker once—that's normal.

Try the game again. Still crashing? Step 3 is your next bet.

Step 3: Clear the DirectX Shader Cache

Corrupted shader cache files are a common trigger for this exact error. Clearing them forces DirectX to rebuild them fresh, which sounds scary but takes just a few seconds.

  1. Press Win + R, type %LOCALAPPDATA%\D3DSCache, and hit Enter.
  2. Select everything inside that folder (Ctrl+A) and delete it. You might get a “file in use” message—just skip those files for now.
  3. Also clear the NVIDIA or AMD cache:
    • NVIDIA: %LOCALAPPDATA%\NVIDIA\DXCache — delete contents too.
    • AMD: %LOCALAPPDATA%\AMD\DxCache — same thing.
  4. Restart your PC, then launch the game. You'll notice a longer loading screen on the first run—that's the shaders rebuilding.

Step 4: Verify Game Files (If You're on Steam or Epic)

Sometimes the game's own files get corrupted, not just the driver. Verifying picks up any missing or broken files.

  1. Steam: Right-click Hogwarts Legacy in your library > Properties > Installed Files > Verify integrity of game files.
  2. Epic Games: Click the three dots next to the game > Manage > Verify.
  3. Wait for it to finish—this can take 10-15 minutes. You'll see a progress bar, and it'll say “100%” when done.

Step 5: Remove Any Overclock

If you've overclocked your GPU (or RAM), even a stable overclock elsewhere can cause this error in Hogwarts Legacy because it's so GPU-intensive. Set everything back to stock clocks, at least temporarily, and test.

  • If you use MSI Afterburner, reset the core and memory clocks to defaults.
  • If you have XMP/EXPO enabled for RAM, you can leave it—that rarely causes this. But if you're desperate, try disabling it to see.

After reverting, test the game. If it works, your overclock was too aggressive for this title.

Still Failing? Here's What to Check Next

If you've done all the above and the error persists, you're dealing with one of two things: a hardware issue or a deeper Windows problem.

  • Check your GPU temperatures. If the card hits 90°C or higher under load, it can trigger a device removal. Clean your fans, reapply thermal paste if you're comfortable, or lower in-game graphics settings.
  • Run a memory test. Faulty RAM can cause DXGI_ERROR_DEVICE_REMOVED. Type mdsched.exe in the Run box (Win+R) and let it restart and test. It takes about 20 minutes.
  • Reinstall the game completely. Uninstall, delete the game folder (Steam: steamapps\common\Hogwarts Legacy), and reinstall. It's a 100+ GB download, but if shader caches are persistently corrupt, this is the last resort.
  • Run Windows Update fully. Make sure you're on the latest Windows 11 23H2 patch. Go to Settings > Windows Update and check for updates—install everything, including optional driver updates.

I've seen this error drive people crazy, but I've also seen it vanish completely after a clean driver install. That's your best bet. If you're still stuck after all this, the problem is likely hardware—your GPU might be dying, or you have an unstable power supply. Don't replace anything yet; run the memory test and check temps first.

Related Errors in Software – Games & Drivers
BLZBNTAGT00000BB8 Fix Battle.net Error BLZBNTAGT00000BB8: Agent Won't Start 0x887A0005 Fix DirectX Error 0x887A0005 in Games on Windows 10/11 0x887A0006 Fix "DirectX 11 Error 0x887A0006" in BF2042 0xC0000005 Fix RTX 3080 Driver Crash in Diablo IV (0xC0000005)

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.