Frequently Asked Question
If your Mac restarts unexpectedly, or freezes and becomes unresponsive, an error known as a “kernel panic” occurred. After the restart, you’ll see a message that your computer restarted because of a problem. The most likely cause is faulty software. A kernel panic can also be caused by damaged or incompatible hardware, including external devices attached to your Mac.
If the kernel panic is caused by a known problem, the faulty software is identified. To make sure that this software doesn’t continue to cause kernel panics, move it to the Trash. If the faulty software is not identified and your Mac continues to experience kernel panics, follow the troubleshooting steps below.
1. Restart your computer in safe mode. Once you're logged in, click the apple logo at the top left of the screen and select software update. Download and install any updates available.
2. Uninstall any plug-ins or other enhancement software from manufacturers other than Apple. If you recently updated macOS or an app, plug-ins and other software that worked in the past may no longer be compatible. Read the manufacturer’s documentation (including Read Me notes) to be sure the software is compatible with your version of macOS.
3. Disconnect all USB and FireWire devices, except for the Apple keyboard and mouse. Remove hardware upgrades from other manufacturers, such as random–access memory (RAM) and Peripheral Component Interconnect cards. Then try restarting your Mac. If this resolves the issue, reconnect one device at a time, restarting your Mac after reconnecting each one, until you determine which device is causing the problem.
4. Use Apple Diagnostic to test your Mac. (This app can tell you if hardware you installed, such as additional memory, is incompatible, improperly installed, or defective.) To do this, disconnect all external devices except keyboard, mouse, display, Ethernet connection. Make sure you are connected to the internet prior to this test.
5. If none of these steps work, try reinstalling your operating system. (NOTE: USE TIME MACHINE TO BACK UP YOUR COMPUTER BEFORE TRYING THIS.)
If none of these solutions resolve the issue, take your computer in to your local Apple Store for assistance. If you have Apple Care, their service will most likely be free.
reference: https://support.apple.com/guide/mac-help/if-your-mac-restarts-and-a-message-appears-mchlp2890/mac#:~:text=If%20your%20Mac%20restarts%20unexpectedly,devices%20attached%20to%20your%20Mac.