Shirt Pocket Discussions

Shirt Pocket Discussions (https://www.shirt-pocket.com/forums/index.php)
-   General (https://www.shirt-pocket.com/forums/forumdisplay.php?f=6)
-   -   MacBook Pro Sleeping During Backup (https://www.shirt-pocket.com/forums/showthread.php?t=7122)

Ric 04-05-2018 08:07 AM

MacBook Pro Sleeping During Backup
 
Last week I upgraded my 2015 MacBook Pro to macOS 10.13.4 and SuperDuper! to 3.1.4. I have a scheduled backup that occurs at 4:14 every morning -- the MacBook Pro is scheduled for wakeup at 4:14 and SuperDuper! is scheduled for 4:14. Ever since the upgrade, my MacBook Pro wakes up at the correct time and SuperDuper! launches, but the computer goes back to sleep before the backup starts. This morning, SuperDuper! had stopped on the countdown pop-up, but resumed backing up once I woke the computer. Some mornings it gets past the pop-up, but goes to sleep before the backup gets started and resumes when I wake the computer. Any thoughts on what might be causing this?

dnanian 04-05-2018 09:28 AM

We're doing two things to try to keep the Mac awake. First, as soon as our time-based schedule driver recognizes it's going to have to run copy (this should only take fractions of a second), we hold the Mac awake with "caffeinate":

Code:

/usr/bin/caffeinate -t 180 &> /dev/null &
That should keep the Mac awake for three minutes, which should be long enough to get going.

Second, when SuperDuper! starts a copy (basically, when it gets to the status window), we hold the Mac awake with a power assertion that says "don't go to sleep".

When you saw this happen, did we go to sleep before three minutes had elapsed?

Ric 04-05-2018 09:43 AM

I'm pretty sure the MacBook went back to sleep before three minutes was up. I'll check the system log when I get back home later today.

dnanian 04-05-2018 09:45 AM

Was the lid closed?

Ric 04-05-2018 10:31 AM

The lid was open.

Ric 04-05-2018 10:53 AM

One more thing to add -- I upgraded to macOS 10.13.4 last Thursday and Friday morning was the first time I noticed sleep interfering with SuperDuper!, which I had not upgraded to 3.1.4 yet (I did later that day). Something must have changed on the macOS side.

dnanian 04-05-2018 11:12 AM

Yes, that's quite likely, and I'm trying to determine what.

Ric 04-05-2018 04:24 PM

One more piece of the puzzle -- The SuperDuper! log doesn't show it starting at 4:14, it shows it starting at 4:58, which is when I logged on. Since it was active, I had assumed it had started at the scheduled time and paused, but it looks like it started when I logged on.

For what it's worth, when I upgraded, I deleted the existing SuperDuper! schedule entry and re-entered it.

Nothing jumps out at me in the macOS system.log file.

dnanian 04-05-2018 04:26 PM

It's possible that they either put the Mac to sleep, ignoring our caffeinate call, or they are refusing the allow us to run until you're logged in, because we have a UI.

If you set it to run a few minutes from now, lock your screen (I assume you're not actually logged off) and wait, say, five minutes so you can see if the backup drive is going, does it go while you watch and it's definitely not sleeping?

Ric 04-05-2018 05:31 PM

I think you're on to something, Dave. I scheduled a 5:23 backup and locked the screen. I came back at 5:28, unlocked the screen, and SuperDuper! was on the countdown pop-up, like this morning.

dnanian 04-05-2018 05:33 PM

Yep. OK, so this is why the Scheduling section of the User's Guide warns that it won't work if the screen is locked - Apple keeps changing the behavior here, and it's obviously not letting our app launch when the screen is locked...

Ric 04-05-2018 05:37 PM

At least now I know what is going on. Thanks!

dnanian 04-05-2018 05:41 PM

We'll see if we can get around the new behavior somehow...but, it shouldn't be too bad running while you're at the Mac. (I do it all the time.)

Ric 04-14-2018 07:01 AM

I made another observation last week on this. As stated before, SuperDuper! is not starting at 4:14 am when my MacBook Pro wakes. However, when I get up later, if I tap a key or click the mouse to wake the screen and don't do anything else, SuperDuper! will run even though I am not logged in.

dnanian 04-14-2018 09:27 AM

I think we've managed to work around this in the next update, Ric.


All times are GMT -4. The time now is 07:54 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.