There are situations when the Mac needs to stay awake no matter what happens, even in instances of those problematic moments when your Mac freezes because of faulty software, kernel panic kicks in, or a power outage occurs. If you are using the Mac remotely via Back to My Mac, for example, the online availability of the remote Mac is obligatory. Fortunately, macOS is able to mitigate such headaches… so long as you make sure the feature is enabled.
By default, most Macs are configured to remain off in the event of a power failure or if a system freeze kicks in. This makes sense because it is a way to shield the system from a second or third failure in a very short period of time, which would have catastrophic effects.
It’s important to note here that if your system has more than one or two kernel panics in a single year, then there is a bigger problem that you should immediately address following our guide. If power outages happen regularly in the area where you live, then it an uninterruptible power supply (UPS) is a smart purchase for protecting the system.
Check if the Mac Restarts Automatically
In OS X 10.8 Mountain Lion only desktop computers have a feature built into the system to control how the machine behaves in case of a system failure. Hidden within the Energy Saver pane in System Preferences is the option to “Start up automatically after a power failure”.
The reason for this desktop exclusivity is because MacBooks include a battery, so theoretically they won’t notice a power failure so long as the battery works. However, every Mac running OS X 10.7 Lion and earlier has this feature, even laptops. Here, however, the option is termed “Restart automatically if the computer freezes.”
To check whether the Mac will restart itself automatically, launch Terminal and enter the following command, then confirm it by typing the admin password:
sudo systemsetup –getrestartfreeze
The command will return a message informing you whether or not it is enabled. The default setting should be on, but if it isn’t, you can enable it.
Turn Automatic Restart On
There are valid reasons for not activating this feature, but if you really need it and the Mac is protected by a UPS device, then just copy and paste the following command line into Terminal:
sudo systemsetup -setrestartfreeze on
To disable it, copy the following command:
sudo systemsetup -setrestartfreeze off
By turning it off, the Mac will remain frozen until the computer is manually rebooted or (if left unattended for a longer time) a power failure kicks in. Hence, we recommend turning/leaving this feature on.
Keep Your Mac Clean to Avoid Kernel Panic
While macOS is getting better and better at handling its memory resources, sometimes faulty software can cause various issues that could lead to a forced system restart – or a kernel panic. The Mac, like any other computer, needs your attention and you can take care of this by taking out the trash and keeping the drives clean. By doing so, you’ll keep it running at top performance. To achieve this you will need a Mac optimization app such as CleanMyMac, OnyX, or the like. This kind of software was developed to find the trash, cache files, and unnecessary data that occupy precious space on your Mac, so ‘let the dogs out’ and enjoy an ‘intruder-free yard’.
Best Mac Optimization Software of 2018