How to Fix “Your Computer Restarted Because of a Problem” in macOS

The alarming startup screen alert “Your computer restarted because of a problem” in macOS signifies that the Mac’s XNU operating system kernel encountered an unrecoverable exception known as a kernel panic. When critical core components or low-level kernel extensions (kexts) execute an illegal instruction, macOS immediately reboots the hardware to prevent data corruption. While an isolated kernel panic is relatively harmless, recurring restarts upon wake or during normal use indicate problematic third-party kernel extensions, conflicting peripheral hardware, or failing hardware memory modules. Resolving this issue involves inspecting crash panic logs, booting into Safe Mode, and running Apple Diagnostics.

Understanding Why macOS Experiences Kernel Panics

In macOS architecture, the kernel manages memory allocation, CPU thread scheduling, and hardware drivers. Unlike user-space applications (which simply quit when they crash), software running within kernel space has unrestricted access to hardware registers. If a kernel-level driver attempts an invalid memory read, encounters a watchdog timeout, or suffers a CPU register exception, the entire operating system halts.

Common triggers of macOS kernel panics include:

  • Incompatible Third-Party Kernel Extensions: Legacy system extensions from outdated antivirus programs, virtualization software (VirtualBox), or audio drivers. For related startup freezes, see our guide on fixing Mac stuck on Apple logo with loading bar.
  • Faulty Peripheral Hardware and Docks: Defective USB hubs, Thunderbolt docks, external graphics enclosures, or bus-powered external drives causing electrical sleep/wake panics.
  • Memory Leaks and Virtual Memory Pressure: Kernel memory exhaustion leading to unexpected crashes. (Explore our guide on fixing system ran out of application memory on Mac).
  • Corrupted NVRAM / PRAM Parameters: Stale hardware configuration flags trapped in non-volatile memory on Intel Macs.
Panic Cause Technical Origin Key Diagnostic Step
Third-Party Kext Driver executing illegal kernel memory call Boot into Safe Mode (disables non-Apple kexts)
External Accessory Thunderbolt / USB bus voltage drop or I/O timeout Disconnect all peripherals and test wake cycles
Corrupted Cache Stale dyld or kernel extension boot cache Perform Safe Mode boot to flush system caches
Hardware Failure Defective RAM solder joint or logic board component Execute Apple Diagnostics hardware test

Step 1: Inspect the Kernel Panic Crash Log

When macOS reboots after a panic, it generates a detailed diagnostic report. Rather than clicking past it, examine the text to identify the offending component:

  1. When the prompt appears asking to send a report to Apple, click Report….
  2. Scroll through the technical report text.
  3. Look for the line starting with panic(cpu ... caller ...): or Kernel Extensions in backtrace:.
  4. Scan the backtrace for third-party identifiers (such as com.symantec, org.virtualbox, or com.avast).
  5. If an extension is cited, uninstalling the associated software package will permanently resolve the panic.

Step 2: Disconnect All Peripheral Devices

External accessories—especially multi-port USB-C hubs, external monitors, and unpowered storage drives—frequently trigger sleep/wake kernel panics (Sleep transition timed out).

  1. Disconnect all external peripherals from your Mac: USB drives, displays, docks, audio interfaces, and SD cards. Leave only the official Apple power adapter connected.
  2. Restart your Mac.
  3. Test your machine under normal workloads for several hours.
  4. If no panics occur, reconnect your peripherals one by one to identify which hardware accessory or cable is triggering the bus lockup.

Step 3: Boot into Safe Mode to Flush Kernel Caches

Safe Mode prevents third-party kernel extensions and startup items from loading while automatically running a directory check and purging system font and kernel caches.

On Apple Silicon Macs (M1, M2, M3, M4)

  1. Shut down your Mac completely.
  2. Press and hold the Power button (Touch ID) until you see “Loading startup options”.
  3. Select your startup disk (e.g., Macintosh HD).
  4. Press and hold the Shift key, then click Continue in Safe Mode.
  5. Release the Shift key and log in. (You will see “Safe Boot” in red in the top-right menu bar).

On Intel-Based Macs

  1. Turn on or restart your Mac and immediately press and hold the Shift key.
  2. Release the key when the login window appears.

Use your Mac in Safe Mode for 15 minutes, then restart normally. The automatic cache purge performed during Safe Boot resolves many transient kernel crashes.

Step 4: Reset NVRAM / PRAM and SMC (Intel Macs Only)

On Intel-based Mac models, corrupt hardware state flags stored in NVRAM can cause persistent boot panics. (Apple Silicon Macs handle these checks automatically during reboot).

  1. Shut down your Intel Mac.
  2. Turn it on and immediately press and hold Option + Command + P + R simultaneously.
  3. Keep holding the keys for approximately 20 seconds until you hear the startup chime a second time (or until the Apple logo appears and disappears twice).
  4. Release the keys and allow the Mac to boot normally.

Step 5: Run Apple Diagnostics to Check Hardware Health

If kernel panics persist in clean software states, running Apple Diagnostics tests internal components (RAM, CPU, and logic board sensors) for physical faults.

  1. Disconnect all external peripherals except power.
  2. Place your Mac on a hard, flat, well-ventilated surface.
  3. On Apple Silicon: Power on the Mac and hold the Power button until startup options appear, then press Command + D.
  4. On Intel Macs: Power on the Mac and immediately press and hold the D key until the language selection screen appears.
  5. Apple Diagnostics will run a comprehensive hardware test:
    • If it returns code ADP000: No hardware issues were detected.
    • If it returns memory error codes (e.g., PPM001-PPM004): Physical RAM failure is present, requiring service from Apple Support.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.