4

I have a MacBook Pro (Retina, Mid 2014) running El Capitan. Whenever I close the lid it doesn't sleep! The Apple light dims and the screen turns off, but my battery drains at a normal rate. Sleep is also grayed out in the top-left  menu. Please help!

2
  • Can you connect to the machine while the lid is closed? Ping it?
    – techraf
    Commented Mar 2, 2016 at 8:32
  • I can see it in AirDrop when it's closed, and I can copy a file to my computer using it (the dialog is open when I open my computer; I have to open it to say yes).
    – atirit
    Commented Mar 2, 2016 at 17:13

5 Answers 5

3

Do not blindly start typing copying/pasting stuff into the prompt without knowing what you're doing this could seriously hinder performance or destroy your system!!

Fire up a terminal window either through cmd+space and typing into spotlight Terminal.app or Finder > Applications > Utilities > Terminal

I'd modify the energy settings via pmset.You can get your current settings with pmset -g. My energy preferences are something along the lines of:

sudo pmset -a destroyfvkeyonstandby 1 
sudo pmset -a standby 0
sudo pmset -a sleep 20
sudo pmset -a displaysleep 20
sudo pmset -a proximitywake 0 
sudo pmset -a acwake 1
sudo pmset -a lidwake 1 
sudo pmset -a powernap 0 
sudo pmset -a networkoversleep 0
sudo pmset -a womp 0 
sudo pmset -a ring 0
sudo pmset -a standbydelay 0
sudo pmset -a autopoweroff 1
sudo pmset -a autopoweroffdelay 0
sudo pmset -a tcpkeepalive 0
sudo pmset -a ttyskeepawake 0

From man pmset:

-a = all (all options being passed to power manager should apply to battery, ac connected or UPS, connected machine)

Keep in mind these settings will affect the entire machine; so I'd read up if you're not familiar with them. Eg. tcpkeepalive will kill off network connections; thus, Find My Mac won't be available when the machine is offline [for me, this ain't a problem; though, to each, his own. ]

Also proximitywake causes nearby devices to automatically connect and share info with nearby Apple devices that are sharing the same iCloud account (that's, if you're willing to buy into what apple is supposedly telling you through the man pages -- don't know about you but when I turn something off; I want it OFF.)

NOTE: from what I remember, proximitywake is a feature introduced prior to 10.13 (High Sierra); so it might not be available with El Capitan(Don't know though...with all the security updates... you're gonna have to run pmset -g and man pmset in order to figure it out.)

Remember that the man pages are your friend! Whenever you're inside a terminal prompt and aren't sure about what a cmd does; type man <desired_cmd> in order to get the details about what does what. Type q to exit it.

1
  • Welcome to Ask Different and thank you for your answer. :) Just one thing I'd suggest - you should probably edit your answer slightly to explain how the user can run these commands in Terminal? At present the assumption is they'll know how to action your answer, but nothing in their post indicates this.
    – Monomeeth
    Commented Aug 25, 2019 at 21:47
1

Did you check Energy Saver in System Preferences?

Tick on your machine everything you see on above screen and try again.

Especially focus on "Prevent computer from sleeping automatically when the display is off" option. Uncheck it and see how battery behaves.

enter image description here

4
  • That's what I have checked as it is. Thanks for the quick reply btw :-)
    – atirit
    Commented Mar 2, 2016 at 3:55
  • So maybe you have any third party apps that interact with your batter or interrupt the process of going to sleep? Commented Mar 2, 2016 at 3:56
  • The only apps I have open right now are Chrome and Finder, and I don't have any apps in the background.
    – atirit
    Commented Mar 2, 2016 at 4:00
  • Try unchecking Power Nap as well, as it will use some extra battery too.
    – Kisa Ayano
    Commented Mar 2, 2016 at 4:45
1

Google "reset smc" and you can learn how to reset the SMC and PRAM for your particular machine in just a few minutes. It refreshes various stored settings akin to restarting your Mac and it's really easy so it's worth a try. It just might help. [5 min job, 5 to read] Good luck.

1
  • Tried that; my adapter light flashed green then back to red (I take it this means it worked) and powered on as usual, but no difference.
    – atirit
    Commented Mar 4, 2016 at 2:41
1

To prevent mac from sleeping. First and foremost, know what's preventing a normal sleep with a command $ pmset -g assertions You will receive a console output as:

2019-08-25 20:51:34 +0545
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     1
   NetworkClientActive            0
Listed by owning process:
   pid 4067(AddressBookSourceSync): [0x0004827e000187f7] 00:00:13 PreventUserIdleSystemSleep named: "Address Book Source Sync"
    Timeout will fire in 1787 secs Action=TimeoutActionTurnOff
   pid 3328(hidd): [0x00048267000987dd] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4295040706.3"
    Timeout will fire in 120 secs Action=TimeoutActionRelease
   pid 258(UserEventAgent): [0x0004827e000b87f8] 00:00:13 BackgroundTask named: "com.apple.AddressBook.ScheduledSync"
    Created for PID: 4067.
   pid 3215(apsd): [0x0004828a000b8819] 00:00:01 ApplePushServiceTask named: "com.apple.apsd-datareceived-push.apple.com"
   pid 84405(cloudphotosd): [0x00048267000b87dc] 00:01:13 BackgroundTask named: "com.apple.cloudphotosd.darkwake.sync"
    Details: cloudphotosd darkwake power assertion for initial and large iCPL downloads/uploads
    Timeout will fire in 1727 secs Action=TimeoutActionTurnOff
Kernel Assertions: 0x8=BT-HID
   id=1046  level=255 0x8=BT-HID mod=1/1/70, 5:30 AM description=com.apple.driver.IOBluetoothHIDDriver owner=AppleHSBluetoothDevice
Idle sleep preventers: IODisplayWrangler

Now , the next step is kill the process with $ sudo kill <Process ID> and run the same assertion command unless you receive a clean output as:

2019-08-25 20:54:16 +0545
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     0
   NetworkClientActive            0
Listed by owning process:
   pid 84405(cloudphotosd): [0x00048267000b87dc] 00:03:54 BackgroundTask named: "com.apple.cloudphotosd.darkwake.sync"
    Details: cloudphotosd darkwake power assertion for initial and large iCPL downloads/uploads
    Timeout will fire in 1565 secs Action=TimeoutActionTurnOff
   pid 3328(hidd): [0x00048267000987dd] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4295040706.3"
    Timeout will fire in 120 secs Action=TimeoutActionRelease
Kernel Assertions: 0x8=BT-HID
   id=1046  level=255 0x8=BT-HID mod=1/1/70, 5:30 AM description=com.apple.driver.IOBluetoothHIDDriver owner=AppleHSBluetoothDevice
Idle sleep preventers: IODisplayWrangler

-1

Chrome is one of the Apps that prevents macbook from going to sleep. You will need to close it if you want macbook to go to sleep then close the lid.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .