The short explanation

A kernel panic is macOS' equivalent of a Windows blue screen: the core of the operating system hit an error it couldn't recover from, so the Mac restarts and shows “Your computer restarted because of a problem”.

Kernel extensions from third-party software, peripherals, outdated macOS and, less often, faulty RAM or hardware are the usual causes. The panic report names the component involved.

Signs of the problem

  • The screen dims and a message says the computer restarted because of a problem.
  • Repeated restarts, sometimes in a loop, with a panic report offered afterwards.
  • Panics cluster around a specific action: sleep, connecting a dock, launching an app.

Common causes

  • Third-party kernel or system extensions (VPN, antivirus, virtualization, audio drivers).
  • Faulty RAM or a failing external device or hub.
  • A corrupt system volume or an interrupted macOS update.
  • Incompatible or outdated software after a macOS upgrade.

Fixes to try, in order

  1. Unplug every non-essential peripheral, then start in Safe Mode (Intel: hold Shift at boot; Apple silicon: hold the power button until startup options appear, select your startup disk, then hold Shift and click Continue in Safe Mode).
  2. Remove third-party kernel/system extensions and outdated drivers, and update the apps that install them; check System Settings → General → Login Items & Extensions.
  3. Run Apple Diagnostics (Intel: hold D at boot; Apple silicon: hold the power button until startup options appear, release it, then press and hold Command-D) and, if panics persist, reinstall macOS from Recovery.

Command

log show --predicate 'eventMessage contains "panic"' --last 1d

Run in Terminal after a panic to view the recent panic log and any driver names it references.

How to tell it worked: The Mac runs normally in and out of sleep for a full day with all your usual devices connected.

Prevent it from coming back

Keep macOS and low-level utilities updated, and remove kernel extensions you no longer use before major upgrades.