Brightness
Brightness copied to clipboard
Prevent from sleeping
My MBP13 2018 consumes a lot of power overnight. And especially when I am travelling, the power get completely drain. This is really annoying. So I did some search and found this command: pmset -g assertions
Then I got this result:
Assertion status system-wide: BackgroundTask 0 ApplePushServiceTask 0 UserIsActive 1 PreventUserIdleDisplaySleep 0 PreventSystemSleep 0 ExternalMedia 0 PreventUserIdleSystemSleep 1 NetworkClientActive 0 Listed by owning process: pid 87941(Brightness): [0x0005897d00018c7a] 00:02:40 PreventUserIdleSystemSleep named: "Prevent app nap from pausing brightness sync." pid 110(hidd): [0x00057319000988f2] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4295505597.3" Timeout will fire in 1800 secs Action=TimeoutActionRelease
It seems that brightness app has been preventing the mac from sleeping.
Can you fix?
App nap is disabled on this app because it macOS will pause the app and make its timers run very very slowly otherwise.
I wasn't aware that this actually prevents the computer from sleeping. Are you sure this is the case? I am not too familiar with this.
Can you think of any work arounds that will allows the computer to sleep while not affecting the performance of this app?
I have the similar problem. I am not familiar with MacOS development, but the following thoughts may help you:
- Enable App nap and listen to system event described. The system should wake the app up. (at least in iOS it will)
- Listen to system event about "lid close", enable app nap then. And vise versa.
- Dig more about the reason that prevent the system from sleeping - is it really the app nap option?