Hey Chef!
I have one more tiny problem.
My Hak doesn't sleep automatically and display doesn't turns off. Here is pmset -g assertions output.
Assertion status system-wide:
BackgroundTask 0
ApplePushServiceTask 0
UserIsActive 1
PreventUserIdleDisplaySleep 1
PreventSystemSleep 0
ExternalMedia 0
PreventUserIdleSystemSleep 1
NetworkClientActive 0
Listed by owning process:
pid 135(coreaudiod): [0x0000b3870001a6e6] 02:34:23 PreventUserIdleSystemSleep named: "com.apple.audio.AppleHDAEngineOutputDP:0,1,0,1,2:0:{B306-32A1-01010101}.context.preventuseridlesleep"
Created for PID: 13162.
pid 135(coreaudiod): [0x0000b3870005a6f6] 02:34:23 PreventUserIdleDisplaySleep named: "com.apple.audio.AppleHDAEngineOutputDP:0,1,0,1,2:0:{B306-32A1-01010101}.context.preventuseridledisplaysleep"
Created for PID: 13162.
pid 99(hidd): [0x0000d53b0009854e] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4295007492.3"
Timeout will fire in 420 secs Action=TimeoutActionRelease
Kernel Assertions: 0xc=USB,BT-HID
id=500 level=255 0x4=USB mod=12/31/69, 6:00 PM description=com.apple.usb.externaldevice.14200000 owner=IOUSBHostDevice
id=504 level=255 0x4=USB mod=12/31/69, 6:00 PM description=com.apple.usb.externaldevice.14900000 owner=USB Optical Mouse
id=505 level=255 0x8=BT-HID mod=12/31/69, 6:00 PM description=com.apple.driver.IOBluetoothHIDDriver owner=AppleHSBluetoothDevice
id=599 level=255 0x4=USB mod=12/31/69, 6:00 PM description=com.apple.usb.externaldevice.14600000 owner=Keyboard Hub
Idle sleep preventers: IODisplayWrangler
Seems that coreaudio is preventing Idleisplaysleep and idlesystemsleep.
If I force it to sleep it will sleep.