Ubuntu – How to prevent resume from sleep/suspend on lid open

laptopsuspendsuspend-resume

I've got pretty much the same problem as this old 2006 thread on the Ubuntu forums: my old laptop's lid is a bit shaky, which causes the computer to wakeup/suspend if I just touch it the wrong way (e.g. lifting it up to move it).

Back then, the fix (see link) was to have a startup script disable LID in /proc/acpi/wakeup every time the computer boots. I'm wondering if there's a better, less hacky, solution?

Best Answer

Its no less hacky, but you can simplify the solution by adding echo "LID " > /proc/acpi/wakeup to the /etc/rc.local file. This way you don't have to create a startup script.

Related Question