Comment by varenc

2 days ago

   pmset -g assertions

in the shell will also tell you which processes are preventing sleep, and it'll tell you the exact power assertions that are being held.

(`pmset` has some other undocumented commands, you can discovery some of these in its source code Apple releases. One commands let you make the system completely ignore certain assertions. If you disable the "UserIsActive" assertion though you might struggle to wake it up)