Written byJenny Zeng
(2023) How to Fix Mac/MacBook/iMac Keeps Shutting down
Summary: This post explains why your Mac keeps shutting down and solutions to solve it. It tells you what to do when iMac keeps shutting down, which also applies to MacBook, MacBook Pro, and MacBook Air.
Is your iMac shutting down randomly? If it occurs once or twice, it's likely a small software bug. However, if your iMac keeps shutting down unexpectedly, it may have more complicated issues that need to be taken care of. Similar random shutdowns are also reported on other Mac models like MacBook, MacBook Pro, and MacBook Air.
You are possibly asking yourself, why does my Mac keep shutting down? Let's review the reasons before jumping to the solutions to get yourself better informed.
Guide to solving the 'Mac keeps shutting down' issue:
Why does my Mac keep shutting down?
On some occasions, the Mac shuts down randomly, making it challenging to locate the exact cause. Here are the common ones that may render your MacBook/iMac shutting down randomly:
- Software bugs or errors
- Outdated macOS
- Faulty power supply
- Mac overheating
- Virus infection
- Motherboard issues
- Liquid damage
- Connected devices causing troubles
But some are easier. If your MacBook Pro shuts down randomly after updating macOS (e.g., Monterey or Big Sur 10.15.4), you know it's most likely a software glitch relevant to the current macOS.
If your MacBook turns off when unplugged, it likely has a failed battery or charging issues.
Step 1: Open the Terminal app from Finder > Applications > Utilities.
Step 2: Paste this command to view the shutdown event messages within the last 24 hours:log show --predicate' eventMessage contains "Previous shutdown cause"' --last 24h
You can replace the number 24 to trace back to when the shutdown happened. This may take a while as Mac skips info to find messages containing "Previous shutdown cause." When it finishes, note down the cause and check whether it fits one of these:
Previous shutdown code 0: Power disconnected (power unplugged/battery issue)
Workaround: Reset SMC/battery replacement
Previous shutdown code -3: Multiple temperature sensors exceed the limit.
Workaround: Run Apple Diagnostics to check hardware issues or check Mac's ventilation
Previous shutdown code -61: Unresponsive apps causing iMac shutting down.
Solutions: Reboot in Safe Mode/use another user account
Previous shutdown code -128: Possibly about memory issues.
Workaround: Press Alt+Cmd+Shift+Esc to kill all processes and restart.
You can find a fuller list of shutdown causes in this post. Whatever the reason is, you can follow this complete guide on what to do when notebook Mac/iMac keeps shutting down.
What to do when MacBook/iMac keeps shutting down?
Here are the complete fixes to try when Mac keeps shutting down:
- 1. Check the power connection
- 2. Reboot your Mac
- 3. Boot into Safe Mode
- 4. Monitor your battery condition (notebook only)
- 5. Reset the SMC
- 6. Calibrate Mac's battery (notebook only)
- 7. Reset the NVRAM
- 8. Use Disk Utility
- 9. Reinstall macOS
- 10. Uninstall apps
- 11. Inspect Mac's ventilation
- 12. Update/downgrade macOS
- 13. Change Mac sleep settings
- 14. Reconnect battery
- 15. Call Apple Support
What to do when the 2019 13-inch MacBook Pro shuts down randomly?
If your MacBook keeps shutting down with still battery charge left and won't let you use it until it's plugged in, you are not alone. Apple has acknowledged the shutdown issue on some entry-level 13-inch models released in 2019 with a Touch Bar and two Thunderbolt 3/USB C ports.
If your Mac falls into the category, you can fix the crash using these steps provided by Apple:
- Use your battery until it drops to 90% or below.
- Close all running applications.
- Connect it with a power adapter.
- Close the lid to trigger sleep mode.
- Let your Mac charge uninterruptedly for 8 hours or more.
- Update to the latest macOS version.
These steps have proven success from many users whose MacBook Pro shuts down randomly, and hopefully, you are one of them. Still, if your MacBook Pro keeps shutting down, read on to the solutions below.
Check the power connection
First, you need to make sure your Mac is powered up properly to work correctly. So check the power outlet and ensure that it's working. The same goes for the charging cable, which should be firmly plugged in.
If you see any visible damages on the cable, replace it with a working one and see whether it stops your iMac from shutting down randomly.
Reboot your Mac
A random, unexpected shutdown doesn't close all the background processes and programs safely like a proper one, which may lead to future shutdowns. It's advisable to perform a complete shutdown after your notebook Mac/iMac switches off randomly.
- Press the power button to turn on your Mac.
- Press Command + Option + Esc to force quit all the frozen apps.
- Go to the Apple menu and click Restart.
If restarting didn't avoid iMac shutting down randomly, check if the issue recurs in Safe Mode.
Boot into Safe Mode
Restart Mac in Safe Mode isolates third-party software loading at startup and clears corrupted cache files that may render iMac shutting down randomly.
Boot Intel Mac into Safe Mode:
- Turn on or restart your Mac.
- Immediately press and hold the Shift key.
- Release the key when the login window shows up.
- Log into your account.
- Keep using Mac for the same amount of time before your Mac shuts down randomly.
If your iMac didn't turn off unexpectedly, the login items are causing trouble. You can restart your Mac normally and delete the login items one by one to rule out the culprit.
If iMac keeps shutting down in Safe Mode, it may have battery issues.
Monitor your battery condition (notebook only)
If your Mac has been at your service for several years, it may have reached its battery cycle count limits. Follow these steps to verify if your Mac keeps shutting down without warning due to battery failure:
- Click the Apple logo > About This Mac.
- Click on System Report.
- Select Power beneath the Hardware section.
- Locate Health Information.
Most Macs have up to 1000 battery cycles that can last for at least three years. But some early Mac models only have 300 cycle counts. If you are suggested to get service or replace the battery soon, follow the advice.
If the battery health shows normal, but your Mac keeps powering off with battery charge, the next step is to reset System Management Controller.
Reset the SMC
The SMC (System Management Controler) controls the low-level settings on Intel-based Macs, including thermal and power management, battery charging, sleep and wake, hibernation, etc. Often, a messed-up SMC is one of the reasons why your notebook Mac/iMac keeps shutting down.
Luckily, you can stop the random shutdowns by restoring the default settings related to your Mac's power, battery, and fans.
Note that the SMC functions are embedded in the M1 chip, so you only need to restart your M1 Mac while it's plugged in to reset the SMC on Apple Silicon Macs. Also, how to reset SMC on Intel-based Macs differs on desktops and notebooks.
Reset the SMC on iMac, Mac mini, Mac Pro:
- Shut down Mac and unplug the power cord.
- Plug the cord back after 15 seconds.
- Press the power button after another 5 seconds.
Reset the SMC on MacBook, MacBook Pro/Air with T2 chips:
Before resetting the SMC, try these steps:
- Shut down your Mac.
- Press and hold the power button for 10 seconds.
- Wait a few seconds, turn on your Mac.
If your Mac keeps shutting down, here is how to reset the SMC:
- Turn off your Mac.
- Press and hold the left Control + Option keys and the right Shift key for 7 seconds.
- Continue pressing the three keys while holding down the power button for another 7 seconds.
- Wait a few seconds and turn on your Mac.
Note: You can check if your Mac uses T2 chips from Apple menu> About This Mac > System Report > Controller.
Reset the SMC on MacBook, MacBook Pro/Air without T2 chips (non-removable batteries):
- Shut down your Mac.
- Press and hold the left Control + Option + Shift keys and the power button.
- Release all buttons after 10 seconds.
- Press the power button to turn on your Mac.
Resetting the SMC also works when MacBook shuts down randomly with still battery charge left or when MacBook suddenly shuts down and won't turn on.
If this fix didn't do the trick, keep going with the solutions below.
Calibrate your battery (notebook only)
If your MacBook randomly shuts off while plugged in, it may have failed to accurately read the status of your battery charge. To correct the battery reading, follow these steps:
Calibrate battery on newer Mac models:
- Discharge your Mac completely until it powers off.
- Plug in the power cable and charge it to 100%.
Calibrate battery on older Mac models:
- Fully charge your Mac. (See the green light on the adapter)
- Continue to use your Mac with a power cable plugged in.
- Unplug the AC power adapter after 2 hours.
- Wait until your Mac uses up the battery charge and goes to sleep.
- Turn off your Mac.
- Wait for 5 hours or more, then fully charge your Mac.
You can repeat the calibrating process twice and see whether your MacBook keeps shutting down. Hopefully, you have stopped your Mac from turning off unexpectedly by now. If not, try resetting NVRAM.
Note: Calibrating the battery doesn't hurt your Mac, but don't run critical tasks in the process in case Mac shuts down randomly, causing data loss.
Reset the NVRAM
NVRAM (non-volatile random access memory) stores settings for volume, display brightness, startup disk selection, etc. Resetting NVRAM may be helpful if your Mac keeps shutting down.
Reset NVRAM on Mac:
- Shut down your Mac.
- Press the power button to turn on Mac.
- Immediately hold down Option + Command + P + R.
- Release the keys after 20 seconds.
Use Disk Utility
If your iMac keeps shutting down when you turn it on and reset SMC & NVRAM doesn't help, it may signal a hard drive failure or corrupted operating system. To troubleshoot the issue, you need to check if your Mac disk is about to fail with these steps:
- Open Disk Utility. (Finder > Applications > Utilities)
- Select your main Mac disk.
- Click the Info button at the right corner.
If it displays a message saying your disk has an irreparable hardware error, replace the drive if possible.
If it shows no hardware error and the S.M.A.R.T status says Verified, run Disk Utility First Aid to check and repair Mac hard disk in Recovery mode.
Did you install any apps before your iMac acts up? If you notice that your iMac keeps shutting down when running Final Cut Pro or other apps, try to uninstall it and check whether the issue comes back.
Inspect Mac's ventilation
If your iMac is overheating, it may shut itself down to prevent damages to its internal components. Improper placement of your iMac will also result in random shutdowns.
Consequently, you should check if your iMac's ventilation is working properly. To avoid dust blocking the vent, you can use compressed air to clean the air vent.
If your iMac keeps shutting down without warning after updating to a specific version of macOS, you can either downgrade the macOS to a previous version where you had no problem running with or update to a newer version in hoping that it has the bug fixed.
Updating macOS is also recommended if you are staying in an old macOS that Apple has stopped providing security patches.
Tips: Some users fixed the random shutdowns in sleep mode by turning off FileVault in System Preference > Security & Privacy > FileVault. You can also give it a try.
Change Mac sleep settings
If your notebook Mac/iMac keeps shutting down during sleep, take a look at the sleep mode settings.
Here is how to modify sleep settings when your iMac keeps shutting down without warning:
- Open the Apple menu > System Preferences > Energy Saver.
- Deselect "Prevent computer from sleeping automatically when the display is off."
- Uncheck the box next to "Put hard disk to sleep when possible."
- Disable "Enable Power Nap."
Here is how to change sleep mode settings when the plugged MacBook keeps shutting down after you put it to sleep mode:
- Open the Apple menu > System Preferences > Battery.
- Click the Battery tab.
- Deselect Enable Power Nap while on battery power.
- Click the "Power Adapter" tab.
- Disable "Prevent computer from sleeping automatically when the display is off."
- Uncheck "Enable Power Nap while plugged into a power adapter."
Test if your Mac notebook or Mac desktop keeps shutting down unexpectedly after changing the settings.
Note: It's worth mentioning that noteBook Macs running macOS 10.14 and earlier don't have a Battery preferences pane but one called Energy Saver like on desktop Macs.
If your iMac/MacBook suddenly shuts down and won't turn on, there's a good chance that the battery connection is loose. If you are willing to open the Mac, a potential solution is to reconnect the battery.
- Unplug all peripherals.
- Take off the bottom.
- Carefully unplug the battery from the motherboard.
- Wait for 10 seconds.
- Plug the battery back.
- Put back the bottom cover.
- Reboot your Mac while holding the Option key.
Call Apple Support
If you have tried all the solutions in this post, still your notebook Mac/iMac keeps shutting down, it's time to ask help from Apple Support or take your Mac to a nearby Apple-authorized store.