Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #118294

    Richard S. Wright Jr.
    Senior Moderator

    For macOS imagers using version 10.13 (High Sierra), Apple has once again changed their OS policies regarding AppNap. A little over zealous I think in their attempt to prolong battery life for the legions of their users who they seem to think these days use their Mac's for nothing more than shopping and entertaining themselves… yes, I am starting to get a little bitter in my old age perhaps, but people who “work” on a Mac are finding themselves more an more at odds with an OS that seems to be more and more geared towards keeping people entertained and shopping instead of trying to get any creative work done. I miss the old Apple…

    But enough bitter old man talk, what's the deal here? Well, the deal is that in the past you could set a flag for a particular app so that it was immune from the AppNap sand man that would put them to sleep. You could do this via the user shell, by right clicking, selecting “Get Info”, and clicking the “Prevent AppNap” checkbox. Vendors (us) could also set a special flag in our application bundle so we could tell the OS in advance that we should not be indiscriminately put to sleep (and we do do this, so this it isn't an issue on previous macOS releases).

    All of the above is gone with macOS 10.13 (High Sierra). I'm sure the Apple engineers have thought long and hard about the “heuristics” (their wording) of whether an app is actually doing anything important, but they seem to have neglected the use case of an imaging application that is controlling cameras, focusers, and other imaging devices. With the latest version of Sierra, you can start a full on focus run, cover up TheSkyX, and it will just stop. If you wait long enough to notice, it will even drop the USB connection (or at best corrupt the communications flow). I discovered this the hard way because I can only watch so many focus runs (while developing @Focus3) without having to maybe check email, or do some other tasks on my computer at the same time. If you're the kind of imager that starts an image run on the Mac, and leaves it (no screen saver either buddy!), then no problem, but…. This discovery also explains why my image runs lately will mysteriously just STOP in the middle of the night, now I know it's occurring when my display goes to sleep (I have it set for a pretty long while, and I just turn the brightness way down).

    I'm sure astronomical imaging is a tiny blip on their radar, but who in a meeting room said, “yeah even if the app is continually sending and receiving info over a USB port… we should still go ahead and tranquilize it because the user isn't paying attention…”?

    This is easy to demonstrate too. Start TheSkyX, and bring up the Activity Monitor. On the Energy tab, there's a column that shows when a program has been told to lay it's head down on it's desk for a while with the lights off (AppNap). Cover up TheSkyX and this column will go Yes very shortly. Doesn't matter if we are continually making tracking adjustments, moving the focuser, downloading guiding images, etc. Yes, another reason I'm championing more and more using a dedicated Linux box for controlling your imaging run instead of a desktop/consumer operating system.

    The only way I've found to alleviate this issue is to disable AppNap at the OS level for everything. Open a terminal window and type the following (followed by return):

    defaults write -g NSAppSleepDisabled -bool true

    Now be warned dear user of the consequences of doing this. If you start a video or something, and put it in the background, it will continue to drain your laptop battery for no good reason.

    Of course it also won't put your imaging run to sleep should you decide to watch a video or even read your email while it works in the background ;-)




    As one bitter old man to another, I totally agree with you.  As much as I like Apple products, the writing was on the wall in 2007 when they dropped the word computer from their company name to reflect that they were now all about “consumer electronics”.

    Their philosophy seems to have become. Apple knows best and if what you're doing is incompatible with our view then stop what you're doing.

    End rant. :-)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.