Fix macOS Kernel Panic: Your computer restarted because of a problem

intermediate๐ŸŽ macOS2026-03-19| macOS 12 Monterey, macOS 13 Ventura, macOS 14 Sonoma โ€” Intel and Apple Silicon Macs

Error Message

Your computer restarted because of a problem. Press a key or wait a few seconds to continue starting up.
#macos#kernel-panic#crash#restart

TL;DR

That gray screen saying "Your computer restarted because of a problem" means your Mac just kernel panicked โ€” a hard crash at the OS level. It can happen once and never again, or loop every few hours. Here's the fastest path through it:

  • Read the panic log to identify the culprit.
  • Remove recently installed kernel extensions (kexts) or third-party drivers.
  • Run Apple Diagnostics to rule out a hardware problem.
  • Reset NVRAM/SMC if software checks turn up nothing.

Read the Panic Log First

macOS saves a detailed crash report every time it kernel panics. That log names the culprit directly โ€” skipping it means guessing blind.

# View the most recent kernel panic log
ls -lt /Library/Logs/DiagnosticReports/ | grep panic | head -5
cat /Library/Logs/DiagnosticReports/<latest>.panic

Prefer a GUI? Open Console.app, go to Crash Reports, and filter by Kernel.

You're looking for something like this in the backtrace:

Backtrace (CPU 2), Frame : Return Address
  0xffffff8... : SomeThirdPartyKext + 0x1234

Kernel Extensions in backtrace:
   com.somevendor.driver.usb(1.2.3)

A third-party kext name in the backtrace is almost always the direct cause. Note the vendor name โ€” you'll need it in the next step.

Common Causes and Fixes

1. Third-Party Kernel Extensions (Most Common)

Tools like Paragon NTFS, older VPN clients (Cisco AnyConnect is a frequent offender), antivirus software, and USB audio interface drivers all inject code at the kernel level. One incompatible version after a macOS update is all it takes to start the crash loop.

# List all loaded third-party kexts
kextstat | grep -v com.apple

To remove the suspicious one:

# Locate it
sudo find /Library/Extensions /System/Library/Extensions -name "*.kext" | grep -i <vendorname>

# Remove it
sudo rm -rf /Library/Extensions/SomeVendor.kext

# Rebuild kext cache
sudo kextcache -i /

Reboot. If the panics stop, you found it.

2. Faulty RAM

No kext in the backtrace and the crashes seem totally random? Suspect RAM โ€” especially if you recently upgraded memory, or if the machine is several years old and the sticks have never been tested.

# From Recovery Mode (Cmd+R on boot), open Terminal:
memtest 4g 2   # Tests 4 GB over 2 passes (requires third-party memtest)

Apple Diagnostics is easier and built-in. For Intel Macs:

  • Shut down completely.
  • Power on and immediately hold D.
  • Let the test run โ€” memory failures show as error codes like MEM001 or MEM004.

Apple Silicon: hold the power button until startup options appear, then press Cmd+D.

3. Overheating

Panics that only happen under heavy load โ€” video rendering, gaming, long compilation runs โ€” are often thermal. The CPU hits 100ยฐC and the system crashes rather than letting the chip cook.

# Install via Homebrew
brew install osx-cpu-temp
osx-cpu-temp

# Or use the built-in powermetrics (requires sudo)
sudo powermetrics --samplers smc -n 1 | grep -i temp

Sustained temps above 95ยฐC during moderate workloads signal a problem. On older MacBooks, clogged fan vents or dried-out thermal paste are the usual suspects. A can of compressed air through the vents costs around $8 and takes two minutes.

4. Corrupted System Files or a Bad macOS Update

A failed update or a corrupted volume can leave the system in a half-broken state. Run First Aid from Recovery to check:

# Restart โ†’ hold Cmd+R โ†’ Disk Utility โ†’ select Macintosh HD โ†’ First Aid

# Or from Terminal in Recovery:
diskutil repairVolume /

If Disk Utility reports errors it can't repair, a non-destructive macOS reinstall will replace system files without touching your data.

5. Reset NVRAM and SMC

NVRAM holds boot configuration; SMC controls power and hardware behavior. Corrupted values in either can cause crashes that look completely unrelated to any driver or app.

Reset NVRAM (Intel Macs):

# Power on and immediately hold:
Option + Cmd + P + R
# Keep holding ~20 seconds โ€” release after the startup chime plays twice

Reset SMC (Intel MacBook with T2 chip):

# Shut down, then hold all four keys simultaneously for 10 seconds:
Shift + Control + Option + Power
# Release, wait 5 seconds, power on normally

Apple Silicon: No manual step needed. NVRAM and SMC reset automatically on reboot.

6. Isolate a Peripheral or Specific App

Do the panics follow a pattern โ€” only when a USB hub is plugged in, or always when Zoom is screen-sharing? That's a lead worth chasing.

# Safe Mode loads only Apple-signed kexts
# Intel: hold Shift during startup
# Apple Silicon: hold power button โ†’ startup options โ†’ Shift+click "Continue in Safe Mode"

Stable in Safe Mode? A third-party kext is causing it. Start disconnecting peripherals one by one and reinstalling in Safe Mode to narrow it down.

Verify the Fix

Don't declare victory too early. Let the machine run a normal workload for a full day, then check whether panic logs have stopped accumulating:

# Count existing panic logs (should stop growing)
ls /Library/Logs/DiagnosticReports/*.panic | wc -l

# Check uptime โ€” longer is better
uptime

No new panic files and an uptime measured in hours? The fix held.

Still Crashing?

You've covered the software side. At this point the problem is likely physical.

  • Reinstall macOS from Recovery โ€” non-destructive, keeps your data, replaces all system files.
  • Book an Apple Genius Bar appointment. Logic board faults, failing GPU silicon, and RAM soldered to the board aren't fixable with Terminal commands.
  • Check whether your model is covered under an Apple repair program โ€” certain kernel panic patterns on specific models, like some 2019 MacBook Pros, qualified for free repair.

Related Error Notes