I have a weird problem where my laptop will wake when it's closed, generating a lot of heat and causing much frustration.
Is there a way that I can tell if the laptop's lid is closed so that I can automatically suspend the computer (via a cron script) if it wakes itself while the lid is closed?
Closing the lid does currently suspend the machine and opening it does wake it, so that works properly. It's a 2011 MacBook Pro running Ubuntu 12.04.
Best Answer
For my specific case, I can get the status of the lid with
I can then just grep for
open
orclosed
to see if it's open or closed.