OS X Kodi went sleep even AirPlay is active
#1
HW: MacMini 2010
OS X: 10.11.2
KODI: 15.2
Reproducible: Always

Hi there, got issue with power saver of Kodi. Maybe its kind of conflict with OS X itself, let me describe it.

I am using KODI as HTPC at dedicated MacMini for this purpose.

I am also running AirServer app under for mirroring my iPhone, iPad, MacBook etc.

The problem is, even I set "do not sleep when AirPlay is active" in AirServer - Mac went to sleep when KODI is running.

If I close KODI, everything is fine as expected, but this causing me very awful behavior:

1) I have opened KODI all time - because of HTPC purposes.
2) When I want to AirPlay something, I have to quit KODI (otherwise Mac sleep after few minutes).
3) When AirPlaying is done, I have to reopen KODI.

Yes, I know about "support" of AirPlay in KODI, but this functionality isnt really good Sad sorry devs

So the question is - is there any way how to configure KODI to not ignore "do not sleep" from background running AirServer?
Reply
#2
you won't believe me i guess but if the airserver doesn't want the mac to sleep it should add a power management assertion for this. No other app (not even kodi) could prevent this assertion. Beside that i have no clue how kodi could influence the sleep behavior of the mac. Are you using any sleep related addons or have setup spmething like that in kodi somehow?
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#3
I am using just OS X integrated power saving features.
I set power saving mode for 15 and HDD spin off for 30 minutes when idle.
AirServer got feature to overwrite it when receiving AirPlay stream and it works.
It works, until I run KODI.
When AirServer is receiving AirPlay and KODI is running on foreground, Mac go to sleep right after those 15 minutes Sad
Maybe it not AirServer nor KODI fault, maybe its OS X related bug/feature Sad
Reply
#4
mhh i believe your findings but have no clue how kodi could influence this - there are command line tools to show which apps hold which power assertions - you would need to call those once with and once without kodi running and maybe you see a difference (i think it can be watched with "pmset" iirc)
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#5
Sorry for not replying for a time - got troubles with my account.

Tried to pmset assertions, but from my point of view everything should work.

AirPlay running
Code:
Galileo:~ galileo$ pmset -g assertions
2016-01-31 22:33:24 +0100
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   0
   PreventUserIdleDisplaySleep    1
   PreventSystemSleep             0
   ExternalMedia                  0
   InternalPreventDisplaySleep    1
   PreventUserIdleSystemSleep     1
   NetworkClientActive            0
Listed by owning process:
   pid 57(powerd): [0x000361a80010024d] 00:01:02 InternalPreventDisplaySleep named: "com.apple.powermanagement.delayDisplayOff"
Timeout will fire in 259 secs Action=TimeoutActionTurnOff
   pid 170(coreaudiod): [0x000361e0000120d8] 00:00:07 PreventUserIdleSystemSleep named: "com.apple.audio.~:StackedOutput:0.context.preventuseridlesleep"
Created for PID: 8159.
   pid 170(coreaudiod): [0x000361e0000520d9] 00:00:07 PreventUserIdleDisplaySleep named: "com.apple.audio.~:StackedOutput:0.context.preventuseridledisplaysleep"
Created for PID: 8159.
Kernel Assertions: 0x108=BT-HID,MAGICWAKE
   id=501  level=255 0x100=MAGICWAKE mod=31.01.16 22:24 description=en0 owner=en0
   id=518  level=255 0x8=BT-HID mod=01.01.70 1:00 description=com.apple.driver.IOBluetoothHIDDriver owner=AppleBluetoothHIDKeyboard
   id=522  level=255 0x8=BT-HID mod=01.01.70 1:00 description=com.apple.driver.IOBluetoothHIDDriver owner=BNBTrackpadDevice
Idle sleep preventers: IODisplayWrangler
AirPlay + KODI running
Code:
Galileo:~ galileo$ pmset -g assertions
2016-01-31 22:33:41 +0100
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    1
   PreventSystemSleep             0
   ExternalMedia                  0
   InternalPreventDisplaySleep    1
   PreventUserIdleSystemSleep     1
   NetworkClientActive            0
Listed by owning process:
   pid 8172(Kodi): [0x000361f1000520ed] 00:00:07 NoDisplaySleepAssertion named: "XBMC requested disable system screen saver"
   pid 170(coreaudiod): [0x000361f0000120e3] 00:00:07 PreventUserIdleSystemSleep named: "com.apple.audio.~:StackedOutput:0.context.preventuseridlesleep"
Created for PID: 8172.
   pid 170(coreaudiod): [0x000361e0000120d8] 00:00:24 PreventUserIdleSystemSleep named: "com.apple.audio.~:StackedOutput:0.context.preventuseridlesleep"
Created for PID: 8159.
   pid 170(coreaudiod): [0x000361f0000520e4] 00:00:07 PreventUserIdleDisplaySleep named: "com.apple.audio.~:StackedOutput:0.context.preventuseridledisplaysleep"
Created for PID: 8172.
   pid 170(coreaudiod): [0x000361e0000520d9] 00:00:24 PreventUserIdleDisplaySleep named: "com.apple.audio.~:StackedOutput:0.context.preventuseridledisplaysleep"
Created for PID: 8159.
   pid 57(powerd): [0x000361a80010024d] 00:01:19 InternalPreventDisplaySleep named: "com.apple.powermanagement.delayDisplayOff"
Timeout will fire in 293 secs Action=TimeoutActionTurnOff
   pid 102(hidd): [0x000361ec000920e2] 00:00:11 UserIsActive named: "com.apple.iohideventsystem.queue.tickle"
Timeout will fire in 648 secs Action=TimeoutActionRelease
Kernel Assertions: 0x108=BT-HID,MAGICWAKE
   id=501  level=255 0x100=MAGICWAKE mod=31.01.16 22:24 description=en0 owner=en0
   id=518  level=255 0x8=BT-HID mod=01.01.70 1:00 description=com.apple.driver.IOBluetoothHIDDriver owner=AppleBluetoothHIDKeyboard
   id=522  level=255 0x8=BT-HID mod=01.01.70 1:00 description=com.apple.driver.IOBluetoothHIDDriver owner=BNBTrackpadDevice
Idle sleep preventers: IODisplayWrangler
The clue is, that in second case, Mac is going to sleep after 15 minutes (scheduled time in settings).
Reply
#6
Also I am quite afraid that those pmsets could not be accurate.

Normal use "No monitor, no keyboard, no trackpad - just KODI remote or AirPlay streaming"

Diagnostic pmset use "Active display, detected active BT keyboard and trackpad"
Reply
#7
kodi holds the nodisplaysleep assertion which should be enough to keep the mac awake...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi went sleep even AirPlay is active0