Energy "Prevent automatic sleeping when the display is off

PE
Contributor

Hi all,

At System Settings -> Display -> Advanced -> Energy  you can this turn off or on  "Prevent automatic sleeping when the display" Any idea of this is possible to control this with Jamf? 

thanks

Screenshot 2023-03-02 at 15.36.05.png

 

 

1 ACCEPTED SOLUTION

PE
Contributor
9 REPLIES 9

sdagley
Esteemed Contributor II

@PE Running the following command via a Files and Processes payload will set the Mac to not go to sleep when it's plugged in:

/usr/bin/pmset -c sleep 0

@sdagley thanks this works also with an iMac? this one is always plugged in ;-)

sdagley
Esteemed Contributor II

@PE Yes, that should work with any Mac

Is this really the only way to do this? I could have sworn we used to be able to set this from a profile payload in Jamf.

sdagley
Esteemed Contributor II

Yes, as was pointed out in a similar thread there is an Energy Saver Configuration Profile payload I'd forgotten about, but at least in Jamf Pro's implementation of the configuration GUI for that payload there is no option for never go to sleep.

Yeah, that's the one I'm talking about. Didn't there used to be a "never" option there? It's possible I imagined it.

sdagley
Esteemed Contributor II

Apple's MDM spec says the sleep time can be between 1 and 180 minutes, or 0 to disable. Jamf's GUI doesn't support that for the Energy Saver payload so you can use the JSON Manifest for com.apple.MCX-EnergySaver (see https://github.com/Jamf-Custom-Profile-Schemas/ProfileManifestsMirror/blob/main/manifests/ManifestsA...), or use iMazing Profile Editor to build and sign a profile with that setting then upload that profile to Jamf Pro for distribution.

Nice, I'll give that a go. Thanks for the suggestion!

PE
Contributor

@sdagley thanks for your time