Hello everyone,
I'm here to report strange problem. Problem which started in previous versions OS X but became more and more annoying recently and I decided to investigate further. My iMac is late 2012 model, 21.5 inch, with Fusion Drive and 16GB RAM.
It happened in the past, I mean in previous versions of OS X like Yosemite and El Capitan, but recently I started investigating what is happening and I'm trying to find answer 'why'.
My iMac used to wake itself up randomly. But actually now I now it wasn't and it isn't 'randomly' - my iMac wakes up from sleep exactly every 70 minutes.
I found something like this in Apple Support pages here https://support.apple.com/en-gb/HT202124
(...)Mac notebook and desktop computers have a power standby feature that conserves energy. During standby, the state of your session is saved to flash storage (SSD). Then, the power turns off to some hardware systems such as RAM and USB buses(...)
Other requirements to enter standby are different for notebooks and desktops.
The interesting part is: "Desktops must have no external media mounted". And that is actually true - the issue I'm writing about doesn't occur then I have an external drive mounted. And that's explaining why I thought it was a random issue earlier and now I know it's not. Basically, in the past I used to leave all USB drives mounted almost all the time and disconnected them very rarely. But in last few weeks/months I had no drives connected to my iMac and started to notice this waking-up issue every day and investigated until I found the following.
I run pmset command in Terminal (pmset can manipulate power management settings):
I found standbydelay value 4200 seconds which is exactly 70 minutes. And standby value is 1. From manual pages:
standby causes kernel power management to automatically hibernate a machine after it has slept for a specified time period. This saves power while asleep. This setting defaults to ON for supported hardware. The setting standby will be visible in pmset -g if the feature is supported on this machine.
So I thought my iMac should enter standby mode after 70 minutes, right? Not really because is the same manual I found next sentence:
standby only works if hibernation is turned on to hibernatemode 3 or 25.
If my understanding is correct, my iMac should never ever enter standby because hibernatemode value is 0, right?
I spent few days testing different scenarios, trying to eliminate other factors which could wake up my iMac. I didn't want to change the value of standbydelay (nor to enable hibernation) because I wanted to fully test it and post my results and questions here without manipulating the settings. I don't have Wake for network access option enabled and I don't allow bluetooth devices to wake my iMac. And also my final test was with everything disconnected: I unmounted all USB drives, I physically disconnected USB cables, I disconnected second screen, I unplugged Ethernet cable and disconnected from Wi-Fi - and my iMac kept waking itself up from sleep every 70 minutes. Here are some logs from one night:
My iMac went sleep at 00:33hrs
and was awake 70 minutes later
then automatically went to sleep after 2 hours
and woke up again after 70 minutes
I not that the easiest answer would be: "Hey, increase standbydelay value and you have no problem!" Thank you but I don't want to do that. I already found some people changing this setting but mostly MacBook users who want to wait longer before their macs hibernate (on machines where this feature actually does what is should do). I'd really like to find out why my iMac doesn't stay in a sleep mode. If need be, I can increase standbydelay value but only as my last resort.
I hope someone will tell me why the heck my iMac keeps waking from sleep
Cheers
Edit: I forgot to mention, I already tried resetting System Management Controller (SMC) and also NVRAM.
I'm here to report strange problem. Problem which started in previous versions OS X but became more and more annoying recently and I decided to investigate further. My iMac is late 2012 model, 21.5 inch, with Fusion Drive and 16GB RAM.
It happened in the past, I mean in previous versions of OS X like Yosemite and El Capitan, but recently I started investigating what is happening and I'm trying to find answer 'why'.
My iMac used to wake itself up randomly. But actually now I now it wasn't and it isn't 'randomly' - my iMac wakes up from sleep exactly every 70 minutes.
I found something like this in Apple Support pages here https://support.apple.com/en-gb/HT202124
(...)Mac notebook and desktop computers have a power standby feature that conserves energy. During standby, the state of your session is saved to flash storage (SSD). Then, the power turns off to some hardware systems such as RAM and USB buses(...)
Other requirements to enter standby are different for notebooks and desktops.
- Notebooks need to be running on battery power. It also must not have any external connections (such as Ethernet, USB, Thunderbolt, SD card, displays, Bluetooth, and so on).
- Desktops must have no external media mounted (such as SD cards, USB, or Thunderbolt storage devices).
The interesting part is: "Desktops must have no external media mounted". And that is actually true - the issue I'm writing about doesn't occur then I have an external drive mounted. And that's explaining why I thought it was a random issue earlier and now I know it's not. Basically, in the past I used to leave all USB drives mounted almost all the time and disconnected them very rarely. But in last few weeks/months I had no drives connected to my iMac and started to notice this waking-up issue every day and investigated until I found the following.
I run pmset command in Terminal (pmset can manipulate power management settings):

I found standbydelay value 4200 seconds which is exactly 70 minutes. And standby value is 1. From manual pages:
standby causes kernel power management to automatically hibernate a machine after it has slept for a specified time period. This saves power while asleep. This setting defaults to ON for supported hardware. The setting standby will be visible in pmset -g if the feature is supported on this machine.
So I thought my iMac should enter standby mode after 70 minutes, right? Not really because is the same manual I found next sentence:
standby only works if hibernation is turned on to hibernatemode 3 or 25.
If my understanding is correct, my iMac should never ever enter standby because hibernatemode value is 0, right?
I spent few days testing different scenarios, trying to eliminate other factors which could wake up my iMac. I didn't want to change the value of standbydelay (nor to enable hibernation) because I wanted to fully test it and post my results and questions here without manipulating the settings. I don't have Wake for network access option enabled and I don't allow bluetooth devices to wake my iMac. And also my final test was with everything disconnected: I unmounted all USB drives, I physically disconnected USB cables, I disconnected second screen, I unplugged Ethernet cable and disconnected from Wi-Fi - and my iMac kept waking itself up from sleep every 70 minutes. Here are some logs from one night:
My iMac went sleep at 00:33hrs

and was awake 70 minutes later

then automatically went to sleep after 2 hours

and woke up again after 70 minutes

I not that the easiest answer would be: "Hey, increase standbydelay value and you have no problem!" Thank you but I don't want to do that. I already found some people changing this setting but mostly MacBook users who want to wait longer before their macs hibernate (on machines where this feature actually does what is should do). I'd really like to find out why my iMac doesn't stay in a sleep mode. If need be, I can increase standbydelay value but only as my last resort.
I hope someone will tell me why the heck my iMac keeps waking from sleep
Cheers
Edit: I forgot to mention, I already tried resetting System Management Controller (SMC) and also NVRAM.
Last edited: