Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Ian-Stewart

macrumors newbie
Original poster
Jul 25, 2023
7
2
Everynight my wife's iMac (27" late 2013) comes out from sleep at 21:15. I have checked the back-up software and switched off automatic back-up. I have also checked other software and unplugged it from the internet. Does anyone have any explanation as to why this is happening? Many thanks for any help.
 
That Sleep Aid seems pretty cool; I hadn't heard of it.

You might also find a hint in the logs. In the terminal

log show --start '2023-07-24 21:14:00' --end '2023-07-24 21:16:00' > log.txt

Then open log.txt in TextEdit or some other editor. Search for the string "WakeReason". Some log entries are lost on reboot, so do that before rebooting after the sleep event.

If you'd rather not use the terminal, there are some wonderful tools for looking at the logs at https://eclecticlight.co/consolation-t2m2-and-log-utilities/. Ulbow might be a good choice.
 
Thank you for your replies. Fortunately I prefer using the terminal so now have a log.txt file of 9744 lines, however when I do a search in BBEdit no "WakeReason" is found.
I will also look into the software recommended.
 
Any entries in System Preferences --> Battery --> Schedule ?
(In earlier MacOs versions this was in "Energy Saver" --> "Schedule")
 
  • Like
Reactions: Brian33
EDIT: I was wrong about this being a possible cause of waking the system at a specific time. Rather, 'man launchd.plist' says that if the specified time occurs while the system is asleep, launchd will start the job the next time the computer wakes up. Sorry!



It could be a launchd job, as they can be configured to start at specific times. Some applications install a launchdaemon or launchagent during installation. You could look through the .plist files in the below locations for any that have a "StartCalendarInterval" key:

grep StartCalendarInterval /Library/LaunchDaemons/*.plist grep StartCalandarInterval /Library/LaunchAgents/*.plist grep StartCalandarInterval ~/Library/LaunchAgents/*.plist

See 'man launchd' and 'man launchd.plist'.

You don't say what version of macOS is running. Typically these .plist files are in one of those three locations, but I think with Ventura (?) they are also allowed within .app packages -- which makes them a bit harder to find.
 
Last edited:
The macOS is Mojave. I have now checked the battery schedule and that is not the cause. Also there are no "StartCalendarInterval" commands in any of the .plist files.
The log.txt has 390 searches for "wake", these are the first few:

2023-07-25 21:15:00.005376+0100 0x74 Default 0x0 0 0 kernel: PMRD: System Wake

2023-07-25 21:15:00.007331+0100 0x47c4f Default 0x0 128 5 loginwindow: [com.apple.loginwindow.logging:Standard] SleepWakeCallback_block_invoke | enter. messageType=0xe0000320, gPerformSleepWakeActions=1, userSwitchedOut=0, screenIsLocked=1

2023-07-25 21:15:00.007332+0100 0x47c4f Default 0x0 128 5 loginwindow: [com.apple.loginwindow.logging:Standard] SleepWakeCallback_block_invoke | kIOMessageSystemWillPowerOn, isMainThread:0

2023-07-25 21:15:00.007334+0100 0x47c4f Default 0x0 128 5 loginwindow: [com.apple.loginwindow.logging:Standard] SleepWakeCallback_block_invoke | exiting

Unfortunately I do not know what this information means, even though I have searched the internet.

The iMac wakes on my side but tonight I will leave it on my wife's side and see if the same thing happens. Again, thank you for all your suggestions.
 
Oops -- I was wrong about it possibly being a launchd job. The man page says that if the system is asleep when the specified time occurs, then the job is run the next time the computer wakes up. I've edited my post above to that effect. Sorry to have thrown in a red herring.
 
That's found the problem. I ran it in the terminal and got:

Scheduled power events:
[0] wake at 07/26/23 21:15:00 by 'sdbackupbytime'

However nothing is straightforward. Automatic back-up was set for 21:30 - not 21:15. I erased all back-up settings and quit Superduper. As soon as I reopened it, the automatic back-up was set again. I have now tried this several times so thought the only option is to schedule back-up for 03:45, when the computer is nearly always off. As soon as I opened Superduer the back-up schedule was changed back to 21:30.
There is information how to schedule back-up but not change or cancel it.
 
I'm not sure I understand the man page completely, but it seems that if it's a "pmset" type repeating event, then the command pmset repeat cancel should cancel it. Or, maybe it should be pmset schedule cancelall wake "07/26/23 21:15:00" (quotes needed).

But it sounds like maybe SuperDuper will set it up again. If SuperDuper has a support forum that would also be a good place to ask.
 
Many thanks for that. The commands had to be run as root but the terminal printed that the back-up had been cancelled. I will wait to 21:15 and see if it is successful. If not I will try the SuperDuper forum as suggested.
 
No success unfortunately so I will now post on the SuperDuper forum. Thank you for all you help, I have now found where the problem is fortunately.
 
  • Like
Reactions: Brian33
A partial success. After erasing the SuperDuper scheduling folder in application support twice, the third time I managed to change the automatic back-up time. Not what I wanted but should work. Here is the result when I ran pmset -g sched in the terminal:

Scheduled power events:
[0] wake at 07/27/23 03:45:00 by 'sdbackupbytime'
 
  • Like
Reactions: Brian33
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.