0xc000021a

Windows Logon UI stuck or crashes after update

Windows Errors Intermediate 👁 9 views 📅 Jun 25, 2026

Your login screen freezes or shows a black screen after a Windows update. It's usually a corrupted system file or a bad driver. Here's how to fix it quickly.

Quick answer: Boot into Safe Mode with Networking, open Command Prompt as admin, run sfc /scannow then DISM /Online /Cleanup-Image /RestoreHealth, and restart. If that fails, use System Restore from the recovery environment.

Why this happens

I know this error is infuriating. You press the power button, see the spinning dots, then nothing. Black screen. Or the login box loads but clicking anything does nothing. This tripped me up the first time too when I ran a help desk blog years ago. It's almost always a bad Windows update that corrupts the logonui.exe file or its dependencies. Other times, it's a graphics driver update that crashes the interface. The error code 0xc000021a specifically means the system file checker found a mismatch and Windows can't load the logon process.

Fix steps

  1. Force a restart 3 times — Yes, this works sometimes. Hold the power button until shutdown, start it, and when you see the spinning dots, hold power again. Do this 3 times. The 4th boot should show "Preparing Automatic Repair". Let it run. This gets you into the recovery environment.
  2. Boot into Safe Mode — From the recovery screen, go to Troubleshoot > Advanced Options > Startup Settings > Restart. On the menu, press 4 or F4 for Safe Mode. If you see the login screen here, your problem is software, not hardware.
  3. Run SFC scan — Once in Safe Mode, open Command Prompt as admin. Type sfc /scannow and hit Enter. Let it finish. It will find and fix corrupted files related to logonui. This alone fixes maybe 60% of cases.
  4. Run DISM — If SFC finds errors it can't fix, or if the problem persists, run DISM /Online /Cleanup-Image /RestoreHealth. This pulls fresh system files from Windows Update. Make sure you're connected to the internet in Safe Mode with Networking.
  5. Remove recent updates — Still stuck? From Safe Mode, go to Settings > Update & Security > Windows Update > View update history > Uninstall updates. Remove the most recent one from this month. Reboot normally.
  6. Disable fast startup — Fast startup can corrupt the logon process. In Safe Mode, open Control Panel, search "Power Options", click "Choose what the power buttons do", then "Change settings that are currently unavailable". Uncheck "Turn on fast startup". Save and reboot.

Alternative fixes if the main one fails

Sometimes the steps above don't work because the corruption is deeper. Try these:

  • System Restore — Boot from a Windows installation USB, select Repair your computer > Troubleshoot > System Restore. Pick a restore point from before the problem started. This saved me more times than I can count.
  • Use the registry editor in recovery — If you can boot to command prompt from recovery, navigate to C:\Windows\System32\config and rename the SAM and SOFTWARE files. But honestly, I'd skip this — it's risky and often replaces one headache with another.
  • Reset this PC — Go to Troubleshoot > Reset this PC > Keep my files. This reinstalls Windows but keeps your documents. It takes an hour but works 99% of the time.

Prevention tip

I've been burned by this too many times. Here's what I do now: pause feature updates for 30 days after they release. Big Windows updates (like version 22H2 or 23H2) break things often. Let other people test them first. Also, turn off automatic driver updates via Device Manager — right-click your graphics card, Properties > Driver tab > Driver details, and set it to never update from Windows Update. And always, always keep a System Restore point enabled. Set it to create one before updates. You'll thank me later.

Still stuck? Reply in the comments with your exact Windows version (type winver in Run) and what step failed. I'll help you out.

Was this solution helpful?