Sleep settings not using assertions? Sleep Bug?
#1
I've run into a curious problem. My mini is serving dual purposes. It serves as the primary HTPC in my living room using XBMC while also serving up streaming via iTunes to various Apple TV's throughout the house.

I recently got the sleep function working so that my Mini's external storage would also sleep which made me VERY happy but had an unfortunate side effect. Although my mini was set to sleep after 15 minutes of inactivity, this never actually happened with XMBC because I had XBMC's sleep settings disabled. Apparently it puts in an assertion into OS power settings (PMSET -G ASSERTIONS) to prevent sleep. Once I enabled the sleep options in XBMC, it allows the mini to sleep when the timer runs out.

The side effect is that as soon as the XBMC timer is done, it forces the mac to sleep even though it may be streaming to an Apple TV, running a backup, or be in the middle of a file copy. The mac will also not wake up via remote, requiring you to power it on with the power button on the Mac itself.

If I understand these assertions properly, what should happen is that XBMC should release it's assertion into the sleep timer so that the mac can sleep normally after the OS idle time is met. Instead it seems to be issuing a sleep command as soon as the XBMC timer is reached and it ignores any existing OS assertions preventing sleep outside of XBMC. In addition, the XBMC sleep timer only goes to 120 minutes (many movies are longer than that these days). If someone starting streaming to an Apple TV, the Mac wakes up, starts streaming as expected. No activity in XBMC in this scenario so the sleep timer is already counting and it forces a shutdown when the timer runs out regardless of other OS activity and assertions, effectively killing the Apple TV stream when it goes into a forced sleep. If you disable the sleep timer in XBMC, the Mac never sleeps. You can verify this by looking at the sleep assertions in Terminal: PMSET -G ASSERTIONS

Any chance that either what appears to be a bug can be fixed, or a simple workaround to prevent XBMC from forcing sleep, but rather allowing the Mac to idle sleep per the OS settings, or lastly (worst case), simply editing an XML somewhere to increase the GUI 120 minute setting to something longer?

Best case, when the XBMC sleep timer runs out, it should remove any assertions on the OS sleep timer, and allow the OS idle timer to start counting down so that other OS apps are not adversely affected by the unexpected sleep.

Thanks!
Reply
#2
+1
Image Image
Did I Help? Add to my reputation
Reply

Logout Mark Read Team Forum Stats Members Help
Sleep settings not using assertions? Sleep Bug?0