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?