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.