I know that 0xC0000721 blue screen is a nasty surprise—especially when it happens mid-game or right as you're saving a project. The error text mentions a threadpool worker thread entering a callback at one affinity and exiting at another. That's Windows' way of saying: something changed the CPU core affinity and didn't put it back. Let's get you fixed.
The Quick Fix: Update or Roll Back the Suspect Driver
The most common culprit is a driver that calls SetThreadAffinityMask or SetThreadIdealProcessor inside a threadpool callback. When the callback returns, the thread affinity stays changed, and Windows throws this stop code to prevent corruption. The driver that does this is usually a GPU driver, a network adapter driver, or some overclocking utility.
Here's what to do first—this resolves about 80% of cases:
- Boot into Safe Mode (hold Shift while clicking Restart, then go to Troubleshoot > Advanced Options > Startup Settings > Restart, then press 4).
- Open Device Manager (Win+X, then select it).
- Expand Display adapters. Right-click your GPU and select Update driver > Search automatically. If that finds nothing, go to the GPU manufacturer's site (NVIDIA, AMD, Intel) and download the latest driver for your exact model.
- If you recently updated a driver and the error started after that, roll back instead: right-click the device, go to Properties > Driver > Roll Back Driver.
That's the short fix. But if you're still seeing the error, it's time to dig deeper.
Why This Fix Works
Threadpool worker threads in Windows are created with a default affinity—usually all cores. The driver, when it runs, pins the thread to a specific core to align with hardware queues (like network interrupts). That's fine. The problem is when the driver forgets to restore the original affinity mask before returning from the callback. Windows detects this mismatch and throws 0xC0000721 to stop the system from running with a corrupted thread state.
Updating the driver replaces the buggy code. Rolling back undoes a recent change that introduced the bug. Both paths restore proper behavior—the threadpool thread goes back to its default affinity, and the blue screen disappears.
Less Common Variations & Deep Debugging
Sometimes the driver isn't the direct problem. It could be a filter driver or a service that hooks into the threadpool. Here's how to track it down:
- Check the minidump: Use BlueScreenView to open the .dmp file. Look for the line that says
Probably caused by. That names the module. Update, disable, or uninstall that driver. - Disable overclocking software: Tools like MSI Afterburner, EVGA Precision X, or Intel Extreme Tuning Utility can sometimes mess with affinity. Close them completely and see if the error stops.
- Check for third-party services: Run
msconfig, go to the Services tab, checkHide all Microsoft services, and disable non-essential ones. Reboot and test. Re-enable one by one until the error returns—that's your culprit.
A less common but real scenario: the error appears only after waking from sleep or hibernation. That points to a power management driver (like Intel Management Engine or a chipset driver) restoring a thread's affinity incorrectly. Update your chipset drivers from the motherboard manufacturer's site—not just Windows Update.
If you're on an AMD Ryzen system, check for a specific chipset driver update. Ryzen's power management interacts with the scheduler, and an old driver can trigger this exact bug.
Prevention: Keep This From Coming Back
Prevention here isn't about changing your habits—it's about keeping drivers in check. Here's what I do on my own systems:
- Update drivers only from the manufacturer, not from generic driver updater tools. Those tools sometimes pull beta or wrong-version drivers that introduce these bugs.
- Turn off automatic driver updates from Windows Update for critical components like GPU and chipset. Windows Update often lags behind or pushes a bad version. I know it's convenient, but it's caused more headaches than it's saved.
- Before updating any driver, create a restore point (Win+X > System > System Protection). That way, if a driver breaks something, you can roll back in two clicks.
- If you use overclocking tools, make sure they're set to apply affinity settings at startup only, not continuously. Some tools have an option to "lock" affinity—turn that off.
This error is a pain, but it's one of the more straightforward stop codes to fix—it's almost always a driver issue. With the steps above, you'll be back to a stable system. If you've tried all this and still see the error, run sfc /scannow from an elevated command prompt to check system file integrity, and then consider a clean install of your GPU driver using DDU (Display Driver Uninstaller) to wipe out any leftover driver remnants. That's the nuclear option, but it works.
Hope that gets you up and running. Let me know in the comments if you found a different fix—I always like hearing what actually solved it for you.