Skip to main content
Hi ! 

I'm looking for how to check prevent Mac from automatically sleeping when screen is off in battery settings. I don't have this feature in configuration profiles.

Capture-d-e-cran-2022-08-23-a-17-51-48

 

Do you know a solution ? Unfortunately I couldn't find anything :(

 

Regards

@tgazelle The following command should prevent sleep while on battery power:

 

/usr/bin/pmset -b sleep 0

 

If you're running that from a jamf policy the a 'sudo ' prefix isn't necessary


@sdagley thanks for your reply. When I launch this command in my terminal nothing happens and the checkbox remains unchecked. 


@sdagley thanks for your reply. When I launch this command in my terminal nothing happens and the checkbox remains unchecked. 


@tgazelle Did you include sudo before the command when you ran it in Terminal? And was System Preferences closed when you ran it? If the Battery panel is open the setting isn't going to update visually, and when you close the Battery panel it may overwrite the setting.


@tgazelle Did you include sudo before the command when you ran it in Terminal? And was System Preferences closed when you ran it? If the Battery panel is open the setting isn't going to update visually, and when you close the Battery panel it may overwrite the setting.


@sdagley yes sudo is include before the command in my Terminal. I closed all the windows but settings battery settings not changing. 


Reply