Your PC crashes to a blue screen reading “Your PC ran into a problem and needs to restart,” with the stop code UNEXPECTED_KERNEL_MODE_TRAP underneath, and then it restarts, sometimes straight back into the same crash. When an unexpected kernel mode trap error occurs, it has a Stop Code of 0x0000007F, It indicates that the processor was able to catch an exception but the kernel wasn’t set up to handle. The fastest way to fix it is to think about what changed right before it started, since that points you to the right fix instead of working through every option at once.
What Causes Unexpected Kernel Mode Trap
The kernel mode trap error most often follows one of a few clear triggers: a driver that’s outdated, corrupted, or newly updated, a recently connected external device like a printer, second monitor, USB drive, or Bluetooth accessory conflicting with the system, CPU or RAM overclocking pushed past a stable limit, or faulty RAM itself. Also there have been many instances where corrupted system files, disk errors, and malware crashes can cause the same crash as above. There are also documented instances of the Bluetooth driver causing a Kernel Mode Trap Error even if you made no other changes to your computer.
How to Fix Unexpected Kernel Mode Trap
Fix 1: Disconnect Recently Added External Devices
External hardware conflicts are one of the most commonly reported causes of this error.
1. Shutdown your computer completely.
2. Disconnect everything except your keyboard and mouse, including printers, external monitors, USB drives, and Bluetooth accessories.
3. Restart and use the computer normally for a while to see if it crashes again.
4. If it doesn’t, reconnect devices one at a time to identify which one is causing the conflict.
Bluetooth accessories in particular have been documented as a trigger in some cases, so it’s worth testing with Bluetooth disabled entirely if you use it regularly.
Fix 2: Update or Roll Back Drivers
A problematic driver, especially one tied to your GPU, chipset, or a recently added device, is a frequent cause of this crash.
1. If your computer has crashed and will not allow you access to the desktop to troubleshoot, restart it. During the restart hold the Shift key, and go to Troubleshoot, then Advanced options, then Startup Settings, then Restart, and press 4 for Safe Mode.
2. Once in Windows or Safe Mode, go to the Start button, right-click on it and select Device Manager.
3. Look for any device with a yellow warning icon, right click on the warning icon, and select Update driver.
4. If updating the driver caused the crash, open the device’s properties window, navigate to the Driver Tab, and click on “Roll Back Driver.
If the Device Manager can’t find a working driver, Advanced Driver Updater from Systweak can scan for correct one instead. Open the app and click Start Scan Now. Then click Update Now next to the graphics driver when it shows up or Update All if other drivers show up as well. Restart your computer and check whether you computer is still crashing or not.
Fix 3: Undo Overclocking
Overclocking pushed past what your hardware can sustain is a well-documented cause of this crash.
1. Simply restart your computer and navigate into the BIOS screen using either Del, F2 or Esc at boot time.
2. Select the “Optimized” or “Default” settings from the main BIOS menu.
3. If you overclocked through software instead, open that app and reset your settings to default.
Fix 4: Run Windows Memory Diagnostic
If faulty RAM causes kernel level crash the symptoms are identical to a driver problem.
1. Open Windows Memory Diagnostic by typing “Windows Memory Diagnostic” in your start menu search.
2. Select Restart Now and Check For Problems.
3. When the computer is restarted it will run the diagnostic test automatically.
4. Look at the results when you get back into Windows.
Fix 5: Run SFC and DISM
Corrupted system files can interfere with how Windows manages the graphics driver reset process.
1. Right-click the Start button and open Windows Terminal (Admin).
2. Run: sfc /scannow
3. Once that finishes, run: DISM /Online /Cleanup-Image /RestoreHealth
4. Restart your PC once both complete.
Fix 6: Run CHKDSK
Disk errors can also produce this crash, especially when you are experiencing disk errors alongside your slow file access speed or other odd behavior.
1. Open Command Prompt as administrator.
2. Run: chkdsk C: /f /r
3. Press Y if prompted to schedule the check on next restart, then restart your PC
Fix 7: Check for Windows Updates or Use System Restore
If nothing above resolves the crash, a pending Windows update or a rollback to an earlier state may be needed.
1. Go to Settings, then Windows Update, then check for updates and install anything available.
2. If the computer crashed immediately after updating, go to Update history and uninstall that update instead.
3. After trying both options above if you still have issues, search for “Create a restore point”, and once in System Restore, choose a date before when the problem occurred.
Frequently Asked Questions
The Bottom Line
Unexpected Kernel Mode Trap almost always traces back to a recent change: a new external device, an updated or faulty driver, overclocking, or occasionally RAM or disk issues. Begin by examining what you’ve installed or changed most recently prior to when your system started crashing, and work down the list if the cause isn’t obvious, saving System Restore or a clean install for if nothing else resolves it.