Applies To
Windows 11 Windows 10

Windows 11 might shut down or restart unexpectedly when a serious problem occurs, causing you to briefly see an error message, such as “Your device ran into a problem and needs to restart.” Windows 11 will then restart automatically. This is also known as a stop code error, a bug check, a kernel error, or a Blue Screen error, or a Black Screen error, or BSOD.

Note:  For blank screen, often referred to as a “black screen” due to its appearance, without a stop error code or with a cursor on it, see Troubleshooting blank screens in Windows.

An unexpected restart might be caused by a hardware device, its driver, or software. To help determine the cause of the problem, a stop code, such as PAGE_FAULT_IN_NONPAGED_AREA or MEMORY_MANAGEMENT will appear at the bottom of the screen, and if available, the module name of the code that was being executed at the time the problem occurred.

The screen color and messaging for a stop code error can vary, depending on which version of Windows 11 you are running.

Windows 11, version 24H2 and later:

Screenshot of a unexpected error showing a black screen

Windows 11, version 23H2 and older:

Screenshot of Stop code error in Windows 10​​​​​​​

Basic troubleshooting steps for Windows 11 blue screens, black screens and stop code errors

​​​​​​​In most cases when Windows 11 restarts unexpectedly, the problem is resolved by the restart and no further action is needed. However, if Windows 11 restarts frequently due to the same stop code error, try these basic troubleshooting steps to resolve the issue: 

  1. Remove any new hardware. If you added new hardware to your PC before the error, shut down your PC, remove the hardware, and try restarting.

  2. Start your PC in safe mode.  If you're having trouble restarting, you can start your PC in safe mode. See Start your PC in safe mode in Windows 11 for details. From safe mode, you can try the remaining troubleshooting steps.

  3. Check the Device Manager.  Right-click the Start button and select Device Manager.  Check to see if any devices are marked with the exclamation point (!). Right-click the device and select Update driver.  If updating the driver doesn’t help, try disabling or uninstalling the device.

  4. Check for sufficient free space on the hard drive.  The operating system and some applications require sufficient free space to create swap files and perform other functions. Based on the system configuration, the exact requirement varies, but it's a good idea to have 10% to 15% of free space available.

  5. Install the latest Windows 11 Updates. To check for updates, select Start > Settings > Windows Update , then select Check for updates

  6. Restore Windows 11.  If none of these steps help, try restoring Windows 11 using a system restore point, or one of the other options listed at Recovery options in Windows 11.  Choose the recovery option that most closely matches your scenario.

If you are an IT professional or an advanced user, you can try Advanced troubleshooting steps for Windows blue screens, black screens and stop code errors.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.