Macbook Pro Restarts While Sleeping

Posted on  by admin

A Solution for MacBook Pro Booting to a Black Screen. ใครหลาย ๆ คนอาจจะเจอปัญหาลืมปิดคอมก่อนนอน เผลอหลับไป อยาก Restart อัตโนมัติวันละครั้ง และวันนี้ทีมงาน MacThai จะมาบอกเนคนิคง่าย ๆ ที่จะสามารถตั้งเวลาให้ Mac สามารถปิด เปิดเครื่อง, Restart หรือ Slee.

Twenty years ago, shutting down the computer every night was a normal thing to do. There were multiple reasons to do it, but with the advanced technology, is it still the case?

Is it still worth turning off your Apple laptop every night and what are the benefits (if any) of doing so?

Shutting down your MacBook every night can save a mere $3.64 a year on the electric bill. These savings are outweighed by the advantages of Mac’s ability to run nightly maintenance tasks while in sleep. Consider shutting down the Mac only when not planning to use it for many days or during travel.

People who think that shutting down is necessary believe so for the following reasons:

  • Powering off the MacBook will save on energy bill
  • The fan will also be turned off and there will be no more noise from it
  • Having the laptop constantly on will wear down its components
  • This will help to increase battery lifespan
  • Turning off the MacBook will force to clear its memory and as a result, the applications will have fewer bugs

On the other hand, people have the following concerns about regular shutdowns:

  • Updates, maintenance tasks, antivirus scans, other background activities will not happen when the computer is physically turned off.
  • If you set up your MacBook to be accessed remotely then this option will not be available. If you want to know more about remote access to the MacBook read my article here.
  • It takes some time to start the machine and takes to start each individual application. If you want to cut down on startup time, then do not shut down.

Let’s review each concern in detail.

Energy saving when turning off the computer

A long time ago I was told a story about a restaurant manager who managed to save electricity by turning off all point of sale computers every night. All computers were connected to one switch, so all he needed is to pull the switch turn them all off at once.

However, when he was coming back every and flipping the switch on, all computers will start at once. This would cause a huge surge in electricity and his bill was going up.

So, he learned to turn off computers one by one at night and then start them again individually every morning. This simple change saved him enough money on electricity, so he was compelled to spend his time going and turning on/off computers instead of flipping the switch.

The point of this story is to illustrate how stressful is restart for a computer. But, again, this was a long time ago, maybe 20 years, maybe more.

Let’s roughly calculate the potential savings on the electricity bill.

All Apple products are Energy Star certified. According to Energy Star site the notebook (MacBook in our case) should consume at most:

  • Off Mode = 1.0 W
  • Sleep Mode = 1.7 W
  • Long Idle State = 8.0 W
  • Short Idle State = 10.0 W

I am sure that Apple products are more efficient than required by the Energy Star program, but let’s assume that a MacBook consumes 8 watts in an idle state.

Let’s assume now that you are powering off your MacBook for a night and let’s assume that average night lasts 10 hours. So, every night we can save up to 80 watts and every year we save 29,200 watts or 29-kilowatt hour (kWh).

The electricity rates are different in different states. According to Choose Energy web site the residential rates vary from 8.80 cents in Oklahoma to 32.09 in Hawaii per 1 kWh. A quick calculation shows that by shutting down a MacBook we can save from $2.56 in Oklahoma to $9.37 in Hawaii in one year.

The average cost per kWh in the US is 12.47 cents, so the average yearly savings from shutting a MacBook every night will be about $3.64.

Now when you know how much you can save you can decide if savings worth the efforts.

Wearing down computer components

A long time ago when computers had a lot of mechanical parts the ones that had moving pieces would often wear out and eventually crash. Those parts included hard disk drives (HDD) and CD-ROMs.

Most modern ultra-thin laptops, MacBooks included, do not have HDDs anymore. Instead of hard drives laptops have Solid State Drives (SSD) which do not have mechanical parts and they look more like microchips than disks.

As for CD-ROMs, Apple ditched them several years ago in constant pursuit of building slimmer and lighter laptops. Ergo, shutting down the MacBook will not alleviate wearing out the issue because the issue simply does not apply anymore.

Load fan noise

One more mechanical part which still may fail is a fan. But fans fail only when they work hard, and they only work hard when CPU heats up. And CPU heats up only when it is processing something which is unlikely a case if we think that shutting down a laptop is a good idea.

Besides, the latest 12-inch MacBook (which was discontinued) does not have a fan at all. As far as I know, this is the first fanless Mac, but I am sure it’s not the last. I am expecting that most new Macs will be fanless in the near future.

Increasing battery lifespan

Regular shutdowns do not improve battery lifespan. To learn about various ways to improve MacBook’s battery lifespan check the resource here.

Turning off the MacBook will force to clear its memory

Not all developers are superstars, so not all applications have zero bugs. In fact, I don’t believe that bugless applications exist at all. Very often apps have so-called memory leaks when the app reserves a block of memory without properly releasing it.

Macbook Pro Restart Keys

Over time such little leaks add up and some applications end up with taking away too much memory from other applications. These apps often get stuck with an infamous spinning wheel.

The thing is that those leaks are contained within the application and rarely affect other apps. Once the app is closed than the memory is cleared. To learn how to deal with a spinning wheel and stuck applications check the resource here.

Now let’s dive into concerns raised by proponents of never shutting down MacBooks.

Running maintenance tasks on MacBook

All computers powered with MacOS run 3 sets of maintenance tasks: daily, weekly and monthly.

If you want to know when each task ran last time you need to fire up a Terminal app and type in the following command:
ls -al /var/log/*.out

If you never ran a Terminal app you can do it from the Launchpad or by starting a Spotlight Search with Command-Space key combination and typing word “Terminal” in the search bar.

When I ran the command on my laptop on April 4th the results looked like this:

So, the last time the daily job ran was on April 1st at 10:50 am, more than 3 days ago. Why?

The reason for a lag time between the execution of daily tasks is because I put my laptop to a sleep mode quite often.

Sleep Mode on MacBook

MacBook can enter a sleep mode by doing one of the following:

  1. Close the lid of the MacBook
  2. Press the Power button on the Mac until the window will pop up and ask whether you want to Restart, Sleep or Shut Down the computer. Beware that if you keep pressing the Power for a long time the MacBook will shut down instead of going to sleep. This is called forced shut down. If you want to learn more about issues caused by frequent force shutdowns check my post here.
  3. Choose Sleep from the Apple menu. Click on the Apple logo in the top left corner of the screen, scroll down and click on Sleep.
  4. Press the Command-Option-Power keys simultaneously

What’s the difference between shutting down and putting the laptop to sleep?

In the sleep mode:

  • The processor goes into a low power mode.
  • HDD will stop spinning, but we already determined that the latest Apple laptops all have SSDs.
  • Expansion card slots turn off.
  • Video output gets turned off so if there was a monitor connected it will go into an idle state.
  • Audio input and output turn off.
  • Keyboard backlit feature turns off.

Restart Macbook Air

The CPU will be in low power mode so it easy to wake it up. To wake the MacBook from the sleep mode just open the lid or hit any key if the lid is open.

Now let’s get back to the maintenance tasks. The thing is that the interval between executions is counted by the time that the MacBook was on from the last run.

So, if I had my laptop on for all day then the next execution of the daily task would happen in about 24 hours. When the laptop goes to a sleep mode then the time it was sleeping isn’t counted so it makes take several days until the next execution.

Maintenance tasks explained

So, what those maintenance tasks do and why is it important? The output of the daily task can be found in daily.out file in /var/log/ folder.

When I checked my log file, I found the following lines from the last run:

  1. Removing old temporary files
  2. Cleaning out old system announcements
  3. Removing stale files from /var/rwho

The weekly run did only one thing:

Rebuilding whatis database

And finally, the monthly job was busy with:

  1. Rotating fax log files
  2. Doing login accounting

And the thing is that the MacBook knows when to run those tasks relative to the time it was started. In other words, if you keep shutting down the Mac every night then maintenance tasks will never run.

So, in this regard, the sleep mode is better than shut down.

However, there is an even better version of sleep which Apple calls a Power Nap.

Power Nap

If your Mac is configured to use Power Nap, then when it goes to sleep it does not go idle.

Instead, it performs a host of maintenance tasks that will make your computer run better:

  • Software updates download.
  • Mac App Store items (including software updates), download in the background.
  • Time Machine performs backups.
  • Spotlight performs indexing.
  • Help Center content updates.
  • Check email, calendar.
  • Perform iCloud updates.
  • If you enabled Find My Mac, then you can find your Mac even when it is asleep.

Macbook Pro Restarts While Sleeping Video

In order to enable the Power Nap, go to System Preferences, find Energy saver icon and double click on it. The Power Nap can be enabled when Mac is running on Battery or connected to the power outlet.


There is no much need to shut down Macs every night anymore. It does not save a significant amount of electricity and by shutting down the computer you will prevent it from doing important tasks.

Besides every morning you will spend several minutes waiting for a laptop to turn on and firing the apps you closed the day before.


If you’ve ever opened your MacBook, MacBook Pro, or MacBook Air after it’s been asleep for a while only to discover that its battery has drained since you last used it, you’re not alone.

Macbook restarts randomly

You might think that the battery shouldn’t drain at all while your Mac sleeps, but in fact, there are several battery-consuming processes going on in the background. This is perfectly normal and not a fault with the battery.

However, if you’ve ever wondered why your MacBook runs out of battery so quickly, there are several things you can do to stop it.

How do I stop my Mac’s battery from draining?

Here are some of the solutions to fix Mac battery drain while in sleep mode.

1. Unplug USB devices

USB devices that draw power from your Mac may continue to use your Mac power while it’s asleep. For example, a USB transceiver for a mouse or external keyboard that remains connected to the device and plugged into your MacBook will drain your battery. The only way to stop this is to unplug the device.

2. Check your Mac for unnecessary background processes

One possible reason for your MacBook battery draining while it sleeps is processes running in the background that you know nothing about. These are often initiated by login items. Login items are applications that get automatically opened when you log in. They can consume a lot of CPU resources and Mac energy.

It’s easy to turn login items off:

  1. Open System Preferences.
  2. Go to User & Groups and click your account.
  3. Switch to Login Items tab
  4. Select the login items you want to remove and press “-” sign below.

And you’re done.

3. Scan your Mac for malware

Viruses, trojans, adware, and other malware can decrease your battery life. The malicious agents often run parts of software on the background, so it’s worth checking your Mac for security threats.

Luckily, it’s easy to quickly scan your Mac for malware using an app like CleanMyMac X. This utility can identify different types of malware and remove it straight away.

  1. Download the free version of CleanMyMac X. Install and launch the app.
  2. Select the Malware removal module in the sidebar.
  3. Click Scan.
  4. Hopefully, CleanMyMac will report that it has found nothing and your Mac is free from malware. If not, follow the on-screen instructions to remove the malware it has found.

Detecting malware manually might be tiresome and a long process; CleanMyMac X does a deep scan of your Mac’s system to reveal threats that can hide in unexpected places.

You can configure CleanMyMac X to run automatic malware scans.

- Go to the menu bar and click on the CleanMyMac X menu sign.

- Click on Preferences.

- Go to Protection tab.

- Check “Enable real-time protection.”

4. Turn off Power Nap

Power Nap is a feature of macOS that allows your MacBook to continue checking for new emails as well as Calendar and other iCloud updates. However, to do that, it has to connect to iCloud, which means using battery power. So, if you want to reduce or eliminate the drain on the battery while your Mac sleeps, you’ll need to turn Power Nap off.

  1. Click the Apple menu and choose System Preferences.
  2. Choose Energy Saver.
  3. Uncheck the box next to “Enable Power Nap while on battery power.”

5. Disable Bluetooth while your MacBook sleeps

If you use a Bluetooth keyboard or mouse with your MacBook, a setting in System Preferences allows you to tap a key on the keyboard or a button on the mouse to wake it up. However, that means keeping Bluetooth enabled while your Mac sleeps, which will consume energy. So, if you want to prevent battery drain, disable this setting.

  1. Go to System Preferences.
  2. Click Bluetooth.
  3. Press Advanced.
  4. Uncheck the box next to “Allow Bluetooth devices to wake this computer.”

6. Disable notifications while your Mac sleeps

There is no setting that allows you to turn off notifications while your Mac is asleep, but there is one that disables them while the screen is sleeping. And, obviously, if your Mac is asleep, the screen is also sleeping.

Macbook Pro Restarts While Sleeping How To

  1. In System Preferences, choose Notifications.
  2. Click on Do Not Disturb at the top of the sidebar on the left.
  3. Check the box next to “When the display is sleeping.”

7. Reset the System Management Controller (SMC)

If nothing else works, you should try resetting your Mac’s SMC. The SMC manages various hardware processes, including how the battery works. While it’s something of a last resort, it won’t do your Mac any harm and is often recommended by Apple as a fix for problems that can’t be fixed with simpler solutions.

How to reset the SMC on MacBooks with a non-removable battery

  1. Turn off your MacBook.
  2. When it is shut down, press Shift+Control+Option (Alt) keys.
  3. While holding down those keys, press the power button (On MacBooks with the Touch Bar, the Touch ID button is the power button).
  4. Hold down the keys and the power button for ten seconds, then release them.
  5. Press the power button again to start up your Mac.

How to reset the SMC on MacBooks with a removable battery

  1. Turn off your Mac.
  2. Remove the battery.
  3. Push and hold the power button (Touch ID button) for 5 seconds.
  4. Reinstall the battery.
  5. Press the power button to start up your Mac.

There are many possible reasons why your MacBook battery drains overnight. The good news is that they can all be fixed. We recommend that you start by unplugging your USB devices and disabling login items. You can also use CleanMyMac X to check your Mac for malware, which can be why your Mac battery quickly runs out of charge. By following the steps above, you should notice your MacBook’s battery lasts much longer between charges.