A very simple fix that solves battery drain while sleeping. No need to turn off SIP!

Discussion in 'MacBook Pro' started by wxdao, Feb 7, 2017.

  1. wxdao, Feb 7, 2017
    Last edited: Feb 8, 2017

    wxdao macrumors newbie

    Joined:
    Nov 24, 2016
    #1
    1. From the Apple menu, choose System Preferences…
    2. From the View menu choose Network.
    3. Select Wi-Fi from the list of network interfaces.
    4. If the padlock icon in the lower left is locked, click it. When prompted enter an admin name and password to unlock.
    5. Click the Advanced… button.
    6. Click the "+" icon below Preferred Networks list. In the dialog popped up add a network named NULL (or whatever) with none security.
    7. In the Preferred Networks list under the Wi-Fi tab, Click and drag the network named NULL to the top of the list.
    8. Click OK to save the settings.
    9. Click Apply, then close System Preferences
    Before this fix, my MacBook Pro 13" (late 2016) usually lost 10% battery every night, getting me crazy. I read the popular post by Mixolyd, but I don't think it a good idea to manually manipulate system preference files protected by SIP.

    I carefully checked my log, and found mDNSRespondor frequently waked my computer every a few minutes. Thus I assumed that Wake on Demand was somehow turned on when using battery (pretty much a bug).

    In this document on Apple Support I found a very interesting statement: The wireless network you use with Wake on Demand should be the first wireless network in your list of Preferred Networks. My fix is to forge a network to be on the top of the list instead of your home or office wifi so Wake on Demand will stop working. I tested this method last night, and my computer lost only 1% for 10+ hours.

    Edit:

    My problem was that the computer drained 10% for a whole night, approximately 10 hours, and running "pmset -g log" showed many events about mDNSRespondor every a few minutes. This fix might not work if you don't have the same problem with mine.
     
  2. Beards macrumors 6502a

    Beards

    Joined:
    Mar 22, 2014
    Location:
    Derbyshire UK
    #2
    Sorry but it doesn't appear to work for me. I tried the settings you kindly mention about 3 hours ago and just checked the MacBook Pro again:- it has lost a further 5%
     
  3. wxdao thread starter macrumors newbie

    Joined:
    Nov 24, 2016
    #3
    Sad to hear that... Do you mind posting some log (run "pmset -g log" in terminal) here? It may be something else go wrong.
     
  4. Beards macrumors 6502a

    Beards

    Joined:
    Mar 22, 2014
    Location:
    Derbyshire UK
    #4
    Sure but its a heck of a long log file. I don't use Dropbox so not sure where to save and link it to you.
    Any idea what I should be looking for in the Log?
     
  5. wxdao thread starter macrumors newbie

    Joined:
    Nov 24, 2016
    #5
    You can just paste those lines that start with a date string (like 2017-02-07 18:00:30 +0100) in the range of your last sleep time, i.e. "3 hours ago" you mentioned.
    And, check whether the number to the right of PreventSystemSleep is 0. If not, also paste the last few lines under "Listed by owning process:".
     
  6. Beards macrumors 6502a

    Beards

    Joined:
    Mar 22, 2014
    Location:
    Derbyshire UK
    #6
    Just ran it again:-
    Total Sleep/Wakes since boot at 2017-02-08 08:20:58 +0000 :6


    2017-02-08 14:36:56 +0000 : Showing all currently held IOKit power assertions

    Assertion status system-wide:

    BackgroundTask 0

    ApplePushServiceTask 0

    UserIsActive 1

    PreventUserIdleDisplaySleep 0

    PreventSystemSleep 0

    ExternalMedia 0

    PreventUserIdleSystemSleep 0

    NetworkClientActive 0
     
  7. wxdao thread starter macrumors newbie

    Joined:
    Nov 24, 2016
    #7
    Sorry that I didn't explain it clear. Please paste all the lines from the time you closed your lid to the time you opened it.
     
  8. Beards macrumors 6502a

    Beards

    Joined:
    Mar 22, 2014
    Location:
    Derbyshire UK
    #8
    No, It's my fault, I should have thought.
    I've just put it back to sleep so I'll let it rest for a couple of hours then fire it back up and run another log.

    To save any confusion I'll post the 'entire' log and once you have had a peek I'll edit the post and delete as it will be one heck of a file.

    Appreciate your time btw
     
  9. Beards macrumors 6502a

    Beards

    Joined:
    Mar 22, 2014
    Location:
    Derbyshire UK
    #9
    Just opened the MacBook Pro again from sleep.
    This time I ran both the Log and Assertions

    Heres what Assertions brought up:-
    Last login: Wed Feb 8 17:09:52 on ttys000

    Mikes-MBP:~ mikepaterson$ pmset -g assertions

    2017-02-08 17:11:06 +0000

    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 97(hidd): [0x0000000a00098032] 08:50:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4294968021.11"

    Timeout will fire in 115 secs Action=TimeoutActionRelease

    No kernel assertions.

    Idle sleep preventers: IODisplayWrangler

    Mikes-MBP:~ mikepaterson$
     
  10. wxdao, Feb 8, 2017
    Last edited: Feb 8, 2017

    wxdao thread starter macrumors newbie

    Joined:
    Nov 24, 2016
    #10
    You can upload your log in one text file. Run "pmset -g log > ~/Desktop/log.txt". A file named log.txt will appear on your desktop. Upload it by click "Upload a File" button, which is located below reply area.

    Or you can use pastebin.com. Paste the entire log into it and it will generate a url with which others can read the text you share. Post the link here.
     
  11. Beards macrumors 6502a

    Beards

    Joined:
    Mar 22, 2014
    Location:
    Derbyshire UK
    #11
    Thanks.... Here's the Log File
     

    Attached Files:

    • log.txt
      File size:
      552.1 KB
      Views:
      13
  12. wxdao thread starter macrumors newbie

    Joined:
    Nov 24, 2016
    #12
    According to the log, I think your computer did sleep well from 15:24 to 17:01... Maybe you should let it sleep for a whole night and see if there has been any improvement compared to previous nights.
     
  13. Beards macrumors 6502a

    Beards

    Joined:
    Mar 22, 2014
    Location:
    Derbyshire UK
    #13
    Will do thanks.
    Btw the only thing I have changed this afternoon was to turn off File Sharing in case that may have been an issue.
    --- Post Merged, Feb 8, 2017 ---
    Forgot to mention and did not want to edit the above in case you may have already read the post:-
    I took detailed battery levels just before and after
    15:24 Coconut Battery 37.3%. System Battery 38% Sleep
    17:01 Coconut Battery 35.6% System Battery 37% Awake

    That worked out at 97mins = -1.7% Battery
     
  14. snaky69 macrumors 603

    Joined:
    Mar 14, 2008
    #14
    This is all fine except that a drain of approximately 1% per hour is perfectly normal for a MacBook Pro in sleep mode unless things have drastically changed in the last year.
     
  15. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #15
    About 1% per hour is normal for the first three hours, then newer MacBooks enter "stand-by mode" and use much less power. You can run in stand-by mode on battery power up to 30 days. So after that three hour window, you should not be using 1% per hour.

    https://support.apple.com/en-us/HT202124
     
  16. Gonza211 macrumors newbie

    Joined:
    Jul 26, 2012
    #16
    Mind checking out mine? Got 40% overnight loss. This time my Macbook was not connected to power but yes to an external monitor via USB C to HDMI/USBA/USBC adapter.

    http://pastebin.com/k84jqAyh
     
  17. Brookzy macrumors 68040

    Brookzy

    Joined:
    May 30, 2010
    Location:
    UK
    #17
    The adapter was certainly the culprit. The Apple one draws up to 5W of power even when not in use, for example. :eek:
     
  18. Beards macrumors 6502a

    Beards

    Joined:
    Mar 22, 2014
    Location:
    Derbyshire UK
    #18
    I left it in standby overnight:-
    17hrs 32mins later and according to Coconut Battery it had dropped 10.6%, whilst according to the System Battery it said it had dropped 11%

    I would say that is now acceptable.
    Looks like File Sharing with my big iMac was dragging the MacBook Pro down.
     
  19. Gonza211 macrumors newbie

    Joined:
    Jul 26, 2012
    #19
    Yesterday I let it sleep without anything connected, got 8% drain overnight. This shouldnt be happening. Now it says sleep preventer is IODisplayWrangler so.... don-t know what to do.
     
  20. MRxROBOT macrumors 6502

    MRxROBOT

    Joined:
    Apr 14, 2016
    Location:
    1011100110
    #20
    I'm losing 8-10% a night, not connected to anything since updating to 10.12.3

    Short of reverting back to 10.12.2, is there a fix?
     
  21. Sanpete macrumors 68020

    Joined:
    Nov 17, 2016
    Location:
    Utah
    #21
    Probably. There's probably something your computer is set to do that keeps it from sleeping properly. If this bothers you, read the threads on this for ideas what you can try. Here's another one:

    https://forums.macrumors.com/thread...drain-while-sleeping-here-is-the-fix.2026702/

    Good luck!
     

Share This Page