I run a MacBook Pro with OS X 10.11. I've noticed the machine hasn't slept well last night. There were events logged every couple of seconds in system.log throughout the entire night that the lid was closed.
I think it might be that two processes are preventing sleep while on A/C.
# pmset -g
System-wide power settings:
[...]
sleep 10 (sleep prevented by UserEventAgent, UserEventAgent)
Can I stop these processes (or any other process) from preventing sleep?
pmset -g assertions
? – Graham Miln Aug 27 '16 at 11:29pmset -g assertions
shows that everything (including PreventSystemSleep) is set to OFF (zero). The only value set to 1 in that output is UserIsActive. The last line from that output is: "Idle sleep preventers: IODisplayWrangler" but I'm guessing it's unrelated. – Dex Aug 27 '16 at 11:36<date> <time> <hostname> airportd[60]: SecTaskLoadEntitlements failed error=22
. This has been going on for the past few days, and it is thus unrelated to the problem with lack of sleep that started only yesterday. – Dex Aug 27 '16 at 12:23