Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
andrew-hill opened this Issue · 8 comments

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

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

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
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.

@andrew-hill

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

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

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
Owner

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

@dustinrue
Owner

Prevent system sleep action coming in the next version

@dustinrue dustinrue closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.