Posted on 08-26-2022 08:34 AM
When enrolling certain devices, they're becoming caffeinated and I have no idea what is causing it. Obviously, it's preventing our devices from ever going to sleep or having their screensaver kick on. I have gone through every script and app install (including their pre and post install scripts) that we deploy and have not been able to come across a single caffeination command.
Anyone know how to tell exactly what is causing the caffeination? I have the command to fix it, but I want to prevent it from happening in the first place.
Posted on 08-26-2022 10:05 AM
@rosskivowitz If you can open Activity Monitor do that, select All Processes from the View menu, and then search for caffeinate you can see what process spawned it by selecting it and clicking the "Inspect selected process" button (the i with a circle around it)
You might also create a Restricted Software configuration for the caffeinate process and see when it gets triggered
Posted on 08-26-2022 11:07 AM
Thanks. I tried that but it's just routing back to launchd.
Posted on 08-26-2022 11:16 AM
@rosskivowitz Take a look at the LaunchDaemons you have installed, and any scripts they trigger, to see if one of those calls caffeinate
Posted on 08-26-2022 01:17 PM
I went through all of them and didn't see any caffeination command. It's so odd. Any chance there's a terminal command that I could run that would monitor ongoing processes to see if it can detect an originating process that's creating the command in the first place? For example, the installation of app ABC runs a script that issues a caffeination command. Is there a terminal command I can run that would detect for the command yield back that it originated from the install of ABC? Thanks for your help and any insight!
Posted on 08-26-2022 02:05 PM
@rosskivowitz I haven't tried it myself, but I believe ProcessMonitor from Objective-See (https://objective-see.org/products/utilities.html ) will provide details on what launched a caffeinate process