Request: action to set/clear 'prevent computer sleeping' setting #335

Closed
andrew-hill opened this Issue May 5, 2014 · 8 comments

Comments

Projects
None yet
3 participants
@andrew-hill

In mavericks, System Settings, Energy preference pane, there's now a checkbox to decide if the computer should go to sleep or not. It's frankly a stupid step backwards compared to the old slider, but what can we do...?

Well ideally we could use controlplane to turn it on/off depending on context (:

At home I want my computer to sleep when not in use, but at work I'm probably waiting for some data processing which for whatever reason doesn't keep it awake... So a toggle action would be useful.

@andrew-hill

This comment has been minimized.

Show comment Hide comment
@andrew-hill

andrew-hill Jun 12, 2014

FYI

  • The exact checkbox in Energy Saver is "Prevent computer from sleeping automatically when the display is off".
  • Enabling the checkbox appears to set pmset -c sleep 0
  • Disabling the checkbox appears to set pmset -c sleep 1

Even though sleep is a value in minutes, I guess the displaysleep value takes priority so the standard behaviour is to go to sleep when the display does, unless sleep is otherwise prevented by an application.

FYI

  • The exact checkbox in Energy Saver is "Prevent computer from sleeping automatically when the display is off".
  • Enabling the checkbox appears to set pmset -c sleep 0
  • Disabling the checkbox appears to set pmset -c sleep 1

Even though sleep is a value in minutes, I guess the displaysleep value takes priority so the standard behaviour is to go to sleep when the display does, unless sleep is otherwise prevented by an application.

@andrew-hill

This comment has been minimized.

Show comment Hide comment
@andrew-hill

andrew-hill Jun 12, 2014

Have been looking at Caffeine and similar apps for a solution to my problem, and am wondering if perhaps a different type of action would be possible too... effectively tell ControlPlane to prevent sleep while a certain context is active. This would use Apple's energy saving API perhaps more as intended, especially with the new multiple context feature.

This would allow for my ideal case of not sleeping while "at work AND plugged into charger AND during work hours". Much better than manually clicking Caffeine often, or having it stay on overnight, or forgetting to disable and having the battery run down unnecessarily...

Have been looking at Caffeine and similar apps for a solution to my problem, and am wondering if perhaps a different type of action would be possible too... effectively tell ControlPlane to prevent sleep while a certain context is active. This would use Apple's energy saving API perhaps more as intended, especially with the new multiple context feature.

This would allow for my ideal case of not sleeping while "at work AND plugged into charger AND during work hours". Much better than manually clicking Caffeine often, or having it stay on overnight, or forgetting to disable and having the battery run down unnecessarily...

@dustinrue

This comment has been minimized.

Show comment Hide comment
@dustinrue

dustinrue Jun 12, 2014

Owner

What machine do you have, my 2010 13" MBP doesn't have any checkbox option. Is it a desktop thing? Also, there is an action to prevent system sleep.

Owner

dustinrue commented Jun 12, 2014

What machine do you have, my 2010 13" MBP doesn't have any checkbox option. Is it a desktop thing? Also, there is an action to prevent system sleep.

@andrew-hill

This comment has been minimized.

Show comment Hide comment
@andrew-hill

andrew-hill Jun 13, 2014

I've got a 2013 15" rMBP, running 10.9.3 and ControlPlane 1.5.1.

Here's the Energy Saver preference pane:

screen shot 2014-06-13 at 11 09 57 am

The only action I can see is "Prevent Display Sleep" (under System Preferences Actions). I can't see any Prevent System Sleep option.

I've got a 2013 15" rMBP, running 10.9.3 and ControlPlane 1.5.1.

Here's the Energy Saver preference pane:

screen shot 2014-06-13 at 11 09 57 am

The only action I can see is "Prevent Display Sleep" (under System Preferences Actions). I can't see any Prevent System Sleep option.

@pavel-sakun

This comment has been minimized.

Show comment Hide comment
@pavel-sakun

pavel-sakun Jun 14, 2014

Isn't "Prevent System Sleep" is implied when we talk about "Prevent Display Sleep"? I've setup a context with the least action and...we've got insomnia.

Isn't "Prevent System Sleep" is implied when we talk about "Prevent Display Sleep"? I've setup a context with the least action and...we've got insomnia.

@andrew-hill

This comment has been minimized.

Show comment Hide comment
@andrew-hill

andrew-hill Jun 16, 2014

Display sleep and system sleep are two different things. Yes, preventing display sleep prevents system sleep, but that doesn't solve my problem because I want the display to sleep. At work, I put my display to sleep to lock the computer (password required to unlock). But I want the computer to stay on so that certain software remains active, along with network connections.

If I use Prevent System Sleep, I risk leaving my computer unlocked for long periods when unattended. And if I don't, the current behaviour is that it goes to sleep, which also deactivates my 'At Work' context. Sleeping & changing network location (resetting all the network interfaces) together manage to mess up a lot of connections, many times a day.

Display sleep and system sleep are two different things. Yes, preventing display sleep prevents system sleep, but that doesn't solve my problem because I want the display to sleep. At work, I put my display to sleep to lock the computer (password required to unlock). But I want the computer to stay on so that certain software remains active, along with network connections.

If I use Prevent System Sleep, I risk leaving my computer unlocked for long periods when unattended. And if I don't, the current behaviour is that it goes to sleep, which also deactivates my 'At Work' context. Sleeping & changing network location (resetting all the network interfaces) together manage to mess up a lot of connections, many times a day.

@dustinrue

This comment has been minimized.

Show comment Hide comment
@dustinrue

dustinrue Jun 18, 2014

Owner

I understand what you're saying. I'll separate them out into two options you can select when you create the action.

Owner

dustinrue commented Jun 18, 2014

I understand what you're saying. I'll separate them out into two options you can select when you create the action.

@dustinrue

This comment has been minimized.

Show comment Hide comment
@dustinrue

dustinrue Jun 20, 2014

Owner

Prevent system sleep action coming in the next version

Owner

dustinrue commented Jun 20, 2014

Prevent system sleep action coming in the next version

@dustinrue dustinrue closed this Jun 20, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment