Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I decided to use my Eee PC 1001HA as a home server. I have it connected through Wi-Fi to the router, running Ubuntu Server 12.04. Everything works fine except this annoying problem:

when I close the lid, the ssh server stops working and, I guess, wlan0 too.

Tried the BIOS and nothing, no option about the lid. My wlan0 is a RaLink RT3090.

Tried ls -lrt /var/log between lid derivatives, but I can't understand those satanic logs. I can share them if needed.

pm-powersave.log seems to be updated between lid movements. So I guess I've to disable this "powersave" service. Can I do this? I don't mind if the server runs all day.

Remember that there is no UI, this is a netbook with a lid and its connected to the ac adapter.

edit: This is just a workaround but I am able to click the power-button and close the lid quickly. This way the server boots normally and connects to the wireless network automatically. (found here)

share|improve this question
Try: sudo nano /etc/default/acpi-support – user164045 Jun 3 '13 at 7:46
The answers at this location helped me -… – Sepero Jun 4 '14 at 15:34

Don't know if you're still looking for this, but to disable entering the sleep mode I had to edit the /etc/systemd/logind.conf file and modified the line:




Then do

sudo service systemd-logind restart

share|improve this answer
sudo sh -c 'echo "HandleLidSwitch=ignore" >> /etc/systemd/logind.conf' && reboot – FreeSoftwareServers Dec 22 '15 at 5:38
Worked for me on 14.04 x64 server (Lenovo ThinkPad T410) – FreeSoftwareServers Dec 22 '15 at 5:38
Worked for me on 15.10 x64 server (Asus G73JW) – VeenarM Dec 24 '15 at 12:11
Worked for me on Ubuntu Mate 14.04.3 x64 (LTS), running on a Asus K52F. Thanks! (and +1 ;) ) – SonicARG Jan 28 at 21:00
This worked good for my 14.04 – Kirill Gusyatin Apr 21 at 6:26

just to confirm, 14.04 LTS Server user here on a Dell X100e.

sudo apt-get install acpi-support
sudo vi /etc/default/acpi-support # and then set SUSPEND_METHODS="none"
sudo /etc/init.d/acpid restart

Instantly able to close lid, no issues.

Just posting to confirm the previous posters' solution as the only fix needed. No need (currently) to do anything else in addition to this.

share|improve this answer
This did not work for me on server 14.04 LTS. After applying these changes, when I close the lid, the disk drive runs for a second and then wifi goes out. – lonstar Dec 13 '14 at 16:04
This did nothing for me on my Asus G73JW, Ubuntu server 15 , HandleLidSwitch did – VeenarM Dec 24 '15 at 12:10

Everything stops working because...the laptop goes to sleep! (suspend mode).

To stop, just disable the ACPI lid-button event.

Edit /etc/acpi/event/lidbtn and comment out the bottom two lines:

  # /etc/acpi/events/lidbtn
  # Called when the user closes or opens the lid
  event=button[ /]lid  # comment this out with a # at the beginning
  action=/etc/acpi/ # same here 

Reboot, and that should be it.

share|improve this answer
Hi izx, I dont have that file. My "/etc/acpi/" has one file "powerbtn". And the "/etc/acpi/events" has another file with same name: "powerbtn" – ffunenga May 25 '12 at 5:54

I am using 14.04 LTS with ASUS EEE.

The solution by Stephan above didn't work for me. However, this answer worked.

share|improve this answer
I.e., editing /etc/systemd/logind.conf. This also worked for me on a non-Ubuntu system, with a special needed for the behavior of the DE started by the DM. – imz -- Ivan Zakharyaschev Jul 20 '15 at 9:56

I think setting the SUSPEND_METHODS="none" in /etc/default/acpi-support, does the same thing

share|improve this answer

This worked for me - my Ubuntu Server install didn't have /etc/acpi/event/lidbtn either, but I installed the acpi-support package and then it showed up.

The package installs a whole bunch of other X11 related packages but doesn't enable graphical mode, don't worry.

Once I commented the last two lines as above then my laptop stayed running with the lid closed.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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