Suspend on Lid Close

The ACPI daemon controls what happens when you close the laptop lid or press the sleep button (Fn-F4). Its configuration files are in /etc/acpi/events. To make the laptop suspend to RAM, put a file in there (name isn’t important as long as it doesn’t start with a period) called lid.conf:


More information is in the acpid man page.

For you emacs users, make sure you remove any backup files, because acpid will parse those too. I had lid.conf and lid.conf~. When I sent SIGHUP to acpid to cause it to reparse its configuration, it read both. The result was that closing the lid caused the laptop to sleep. Then when I opened the lid, the second event file was run and it went back to sleep again.