Why Mac keeps shutting down and how to fix it: 20+ solutions

756.6K views
18 min read

Nothing is more frustrating than when your MacBook keeps shutting down for no apparent reason. I know, I've been there. 

However, after some digging, I realized that my Mac wasn't a lost cause. These random shutdowns are caused by several fixable issues I'll share with you today, and some only need a few minutes to sort out.

Quick ways to fix Mac keeps shutting down

I like to keep things simple, so if you are short on time, here's a quick-fix guide:

What causes Mac’s shutting down What to do
Unexpected shutdowns Check for error codes in Terminal using log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 24h.
Overheating Ensure proper ventilation, clean dust from fans, and monitor temperature with iStat Menus.
Battery issues Check the battery's health or optimize it using Endurance.
Software crashes Boot into safe mode and uninstall questionable apps.
Power adapter problems Use an official Apple charger and inspect for damage.
Malware infection Scan the device with CleanMyMac to remove any malware.
macOS bugs Update macOS to the latest version in System Settings > Software Update.

How to fix your Mac shutting down randomly

The troubleshooting rule I always follow is to start from the simplest solution to the most complex, but if you know the probable cause of the issue, you can jump to that section.

Check for error code

Before you start guessing, you can check if your Mac knows the issue causing it to shut down.

  1. Open Terminal (Finder > Applications > Utilities).
  2. Type log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 24h > Press Return.
  3. Check for a numerical code.

Here are what some common ones mean and how to solve the issue:

Shutdown code What happens What to do
5 Correct shutdown Run normal shutdown (via the Apple menu).
3 Hard shutdown Check if the power button is stuck and if the Console app (Applications > Utilities > Console) has crash logs.
2 Power supply disconnected Check the power adapter or battery.
0 Battery disconnected Reset SMC. It may be a battery or power controller issue.
-3 Overheating Run Apple Diagnostics (hold D on boot) to check for failing fans or thermal issues. Keep vents clear.
-60 Battery fully drained Mac should have hibernated instead, so reset SMC and check battery health. If persistent, it may be a hardware issue.
-61/-62 Unresponsive application (watchdog timer) Check for problematic apps, boot into safe mode, or try a new account to see if the problem persists.
-75 AC adapter communication issue Inspect the adapter for damage or use an official one.
-78 Incorrect current from adapter Try a different power adapter.
-81 Thermal shutdown (excessive heat) Heatsink or fan issue. Check the former using iStat Menus.
-95 CPU temperature exceeded limits Reset SMC, monitor fan speeds, and check Activity Monitor for high CPU usage apps.


If you can see an unusual cause, take the necessary troubleshooting measures.

Shut down your Mac properly

It may not be the solution you expected, but performing a proper shutdown helps solve some temporary glitches.

Here's how to shut down MacBook:

  1. Click the Apple menu in the top-left corner.
  2. Choose Shut Down.
  3. To avoid any issues, deselect the macOS option to reopen apps.

Proper Mac shutdown

Check for sleep settings

Sometimes, Mac isn't actually shutting down but going to sleep earlier than expected. This usually happens due to sleep settings.

To check it:

  1. Click the Apple menu > System Settings.
  2. Click Lock Screen in the sidebar.
  3. Check timers under Turn display off on battery when active and Turn display off on power adapter when inactive. I
  4. f they're too short, extend them.

Mac sleep settings

Run your Mac in safe mode

Booting into safe mode only loads macOS essential system files, so it can help you know if there's third-party software corrupting your system files. The procedure depends on the Mac you are using.

On Macs with Apple silicon (M chips):

  1. Click the Apple menu > Shutdown.
  2. Press and hold the power button until you see the startup options screen.
  3. Choose your startup disk and press and hold the Shift key.
  4. Click Continue in Safe Mode and release the Shift key > Log in.

On Intel-based Macs:

  1. Shut down your Mac (Apple menu > Shutdown).
  2. Turn it back on and immediately press and hold the Shift key.
  3. Log in.

Safe mode will be indicated in the top-right corner of the screen. On macOS Ventura or later, go to the Apple menu > About This Mac > System Report > Software — it should say "safe mode."

Monitor your Mac's health

It's important to monitor your Mac's performance, whether it's working well or experiencing issues. This way, you can easily identify the cause of different issues and resolve them before they become problems.

Solution 1: Check Activity Monitor

This built-in tool shows how apps and processes affect your Mac's performance.

  1. Open Finder > Applications > Utilities > Open Activity Monitor.
  2. Go through the CPU, Memory, Energy, Disk, and Network tabs.
  3. If you notice an app using excessive resources, click the app and then click the delete “X” icon on the top.

Activity Monitor Memory Tab

Solution 2: Run Apple Diagnostics

If you suspect that your Mac has a hardware issue, use Apple Diagnostics to check for problems.

Here’s a detailed guide on how to run diagnostics on Mac.

Solution 3: Use iStat Menus

To detect potential issues in real-time, you can use iStat Menus, as it will give you a detailed insight into your system. It lets users:

  • Track CPU and memory usage.
  • Monitor battery health and temperature.
  • Check fan speeds and system sensors.

Reset SMC, PRAM or NVRAM

The System Management Controller (SMC) is the section of Mac that handles low-level functions like power management, battery charging, and thermal regulation. When it's not working well, the Mac may shut down or restart unexpectedly, so try resetting it to see if that's the issue.

PRAM (Parameter RAM) or NVRAM (Non-Volatile Random-Access Memory) is a part of Intel Macs. It stores basic system settings like sound volume, display resolution, and startup programs. And if it has an issue, it can cause shutdowns.

Resetting all of them really depends on whether you have an Apple silicon Mac or an Intel-based one. Here’s a detailed guide on how to reset PRAM/NVRAM and SMC on a Mac.

Check your Mac for malware

Malware can overload your system resources or corrupt files, causing your Mac to shut down unexpectedly. You can scan for any signs of malware to ensure you aren't a victim.

There are many tools you can use for this, but I like CleanMyMac because it offers comprehensive malware scanning powered by Moonlock Engine, which can quickly spot potential threats and wipe your browsing data on demand. It also has features you can use to optimize system performance, such as managing startup items and freeing up RAM.

Here's how to check for malware:

  1. Install and open CleanMyMac.
  2. Click Protection in the sidebar.
  3. Click Scan to check your Mac for malware.
  4. CleanMyMac will now check your system for malware, adware, or suspicious files. If it identifies any, get rid of them right away.

Update all apps

Apps often have bugs that can cause instability in the system, leading to software issues. These are usually eliminated through updates, so it's important to ensure that all your apps are up-to-date.

The mode of update will depend on how you installed each app:

  • For App Store apps, you can open the store and check for updates on the sidebar.
  • In the case of downloaded apps, you can update them from the developer's website.

A shortcut to this is using CleanMyMac to scan all apps and update them accordingly. Simply choose the Applications feature from the sidebar, scan your Mac, and run updates on the Updater tab afterward.

CleanMyMac Updater Tab

Quit and uninstall questionable apps

If you suspect an app you've installed may not work well, you can force-quit it and uninstall it by pressing Command + Option + Esc.

I really prefer the QuitAll app because it's more powerful and super easy to use. I don’t want to waste time searching for all the open apps, and QuitAll can simply list everything for you. If you want, it can even show background services. Plus, it runs right from the top menu bar, so you only need to click a couple of times to get what you need.

QuitAll App Menu Bar

Update drivers

Drivers can get outdated or have problems, which can mess things up in your system. The great thing is that when you update your Mac, it automatically includes driver updates, so you don’t have to worry about updating them one by one.

Here's how to check for software updates manually:

  1. Click the Apple menu > System Settings.
  2. Click General > Software Update.
  3. If there's an update, click Update Now.

Mac Software Update Menu

Check your Mac's battery health

When your battery is failing, it can cause sudden shutdowns. Check the battery information to see if it's in good working condition:

  1. Click the Apple menu bar and hold the Option key.
  2. You should see System Information > Click on it.
  3. Click Power under Hardware.
  4. Now, look for the battery condition under Health Information. You need to change your battery if it's indicated as Service Recommended.
Mac System Health Information

Update macOS

Updating macOS will help you fix bugs and improve performance, which may help with shutdown issues.

  1. Open System Settings.
  2. Select General > Software Update.
  3. If an update is available, click Update Now.

After the installation, restart your Mac.

Reinstall macOS

If your operating system behaves unusually, you can reinstall macOS in recovery mode. This will solve all system issues.

To do so:

  1. Click the Apple menu > Shut Down.
  2. Start it up in macOS recovery mode:
    • On Macs with Apple silicon, press and hold the power button, then click Options > Continue.
    • On Intel-based Macs, press the power button, then press and hold Option + Command + R.
  3. Click Reinstall macOS [name] and follow the on-screen instructions.

Run the Disk Utility app

You can check for possible disk errors using Mac's Disk Utility.

To run the app:

  1. Go to Finder > Applications > Utilities > Disk Utility.
  2. Choose your startup disk.
  3. Click First Aid > Run.

Disk Utility First Aid Run

If the tool finds errors, you may need to contact a professional or replace your drive.

Try a specific solution for 13-inch Touch Bar MacBooks

Apple acknowledged that some 2019 13-inch MacBooks (Touch Bar and two Thunderbolt 3 / USB-C ports) have a known issue that causes random shutdowns.

If you have the same model, try this:

  1. Charge your Mac to 100%, then use it until the battery drops below 10%.
  2. Connect to a power adapter, immediately close all applications, and shut the lid (triggering sleep mode).
  3. Leave the Mac uninterrupted for at least 8 hours.
  4. Restart and install any updates.

If the issue persists, you can contact Apple Support or an authorized repair shop.

Prevent your Mac from overheating

Overheating can cause Mac to shut down, so try a few measures to keep it cool.

Here are some:

  • Keep your Mac in a cool, well-ventilated area.
  • Avoid using Mac on soft surfaces, such as beds or pillows. These block airflow.
  • Check your background processes using Activity Monitor. This may be the issue if they use a high CPU percentage.
  • Check if overheating occurs when charging. If it does, you may need a new adapter.

Check the shutdown button

A stuck power button or simply not working properly can cause your Mac to shut down unexpectedly. Here's how to solve that:

  1. Press the power button gently to see if it feels sticky or unresponsive.
  2. If the button is stuck, gently clean around it using compressed air or a soft brush.
  3. Check if your Mac shuts down when you lightly tap near the button. If so, it may need repair.

If this doesn't solve the issue, you may need it checked by a technician. Also, check out what to do if the Mac won't turn on.

Replace charging devices

A failing power adapter or charging cable can cause interruptions, leading to sudden shutdowns:

  • Try a different adapter if you notice any frays, overheating when charging, or the Mac only shutting down when plugged in.
  • Make sure you use an Apple-certified charger.

Ask for professional help

If none of these solutions work, the issue may be deeper than imagined. Hardware problems require technical repairs, so you can book a diagnosis at an Apple store or an authorized service provider. If your Mac is still under warranty or covered by AppleCare, you may be eligible for a free repair or replacement.

Understanding why your Mac shuts down on itself

While there are many reasons why a Mac might shut down, there's almost always a logical explanation.

Here are the most common reasons why MacBook keeps shutting down on its own:

  • Software-related issues: Due to bugs or other errors, apps can freeze, glitch, or behave weirdly. This can cause instability in the system and cause a computer to shut down.
  • Malware: Yes, Macs can get malware. If you recently downloaded sketchy software, it may have installed malicious software on your Mac and interfered with your system, corrupting key files.
  • Outdated drivers or macOS: If running an older macOS version, update it to the latest version to fix any possible power management bugs. These were especially common in some MacOS Catalina and Big Sur versions, where text files often caused shutdowns.
  • Overheating: When your Mac gets too hot, it will shut down. This is a built-in fail-safe feature that helps protect internal components.
  • Faulty power adapter: If your adapter is damaged or you use a low-quality one, it may cause unstable power delivery. Mac will then protect itself by shutting down.
  • Drive issues (bad sectors): When your HDD or SSD is aging, it may get corrupt sections. These make it hard for Mac to fetch crucial files, so it can shut down if critical processes are interrupted.

What to do if your Mac keeps restarting

If your Mac is stuck in a restart loop, you can try several things to resolve the issue.

Solution 1: Disconnect any peripheral devices

These devices can cause your Mac to restart repeatedly, so try removing them:

  1. Click the Apple menu > Shut Down. It’ll help you turn off your Mac properly.
  2. Unplug all external devices except the power adapter.
  3. Turn your Mac back on by holding the power button.

See if the restart loop continues. If the Mac works normally, plug in one device at a time to identify the faulty one.

Solution 2: Update all software

It could be a software bug or an outdated app causing the restarts, so keep everything updated to ensure system stability.

If an app update was causing the issue and has been resolved through an update, this should fix the issue.

Solution 3: Check for malware

Malware can cause your Mac to get stuck on a restart loop when it interferes with critical system files. Perform a thorough scan using CleanMyMac’s Protection feature (yes, the tool can do literally everything) to detect and remove any threats in your system.

Restart your Mac to see if the issue is resolved.

How to recover data lost after Mac shutdown

When your Mac shuts down when you are working on something, this can easily result in lost data or corrupted files. If you can't find a file or folder, use Disk Drill to get everything back. It's my trusted sidekick in scanning and recovering all data types, so I don't have to worry about lost files. Best of all? It works on all storage devices, not just your MacBook.

Here's how to recover lost data using Disk Drill:

  1. Install and open Disk Drill.
  2. Choose the disk where the lost file was stored.
  3. Click Search for lost data.
  4. Find your missing files in the results and click Recover to restore them.

Disk Drill Recover Data Interface

Preventing Mac shutdowns in the future

Here are a few tips and quick-fix solutions to help prevent future shutdown issues:

  • Keep your Mac safe by using CleanMyMac to check for and remove malware.
  • Monitor your Mac's performance using iStat Menus. This will help identify issues before they become problems.
  • Keep all app stores and downloaded software up-to-date. CleanMyMac can help you update all apps in one swoop.
  • Avoid non-Apple-notarized apps. Always install from the App Store or trusted sources.
  • If your Mac is prone to overheating, ensure it's always in a cool place and on a flat, hard surface.
  • Avoid questionable third-party devices, as they may have serious hardware issues.
  • Always prepare for a rainy day by using Get Backup Pro to back up your treasured data.

These will help keep your Mac in top shape.

Why does my MacBook keep turning off? Solved

If your Macbook keeps shutting down or restarting unexpectedly, there's an issue with your operating system, installed apps, hardware, or connected peripheral devices. The good news is that you can solve most of these problems on your own, and we've provided a comprehensive guide you can follow to troubleshoot your device.

Start by checking for error codes, updating macOS and apps, and then scanning for malware using CleanMyMac. You can also see if your fan and CPU are operating as expected using iStat Menus and the state of your battery through Endurance. In case of any data loss, scan your disk using Disk Drill and ensure that you always back up your data using Get Backup Pro

All these apps are available on Setapp, the best alternative app store for Mac and iOS, with a 7-day free trial.

FAQ

How do I get rid of the Mac shutdown warning?

To get rid of the Mac shutdown warning, try resetting the SMC and PRAM/NVRAM on Intel Macs, as these control power-related functions.

How do I stop my Mac from shutting down on a schedule?

To stop your Mac from shutting down on a schedule:

  • Open Terminal.
  • Type pmset -g sched > Press Return.
  • To reset all scheduled events, type sudo pmset repeat cancel > press Return.

This will cancel any scheduled shutdowns or other power events set on your Mac.

Is it OK to shut down my Mac every day?

It's okay to shut down your Mac every day, but it's not necessary. Apple has designed Macs to handle sleep mode efficiently to keep power usage minimal while apps are ready to go. However, if you aren't planning on using your Mac for a few days, it's better to shut it down.

Is it better to shut down or sleep?

Sleep mode is better for daily use as you can enjoy instant wake-up, and Mac won't use much power. However, if you don't use your Mac for several days or weeks, shutting it down will help conserve the battery health.

250+ apps for all your daily tasks.

Sign up to Setapp and try them for free.

Security-tested