I have a small issue where my macbook won't go to sleep on lid-closing when it's connected to a power supply. I remember having this problem a few weeks ago, and I found this command that could help me debug it. The command works since I would run this command and then close my lid. When I opened the lid, I could see that it was registered the lid was closed and what prevented it from sleeping.

I've tried most of the pmset ones, and I don't think that's it. (It might be though?)

I'm not necessarily looking for that exact one, so my question is:

Any monitoring tools (preferably terminal or command-line) that shows the log of what happens when I close the lid?

  • 1
    I’m going to edit the “I’m not asking you to debug” since that’s what many people call looking at terminal or log files. As long as you want someone to explain how to gather evidence and then make sense of a sleep / wake cycle - that should be an allowable answer. Keep in mind, answers need to help everyone and not just the asker, so be open to people mentioning tools that are not command line centric. You always control the check mark about answers, but anyone can answer even with wrong answers. Votes can handle all that if less useful answers are provided.
    – bmike
    Jul 1, 2018 at 17:04
  • Noted for the future! Jul 1, 2018 at 19:06

1 Answer 1



Have you tried the pmset command for live debugging?

pmset -g pslog

-g pslog displays an ongoing log of power source (battery and UPS) state.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .