Turning off Lid Close Standby on Ubuntu Server 14.04 LTS in Three Easy Steps

Published Friday, 09 January 2015

Let's say you've turned your old laptop into a server. Great choice! It's smaller than a full size tower, uses less power, is quieter (most of the time) and if you can't access it you can tab right in on the physical keyboard and screen.

However, open laptops take up more space, so you'll want to close the lid, right? On Ubuntu Server, closing the lid will put your server in standby, which is... unhelpful, to say the least.

Well, here's how to stop that from happening, for all version of Ubuntu from 13.10 onwards (13.10, 14.04 LTS, 14.10 as of January 2015)

Step One

First, open /etc/systemd/logind.conf with a text editor

sudo vim /etc/systemd/logind.conf

Step Two

Find the line with HandleLidSwitch and change it to


Step Three

Save, exit and restart the daemon

sudo service systemd-logind restart

Et Voila! Your server is now happy about running with its lid closed!