7

Since upgrading to the first stable release of Mac OS X Yosemite a few days ago, my Mac Mini wakes up roughly every two hours from sleep for about a minute, then goes back to sleep. This is particularly annoying at night since I sleep my Mac, and it's in the bedroom, so I notice when it turns on.

In my Console, here's some of the lines from it from when it wakes up:

14/10/19 6:48:06.000 am kernel[0]: Wake reason: RTC (Alarm)
14/10/19 6:48:06.000 am kernel[0]: RTC: Maintenance 2014/10/19 10:48:06, sleep 2014/10/19 09:00:12
14/10/19 6:48:06.001 am SyncServer[910]: [0x7fdd69c19d80] |SyncServer|Warning| Refreshing watchdog because of a calendar time change alert.
14/10/19 6:48:06.000 am kernel[0]: Previous sleep cause: 5
14/10/19 6:48:06.000 am kernel[0]: AppleThunderboltNHIType2::prePCIWake - power up complete - took 1 us
14/10/19 6:48:06.000 am kernel[0]: The USB device USB 3.0 HUB (Port 1 of Hub at 0x15000000) may have caused a wake by issuing a remote wakeup (1)

From the last line, yes, I've got a USB 3 hub plugged in to my USB 3 port on the Mac. But there are no devices plugged into the hub. Nevertheless, I'll try unplugging it tonight, but I suspect it won't make a difference.

Also, I've already disabled "Wake from network access", disabled "Power Nap", and pretty much disabled everything else in the "Energy Saver" system preferences pane.

When I run pmset -g, I get:

Active Profiles:
AC Power    -1*
Currently in use:
 standby              1
 Sleep On Power Button 1
 womp                 0
 autorestart          0
 hibernatefile        /var/vm/sleepimage
 darkwakes            0
 networkoversleep     0
 disksleep            0
 sleep                0 (sleep prevented by iMovie, coreaudiod, iTunes, AddressBookSour)
 autopoweroffdelay    14400
 hibernatemode        0
 autopoweroff         1
 ttyskeepawake        1
 displaysleep         60
 standbydelay         4200

I often have wake problems with my Mac, especially after upgrading to a new OS, and this time is no exception:

  1. OS X Mavericks wakes my Mac from sleep every hour or so
  2. Mac wakes up from sleep every night and then goes back to sleep immediately
  • What does your pmset -g looks like? – Ruskes Oct 19 '14 at 19:36
  • I pasted the pmset -g results above. – Gary Oct 19 '14 at 19:50
  • see my updated answer and thanks for pmset (you might want to clean that up anyway) – Ruskes Oct 19 '14 at 20:10
  • Clean up, in what way? I'll be glad to do so but I'm not sure what I need to do. – Gary Oct 19 '14 at 20:17
  • The items preventing the sleep mode is a different question -nothing to do with your RTC wake. Usually they are simple to deal with by terminating the applications in question. To see details run "pmset -g assertions" – Ruskes Oct 19 '14 at 21:25
4

Since com.apple.mDNSResponder.plist got replaced by com.apple.discoveryd.plist after Yosemite Beta, there is another solution for your Problem.

All you have to do is to run following command in your terminal:

sudo /usr/libexec/PlistBuddy -c "Add :ProgramArguments: string --no-multicast" \ 
         /System/Library/LaunchDaemons/com.apple.discoveryd.plist    

And reboot your system and it should be gone.

Like also described here: http://ispire.me/fix-yosemite-rtc-alarm-wakeup-issue/

You just have to know that services relying on multicast might not work properly anymore after this change.

  • 1
    Answers on Ask Different need to be more than just a link. It's okay to include a link, but please summarize or excerpt it in the answer. The idea is to make the answer stand alone. – nohillside Oct 21 '14 at 19:42
  • @patrix Better now? – Irie Oct 21 '14 at 19:55
  • When I unload discoveryd and load mDNSResponder, I irreparably lose connection to the Internet. I don't understand what I might be doing wrong… but I cannot apply the fix due to this. – user97535 Oct 25 '14 at 12:00
  • @user97535: Yosemite replaced mDNSResponder with discoveryd. – dhchdhd Nov 4 '14 at 3:37
  • Don't use --no-multicast right now if you use WiFi, it breaks auto-connecting to remembered networks and the status bar icon. Apple has been notified. Rebooting is absolutely unnecessary, just sudo launchctl unload / load the plist. – dhchdhd Nov 4 '14 at 3:38
2

The problem seems to have fixed itself after updating to Yosemite 10.10.2, released on January 28, 2015. The notes don't mention anything regarding sleep or wake but it seems to have fixed it regardless.

  • It's now happening for me again on 10.11.4. – kba Jul 31 '16 at 12:25
2

Try this. It should work on 10.10.4 or later. Enter the following in Terminal and then restart your Mac:

sudo defaults write /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist ProgramArguments -array-add -DisableSleepProxyClient

1

There is another solution approach using the tool SleepWatcher by Bernhard Baehr. To install SleepWatcher, use:

brew install sleepwatcher

com.apple.discoveryd is just getting unloaded before sleep and loaded again after wake (see post by tseug in "Wake reason: RTC (Alarm) - how to deactivate?"). Edit the following config files as path suggested in comments and give some of the files execution permission:

# author: tseug (see link above)
# /Library/LaunchDaemons/de.bernhard-baehr.sleepwatcher.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>de.bernhard-baehr.sleepwatcher</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/local/sbin/sleepwatcher</string>
                <string>-V</string>
                <string>-s /etc/rc.sleep</string>
                <string>-w /etc/rc.wakeup</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>KeepAlive</key>
        <true/>
</dict>
</plist>


# /etc/rc.sleep
# chmod +x /etc/rc.sleep

#!/bin/sh
# Unload discoveryd to disable maintenance wakeup every two hours
launchctl unload /System/Library/LaunchDaemons/com.apple.discoveryd.plist


# /etc/rc.wakeup
# chmod +x /etc/rc.wakeup

#!/bin/sh
# Load discoveryd to enable network
launchctl load /System/Library/LaunchDaemons/com.apple.discoveryd.plist

You must log in to answer this question.

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