Skip to main content
Solved

Energy "Prevent automatic sleeping when the display is off

  • March 2, 2023
  • 10 replies
  • 241 views

PE14_2
Forum|alt.badge.img+7

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

 

 

Best answer by PE14_2

@sdagley thanks for your time

10 replies

sdagley
Forum|alt.badge.img+25
  • Jamf Heroes
  • March 2, 2023

@PE14_2 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

PE14_2
Forum|alt.badge.img+7
  • Author
  • Valued Contributor
  • March 2, 2023

@PE14_2 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
Forum|alt.badge.img+25
  • Jamf Heroes
  • March 2, 2023

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


@PE14_2 Yes, that should work with any Mac


PE14_2
Forum|alt.badge.img+7
  • Author
  • Valued Contributor
  • Answer
  • March 3, 2023

@sdagley thanks for your time


markopolo
Forum|alt.badge.img+8
  • Contributor
  • May 22, 2024

@PE14_2 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

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
Forum|alt.badge.img+25
  • Jamf Heroes
  • May 22, 2024

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.


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.


markopolo
Forum|alt.badge.img+8
  • Contributor
  • May 22, 2024

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
Forum|alt.badge.img+25
  • Jamf Heroes
  • May 22, 2024

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.


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/ManifestsApple/com.apple.MCX-EnergySaver.json), or use iMazing Profile Editor to build and sign a profile with that setting then upload that profile to Jamf Pro for distribution.


markopolo
Forum|alt.badge.img+8
  • Contributor
  • May 22, 2024

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/ManifestsApple/com.apple.MCX-EnergySaver.json), 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!


KyleEricson
Forum|alt.badge.img+17
  • Valued Contributor
  • June 2, 2025

@sdagley thanks for your time


When you deploy this will the UI show it being enable or not?