Power

Mac shutting down or restarting by itself? Here's why — and how to stop it

Short answerA Mac that shuts down on its own is protecting itself from something. It's almost always one of these:
  • Overheating — the Mac cuts power to avoid damage when it gets too hot. The most common cause on laptops.
  • A power problem — a worn-out battery, a bad charger, or a loose connection can drop power without warning.
  • A crash deep in the system — called a kernel panic — forces a restart, usually with a “your computer restarted because of a problem” message.
To tell which, check why it shut down last time: your Mac records a reason. Open Terminal and run pmset -g log | grep -i "shutdown cause" — a negative number means an unexpected shutdown, and the rest of this guide explains each.

One second you're working, the next the screen is black — or the Mac restarts on its own and asks you to reopen everything. It's alarming, and it usually means the Mac stopped itself to avoid harm. The good news: it leaves a record of why, so you don't have to guess.

Below are the causes, most common first — each with what you'd notice, a quick check, and the fix. Work through them by hand, or let Noah read the shutdown and crash logs and tell you which one it is (more at the end).

First, read why it shut down

Your Mac writes down a reason every time it powers off. Reading it points you straight at the cause instead of guessing. Open Terminal (press Space, type Terminal, Return) and run:

zsh — Terminal
% pmset -g log | grep -i "shutdown cause"

Shows the recorded reason for each recent shutdown. Look at the most recent line.

The number is the clue. A positive value like 5 or 3 is a normal or forced shutdown — you held the power button, or the software asked for it. A negative value is an unexpected one the Mac didn't choose: -3 specifically means it overheated, and other negatives point to a power or system fault. That tells you which section below to read.

It's overheating

The Mac was hot and the fans were roaring right before it died; it often happens under heavy load or in a warm room. Shutdown cause -3.

When a Mac can't shed heat fast enough, it powers off to protect the chips inside — a hard safety cutoff. The trigger is trapped heat: blocked vents, a soft surface like a bed or couch, caked-in dust, or one program working the processor flat out.

Fixmove the Mac onto a hard, flat surface with clear vents, get it out of direct sun, and quit whatever was working hardest (open Activity Monitor, sort by % CPU, quit the top item). If it keeps overheating, the deeper fixes are in the overheating guide.

NoahNoah checks the thermal and shutdown logs together, names the process that was cooking the machine, and — with your OK — quits it and clears what was driving the heat up, so the next shutdown doesn't happen.

It's a power or battery problem

It cuts out instantly with no heat and no warning, sometimes only when unplugged, or only at a certain battery level.

An instant power loss usually means the electricity stopped, not the software. On a laptop that's a worn-out battery (one that can't hold the charge it reports), a failing charger, or a bad cable. On a desktop it's the power cord or outlet.

Check the battery's health: open > System Settings > Battery, click the ⓘ next to Battery Health. “Normal” is good; “Service Recommended” means the battery is worn.

Fixon a laptop, try a different charger and outlet — a borrowed known-good charger settles it fast. If Battery Health says Service Recommended and it dies away from the wall, the battery needs replacing. On a desktop, reseat the power cable at both ends.

A crash restarted it (kernel panic)

It restarts rather than staying off, and you see “your computer restarted because of a problem.”

That message is a kernel panic — a crash in the core of macOS itself, serious enough that the safest move is a restart. It's usually caused by a buggy driver, a failing accessory, or an app that reaches deep into the system (antivirus tools and virtual machines are common triggers). If it happens once and never again, ignore it. If it repeats, hunt the cause.

Fixinstall any pending update from > System Settings > General > Software Update, update or remove third-party drivers and security tools, then unplug every accessory and add them back one at a time until the panic returns — the last one you added is the culprit.

NoahNoah reads the panic report you never think to open, points to the driver or app named in it, and tells you what to update or remove — instead of leaving you with a scary message and no next step.

If it's still happening

If it's not heat, not power, and not a panic, a reset of the Mac's low-level power controller can clear a stuck state. On Apple-silicon Macs (M1 and later) there's nothing to reset by hand — just shut down fully and leave it off for 30 seconds, which does the same thing. On older Intel Macs, look up the SMC reset for your model.

Try Noah free

A Mac that stays on.

Just tell Noah what's wrong:

My Mac keeps shutting down.
Find the cause freeFirst conversation free7-day free trial afterOnly with your OK

Already have Noah? Open it on this problem →

Frequently asked questions

Why does my Mac shut down by itself when the battery isn't dead?

The most common reason is heat — the Mac cuts power to protect itself when it can't cool down, even with charge left. The next is a battery that can't deliver the power it reports, so it drops out under load. Run pmset -g log | grep -i "shutdown cause": -3 means overheating, other negatives point to a power fault.

What does shutdown cause -3 mean?

-3 is a thermal shutdown — your Mac got too hot and powered off to avoid damage. Clear the vents, keep it on a hard surface, and quit whatever is working the processor hardest. If it recurs, the machine likely needs its vents cleaned or thermal paste replaced.

Is a kernel panic serious?

A one-off panic isn't — macOS restarts and moves on. A repeating one means a driver, accessory, or app keeps crashing the system, and it's worth tracking down: update macOS, update or remove third-party drivers, and disconnect accessories one at a time.

My Mac shuts down instantly with no warning. What is it?

An instant cut-off with no heat is almost always power: a worn battery, a bad charger, or a loose cable. Try a known-good charger and check Battery Health in System Settings > Battery. A swollen battery needs service right away.

Could it be a virus?

Very unlikely. Random shutdowns are almost always heat, power, or a system crash — not malware. Check the shutdown cause and battery health first. Noah can read those logs and tell you which it is.

Commands in this guide are standard, read-only macOS diagnostics unless noted; anything that changes your system is called out. When in doubt, back up first with Time Machine.