I've set up a friends laptop with Ubuntu 12.04LTS with the Cinnamon desktop, and I'm having a few issues with the power settings.

As far as I can tell I've got every setting to "Do Nothing" when the lid is closed, however it still Suspends when I close the lid. After much Googling I'm still no closer to a solution, so I came here for help.

  • Could you add the laptop brand/model? Most hardware switches are manufacturer specific. – user.dz Jul 5 '15 at 4:20

You need to configure logind.conf - this should not disable suspend, it should just to tell it to ignore the lid switch.

This will also override any of your user's power settings, and will work whether you are logged in or not (system-wide). You can configure it via running:

sudo nano /etc/systemd/logind.conf

You should like something like this: enter image description here

Change HandleLidSwitch= line to this (with no # at the beginning - a # at the beginning of the line means it is a comment and will be ignored and the defaults will be used):


Here is a quote from a manual page - note it can take other values like lock, poweroff etc.

HandlePowerKey=, HandleSuspendKey=, HandleHibernateKey=, HandleLidSwitch=

Controls whether logind shall handle the system power and sleep keys and the lid switch to trigger actions such as system power-off or suspend. Can be one of "ignore", "poweroff", "reboot", "halt", "kexec", "suspend", "hibernate", "hybrid-sleep" and "lock". If "ignore", logind will never handle these keys. If "lock", all running sessions will be screen-locked; otherwise, the specified action will be taken in the respective event. Only input devices with the "power-switch" udev tag will be watched for key/lid switch events. HandlePowerKey= defaults to "poweroff". HandleSuspendKey= and HandleLidSwitch= defaults to "suspend". HandleHibernateKey= defaults to "hibernate".

The manual page for logind is here

| improve this answer | |
  • When typing that command in Terminal I get this message; nano/etc/systemd/logind.conf: command not found – Pyrotequila Feb 23 '14 at 16:07
  • You need a space after nano :-) - you need to copy it exactly. If you still get that error, run this command first sudo apt-get install nano. – Wilf Feb 23 '14 at 16:14
  • Got it to show up now. However as I'm new to Linux I'm not entirely sure I've got the right thing as there's no text to edit... It's just a blank screen. – Pyrotequila Feb 23 '14 at 18:15
  • If it says 'New file' at the bottom, you have - added screenshot. – Wilf Feb 23 '14 at 18:18
  • Honestly no idea what I'm doing here :-/ I get this page i62.tinypic.com/2h4b8n8.png – Pyrotequila Feb 23 '14 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.