Disable network time when preventing Lid Close Sleep
iccir opened this issue · comments
The original purpose of Fermata was to keep music playing in all circumstances when DJing. On my MacBook Air (2018) running Mojave, timed
is causing audio glitches (see rdar://46918065).
Even with "Set date and time automatically" disabled, timed
occasionally gets a com.apple.timed.ntp.wanted
notification from dasd
(another bug?) which causes audio glitches (although less frequently).
My solution: a new "Extras" feature to Fermata, which can include additional actions like "disable network time" as well as "disable dasd entirely" or "disable software updates".
We should also have a "linger" feature, which persists the "disable network time" setting for 1-5 minutes after audio stops playing. This prevents an awkward situation where you pause the music temporarily to make an announcement, start up the next track, and then timed
decides to kick in and glitch the first few seconds of your music.
The only way to disable timed
that prevents audio glitches is to unload it from launchd
, and then reload it later to re-enable.
Unloading a system daemon requires that SIP be disabled. I always disable SIP anyway, but I don't want to suggest it to general users.
Per some of the links in this reddit thread, locationd
might also be a culprit (although my guess is that it sends a "here's the new timezone" message to timed
, and timed
pauses the audio engine). Furthermore, this Gearslutz thread suggests that AppleSmartBatteryManager is at fault.
I'm a very paranoid DJ when it comes to audio glitches, and I want to disable all of these.
My idea:
Fermata should have the ability to run a script in response to disabling Lid Close sleep, and another script upon re-enabling (or quitting). This would allow all of the above to be disabled on my machine, while not explicitly mentioning SIP or including features which require that SIP be turned off.
From my testing, Apple fixed the timed
issue in 10.14.4. Closing this issue.
Note on my above idea: I'm hesitant to add the ability for Fermata to run an arbitrary script, as I'm worried about privilege escalation.
its not fixed, m1 pro :(
@Geczy - there’s not a lot that can be done in that case. SIP can be disabled and timed unloaded (as mentioned above), but disabling SIP has a lot of additional complications nowadays, especially on M1 hardware. :(