Stephen Dawson1

Q: 12" macbook strange sleep behaviour every 2 hours

I have a new 12" Macbook. Looking at the console logs, I noticed that, after it enters standby (hibernate) mode, it wakes up exactly every 2 hours from then on. Reads the sleep image, and then pretty much goes straight back into standby sleep. Every time it wakes, the log shows "wake reason: ?", which doesn't help much! Not sure if this is intended behaviour on the Macbook. A Macbook Pro with identical software stays in standby mode forever until woken.  This is when running on battery, and I don't have Power Nap on.

 

Can anyone verify similar behaviour? Thanks...

Posted on Aug 18, 2016 11:44 PM

Close

Q: 12" macbook strange sleep behaviour every 2 hours

  • All replies
  • Helpful answers

  • by chris_g1,

    chris_g1 chris_g1 Aug 19, 2016 3:20 PM in response to Stephen Dawson1
    Community Specialists
    Aug 19, 2016 3:20 PM in response to Stephen Dawson1

    Hello Stephen,


    Thank you for using the Apple Support Communities. I know having an issue with your MacBook waking while in Sleep Mode is not what you expect. The good news is the following steps will be helpful in troubleshooting and resolving your issue:


    1. First, try using the Restore Defaults option in System Preferences > Energy > Battery and restarting your MacBook. Then testing your issue again.


    How to turn on or turn off your Mac


    2. Next, use Safe Mode to start up your Mac so that it performs certain checks, delete system cache files, verifies your startup disk, and attempts to repair directory issues if needed. After you successfully start up into Safe Mode, then restart normally and test the issue again.


    Try safe mode if your Mac doesn't finish starting up
    Limited graphics performance in OS X recovery or safe mode


    3. You can figure out if unexpected behavior is related to user file or setting by trying to reproduce the issue from another user account. This process includes creating a new user account, logging in to it, and testing for the issue.


    How to test an issue in another user account on your Mac


    Cheers!

  • by Stephen Dawson1,

    Stephen Dawson1 Stephen Dawson1 Aug 25, 2016 1:17 AM in response to chris_g1
    Level 1 (13 points)
    Mac OS X
    Aug 25, 2016 1:17 AM in response to chris_g1

    I have done a LOT of testing on this, and would like to present my findings:

     

    I installed a fresh copy of El Capitan on the Macbook. At first, it didn't have the problem at all, until I enabled anything to do with iCloud. This could be signing into iCloud via System Prefs or just signing into iCloud via Messages (without enabling anything else to do with iCloud). Once I do this, the Macbook wakes every 2 hours once after it's gone into standby (hibernate). Interestingly, I can sign out of anything to do with iCloud and reboot, and the Macbook STILL wakes every 2 hours. This is all entirely repeatable. A new user doesn't have the problem until an iCloud signin of some sort. I have analysed the differences in the logs before and after iCloud signin...

     

    Before iCloud signin

     

    Just before it sleeps (actually called Deep Idle in the logs) or goes into standby, I always see the line

     

    ARPT: 635.178126: wl0: powerChange: *** BONJOUR/MDNS OFFLOADS ARE NOT RUNNING.

     

    Once slept, after the standbydelay (defaults to 3 hours) the Macbook wakes up (as it should) to put itself into standby (hibernate) mode. During this period I always see the line

     

    ARPT: 635.258961: wl0: leaveModulePoweredForOffloads: Wi-Fi will turn off.

     

    And everything behaves normally. Once in Standby, the Macbook stays asleep.

     

    After iCloud signin

     

    I never see the line concerning BONJOUR/MDNS

     

    Once it wakes up to go into standby, I now see

     

    ARPT: 928.584785: wl0: leaveModulePoweredForOffloads: Wi-Fi will stay on.

     

    Also before it sleeps or goes into standby I see

     

    ARPT: 935.331801: wl0: setup_keepalive: interval 900, retry_interval 30, retry_count 10

    ARPT: 935.331815: wl0: setup_keepalive: Local IP: 192.168.0.28

    ARPT: 935.331823: wl0: setup_keepalive: Remote IP: 17.252.252.35

    ARPT: 935.331830: wl0: setup_keepalive: Local port: 49298, Remote port: 5223

    ARPT: 935.331839: wl0: setup_keepalive: Seq: 1149598991, Ack: 3686300278, Win size: 4096

    ARPT: 935.331870: wl0: MDNS: IPV4 Addr: 192.168.0.28

    ARPT: 935.331878: wl0: MDNS: IPV6 Addr: fe80:0:0:0:aa66:7fff:fe39:75cc

    ARPT: 935.331886: wl0: MDNS: 0 SRV Recs, 0 TXT Recs

     

    Port 5223 is used by the Apple Push Notification Service. And sure enough, port 49298 was, in this case, in use by the apsd process - the Apple Push Service Daemon. This certainly seems to tie in with the fact that the problem only starts happening once signed into iCloud. So it seems as though some sort of timeout is set up in order to keep a push connection alive (or something like that).

     

    But what has me puzzled is that I never see anything like that happening on my Macbook Pro, which is set up with the same software. Only ever says wifi will stay off, and never see any setup_keepalive messages. I guess it's conceivable the Macbook is supposed to behave differently, on the assumption that it will use very little battery if it wakes up every 2 hours, but it all seems rather strange.

     

    Love to hear some theories...