QRecallDownloadIdentity KeysForumsSupport
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Groups] Back to home page 
sleep, power nap, etc.  XML
Forum Index » General
Author Message
Mike M



Joined: 12-Aug-16 02:01
Messages: 31
Offline

I'm interested in minimizing power usage of my MacBook. It's usually plugged into power and sitting on my desk with an external monitor. I'd like it to sleep after being idle for a short time, any time of day or night that it's idle. But I'd also like it to wake for QRecall actions, any time of day or night.

I'm having trouble understanding Mac automatic sleep (I have High Sierra). I see that I can set the "power savings" settings to turn off the displays after a fixed time, say five minutes. I don't see anywhere I can tell it to sleep after a fixed idle time. There is a button that says "enable power nap"... is that the way you tell a Mac to put itself to sleep?

Second, I'd like QRecall to wake it. This seems to work (I've put "wake" as the action to take before QRecall actions). If I put the MacBook to sleep manually, it will wake up a few minutes before the schedule QRecall action. I'd like it to go to sleep afterward, but I'm hesitant to use that as a setting in my actions. I don't really want to force it to sleep, because I might be doing something else or running some other software. I'd really like to use the OS to sense idle time and put it back to sleep (or "power nap" if that's what it does).

So, can you explain how to get a Mac to automatically sleep and whether QRecall actions will always wake it (given that setting)? And what's the best way to handle trying to put it back to sleep.

Thanks,
Mike
James Bucanek



Joined: 14-Feb-07 10:05
Messages: 1434
Online

In the modern macOS, laptops no longer have an explicit idle sleep time (that you can set). It is now "always" and "automatic", with a few exceptions.

The power saver system preferences settings is now divided into two panes: Battery and Power Adaptor.

In the battery section you have the ability to set the idle sleep time for the display. The shorter this time the more power you'll save, and the sooner your display will sleep. The entire computer sleeps immediately, or a short time, after this.

In the power adaptor pane you can also set a sleep time for the display. The system will also go to sleep soon afterward, unless you've set the time to "Never" or checked the "Prevent computer from sleeping automatically when the display is off" option.

So when you're not using your system, the display will dim and then power down after the time you've set, and the entire system will go to sleep soon afterwards. There are, of course, a number of exceptions to this.

Software (like QRecall) can request that the system not go to sleep. QRecall actions do this when they start running (or an action is about to start). This is what prevents the system from going to sleep while a QRecall action is working. Once the action has finished, it signals to macOS that it no longer needs to keep the system awake.

Another exception is the lid. Closing the lid of a laptop will cause the system to go to sleep. It doesn't matter what your settings are or what software is running, the system will stop. Normally this isn't a problem for QRecall, but it can be depending on your hardware (external volumes sometimes have problems reconnecting after power is restored and cause read/write errors immediately after waking up).

When you add a "Before scheduled time: Wake" to the schedule, QRecall tells the power manager to wake your system (assuming it's asleep) a minute or two before the action is scheduled to run. If the lid is closed, there's not enough battery, or the system is shutdown, this request it ignored.

The "After running actions: Sleep" option sends a request to the system that, after the QRecall action has finished running (and there are no other actions ready to start), the system should go to sleep at its earliest convenience. It is not a command. It does not force the system to go to sleep. If you're using the system, or if other software is requesting that it not go to sleep, this request is ignored. So if you want your (idle) system to go back to sleep soon after a QRecall action has finished, set this schedule option. Note that even without this option, the system will eventually go back to sleep on its own, it just might take longer depending on your display sleep time setting.

Finally, "Power Nap" is a feature added in macOS 10.8 that, on certain laptops, will occasionally "wake" from sleep to enter a very-low power mode that performs limited background tasks and then goes back to sleep. These include checking your mail, updating your calendar, performing Time Machine backups, downloading software updates, and so on. The system isn't useable and only Apple designated tasks are suppose to be running. But in real life, we've experienced problem with Power Nap that it allows some background QRecall tasks to run/start, but will often leave external drives powered down so those tasks might fail.

If you need or like Power Nap, go ahead and turn it on. Your mail will be waiting for you when you wake the system up again. On the other hand, if you have QRecall actions that start and fail during power naps, consider turning it off.

I hope that answers everything!

This message was edited 3 times. Last update was at 09-Apr-19 16:08


- QRecall Development -
[Email]
Mike M



Joined: 12-Aug-16 02:01
Messages: 31
Offline

Thanks for the thorough response! One question: can QRecall wake the laptop from sleep? I mean, if the laptop went to sleep long before the scheduled action. Or will it miss actions that should have happened when it was sleeping?
James Bucanek



Joined: 14-Feb-07 10:05
Messages: 1434
Online

If you set the "Before scheduled time: Wake" option in the schedule, QRecall will schedule a "wake" event to occur a couple of minutes before the action is next scheduled to run.

If you don't, the action will run as soon as the system wakes up again.

As a rule, scheduled actions run as soon as they can. If an action was scheduled to run at 03:00 and the system was asleep or shutdown, that action will run as soon as the system wakes up or is booted. You can make an exception for the latter case by adding an "Ignore if shutdown" condition.


- QRecall Development -
[Email]
Mike M



Joined: 12-Aug-16 02:01
Messages: 31
Offline

What I don't understand is what it means to schedule a "wake" action? Is that something registered with the operating system that will be monitored even while the laptop is asleep, and capable of waking it from sleep? Or does QRecall have no ability to wake a sleeping laptop, rather only the ability to prevent it from sleeping?

Mike
James Bucanek



Joined: 14-Feb-07 10:05
Messages: 1434
Online

Mike,

"Wake" and "Power On" requests are registered and scheduled with the power management processor—the hardware that actually controls the power for the system. The power manager runs even when the system is shutdown. This is the same hardware used when you go to the energy saver system preferences, click "Schedule," and tell your laptop that you want it to start up every day at 08:00.

If you're interested, you can manipulate the power manager using the pmset tool in the Terminal. For example, to list the currently scheduled wake/startup events use pmset -g sched.


- QRecall Development -
[Email]
Mike M



Joined: 12-Aug-16 02:01
Messages: 31
Offline

Thanks, that sounds like a perfect application... my laptop can sleep as much as possible, but wake for actions.
 
Forum Index » General
Go to:   
Powered by JForum 2.1.8 © JForum Team