6

At 2:14 every morning, my Mac wakes. Looking at the logs, I see it's a scheduled event, but nothing shows up in System Preferences > Power. When I go to terminal, and run pmset -g sched, I see

Scheduled power events:
[0]  wake at 03/31/13 02:14:00

Only one, for the next event. I can delete it through pmset, and it won't wake that night (morning). The next day, there's a new event. So for instance, after that one went, now I see

Scheduled power events:
 [0]  wake at 04/01/13 02:14:00

I've locked the Power Management preferences, I've even set the com.apple.AutoWake.plist file to remove all write access through chmod, and the next day... a new entry appears.

Taking Lauri's suggestion, I ran opensnoop on the Autowake.plist, and at 2:15, this happened, inserting that power event:

2013 Apr  4 02:15:00     0     20 powerd         4 /Library/Preferences/SystemConfiguration/com.apple.AutoWake.plist 
2013 Apr  4 02:15:00     0     20 powerd         5 /Library/Preferences/SystemConfiguration/com.apple.AutoWake.plist 
2013 Apr  4 02:15:00    89  15241 mdworker       4 /Library/Preferences/SystemConfiguration/com.apple.AutoWake.plist 

I didn't see anything in /Library/LaunchDaemons/ or /Library/LaunchAgents/ that seemed relevant. Execsnoop returned

2013 Apr  4 02:15:00    89  15241  14058 mdworker
2013 Apr  5 02:15:00    89  24165  19851 mdworker

What the heck is going on, and how do I stop this from happening? Or what's the next step to troubleshoot this? Thanks.

Vitals: it's a Mac Mini, 10.8.3, but it's done this for ages (including when migrated from a previous Mac Mini via Time Machine).

4
  • 1
    Have you checked everything in /Library/LaunchDaemons/ or /Library/LaunchAgents/? You could try running sudo opensnoop -v -f /Library/Preferences/SystemConfiguration/com.apple.AutoWake.plist and sudo execsnoop -v > exec in two shells. Or just run sudo crontab -e and add something like */10 * * * * pmset repeat cancel.
    – Lri
    Commented Apr 2, 2013 at 21:03
  • Done, and watching the file offered some new information, thanks.
    – DMZ
    Commented Apr 4, 2013 at 17:36
  • powerd is what modifies the file when you use pmset. The execsnoop command redirects output to a file named exec, which might show what other processes start before powerd.
    – Lri
    Commented Apr 5, 2013 at 2:00
  • Thanks. Done, and added the excerpt from the output. There's nothing around the 02:15 entries that seems consistent (a lot of coreservicesd, mdworker, but not at the same timestamps every night...)
    – DMZ
    Commented Apr 9, 2013 at 2:23

5 Answers 5

3

Run syslog |grep -i "Wake reason" from the terminal.

Reference this article: http://osxdaily.com/2010/07/17/why-mac-wakes-from-sleep/

Update: log show | grep -i "Wake reason"

5
  • Done -- all I see are normal wake-on-keyboard events, like $ syslog | grep -i "Wake reason" Mar 30 14:12:45 Dereks-Mac-mini kernel[0] <Debug>: Wake reason: ? Mar 31 10:59:36 Dereks-Mac-mini kernel[0] <Debug>: Wake reason: ?
    – DMZ
    Commented Mar 31, 2013 at 18:03
  • What USB devices do you have plugged in? For me, my unexplained wake up was caused by a usb mouse. Once I unplugged it, no more issues.
    – kelsmj
    Commented Apr 1, 2013 at 0:43
  • Keyboard, mouse. I also would expect if it's USB that it'd show in the wake reason -- was that true for you?
    – DMZ
    Commented Apr 1, 2013 at 4:01
  • Yes, it did show in the console log. It ended up being my Razer Orochi mouse.
    – kelsmj
    Commented Apr 1, 2013 at 9:54
  • Right, but did it show as Wake Reason = USB, or what I'm seeing, as Wake Reason: ?. I'm skeptical this is the cause since a USB device might wake it, but is unlikely to be creating a scheduled power event every night for 02:14.
    – DMZ
    Commented Apr 1, 2013 at 18:16
1

I stumbled upon this issue while trying to resolve out mine. I realize the OP is YEARS old, but the problem persists.

From what I've gathered, it appears to be related to Weekly Usage reports.

This was what I put together and resolved with (source article listed below):

  • I was having the same problem as you described
  • I discovered a scheduled wake call for 10pm nightly, in System Information > Power (would find my battery drained over night)
  • Neither pmset -g log | grep "Wake Requests" or pmset -g sched produced any results visible results for me
  • I finally traced down my issue here: cat /Library/Preferences/SystemConfiguration/com.apple.AutoWake.plist
  • Was able to resolve (hopefully) using this: sudo pmset schedule cancelall
  • WakeEvent no longer shows in Sys Info > Power

Another user in the following article (last post) said this was his solution: sudo pmset -b tcpkeepalive 0

After some research, I found the Apple Discussion com.apple.alarm.user-visible-Weekly Usage Report keeps waking my Macbook Pro at night while lid closed. I pulled my solution from it.

0

The article posted here may help you. It details some plist files to delete that will be recreated on the next power up.

http://tancredi.co.uk/2007/12/9/solving-macbook-wake-from-sleep-issue

2
  • Thanks. I'll report back and edit this when results are in. Initially, there was no reference to a 02:14 wake event in either file, and after deleting and recreating, the 02:14 event still doesn't show in Power Scheduling/these files, but appears when I do pmset -g sched.
    – DMZ
    Commented Mar 31, 2013 at 18:16
  • This seems to not have helped: the scheduled power event is still being inserted somehow.
    – DMZ
    Commented Apr 1, 2013 at 18:14
0

On 2013 era macs, the System management controller (SMC) keeps it’s own clock and schedule so you may want to reset that and then check again in system preferences to see if the wake schedule is being set there.

I have not seen this failure mode on the T2 and Apple Silicon era Mac hardware but a one time SMC reset followed by a one time NVRAM reset would usually do the trick on a sticky reboot setting.

0

Had this problem on Macbook Pro(macos sequoia 15.1). You can see the wake schedule in System report > power > scroll to bottom.
I was able able to solve it by running sudo pmset schedule cancelall

You must log in to answer this question.

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