Laptop doesn't hibernate when I close the lid in Ubuntu 14.04

For my script (lid.sh) to be called in /etc/acpi/, I had to create the correct file in /etc/acpi/events/.

The file has to be called lm_lid and the content is as follows:

event=button/lid.*
action=/etc/acpi/lid.sh

Reboot your system to let this take effect.

Note: I moved back to Linux Mint (now 17) before I figured this all out, and this, with the correct file, now works. I'd like to hear from Ubuntu users though.


I had a similar problem in Linux Mint 17.3. It went away when I installed the nvidia video driver in the place of the default open source one. (Administration->Driver Manager->Select nvidia recommended driver)