Like it!

Join me on Facebook!

Like it!

No more hibernation when closing laptop lid in Ubuntu 14.04

Whenever I close the laptop lid, it goes to sleep mode. How can I disable such behavior?

I have a crappy HP netbook with Ubuntu Server 14.04 on it. Whenever I close the lid, hibernation mode kicks in. I definitely don't like that: during hibernation the machine stops working. The solution: tweak a parameter on a systemd configuration file. Systemd is a set of core tools that form a basic building block for Linux. In particular I am going to touch systemd-logind, a daemon responsible for login management.

  1. open /etc/systemd/logind.conf;
  2. find the key HandleLidSwitch=[...] and set it to HandleLidSwitch=ignore. Add it if it does not exist;
  3. reboot.

That's it. To bring the original configuration back, switch that line to HandleLidSwitch=ignore.

comments