Hacker News new | ask | show | jobs
by Firmwarrior 1517 days ago
I think on Windows you can run powercfg /requests

I'm not sure about linux or Mac though

2 comments

On MacOS, Activity Monitor has a "Preventing Sleep" column. From the command line, "pmset -g" or "pmset -g assertions" has useful information.
Now we need a menu appplet, cute icon, and name like Lullaby.
Another super useful powercfg flag is /lastwake to tell you why the computer woke up from sleep.

Has helped me identify flaky input peripherals or timers many times. Worst was an HP laptop with a wonky touch bar for media controls, that would frequently ghost press and wake the computer, even when in hibernate and with the lid closed.