Sunday, October 20, 2013

Ignoring lid close on Xubuntu 13.10 / xfce

Yesterday I've installed Xubuntu 13.10 (the low-resources version of Ubuntu which fits older, weaker machines) on my 10" laptop. I intend to work with the laptop plugged into a large screen. Naturally, after I connected the laptop to the screen I closed the lid. Whoops! The computer became suspended...

To make a long story short, it's not the BIOS fault, and trying to solve this via xfce's Settings Manager did not work. Or at least, did not do enough. Any suggestions I've read online on how to solve it (dconf editing, gconf editing, writing acpid handlers...) did not do the trick.

The solution came from the arch linux forums:
https://bbs.archlinux.org/viewtopic.php?id=154914

Edit the logind.conf file (I found it on /etc/systemd/logind.conf), uncomment the HandleLidSwitch=suspend line and change it to HandleLidSwitch=ignore.

sudo nano /etc/systemd/logind.conf
-#HandleLidSwitch=suspend
+HandleLidSwitch=ignore

Done! I've rebooted the system and everything worked like magic.

3 comments:

  1. Oh thanks, this made my day, as I was searching for 5 or 6 hours how to set my computer at hibernating (and not suspending) when shutting off the lid. I can now use xfce-power-management's settings...

    For every other xubunter around here, do not forget to UNCOMMENT the parameter by removing the "#" (Lost at least 4 hours on this)

    ReplyDelete
    Replies
    1. I totally get you... I had tons of real stuff to actually do, but I just couldn't let go of this, it was terribly annoying.
      Thanks for your reply!!! This is the first real reply I ever got in this blog :) Just so you know that you really made my day.

      Delete
  2. I've tried the other solutions mentioned and they failed too. This finally worked for me! Thank you so much.

    ReplyDelete