Keep a monitor from sleeping

macdsl
New Contributor III

We have a Global Corporate Policy of screensaver after 5 min, and require password to unlock after 15.
That works fine, and dandy, no problems there.

But we also have high-end Color Artists that use the HP Dreamcolors and those like a 30-minute warm-up period;
So, each time an artist goes to a long meeting, or a lunch their Monitors are asleep and asking them to wait 30 minutes is bad.

I just need the monitors to not sleep for 2 hours when machine is idle. We don't want the monitors to be 24/7 because we do re-calibration every 2000 hours on them.

Would a policy of caffeinate -d work? Anyone know?

2 REPLIES 2

mking529
Contributor

The problem with using caffeinate in this scenario is that it prevents the screen saver from starting automatically. You can use a hot corner to work around this, but otherwise the machine will just sit at the desktop indefinitely while caffeinate is running.

You might need to avoid system sleep too so perhaps caffeinate -dis would be more appropriate. I'd also end your command with an ampersand so that an instance of the jamf binary isn't stuck running forever on that one command. With the ampersand at the end, it will fork off from the terminal session. If you needed to disable it with another policy with the command killall caffeinate should do the job.

Look
Valued Contributor III

You can probably use pmset in a script to set monitor sleep to whatever you need it to be.
Something like one of the following (either off or 120 minutes).

pmset displaysleep 0
pmset displaysleep 120

You might find is that if you specify a specific number of minutes it might have to exactly equal one of the options you get when you use the UI slider to select the same setting, although looking at the slider it appears to let you select almost to the exact number of minutes although I have seen some settings that don't conform to this be ignored.