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 am running 12.10. Usually when I am in a hurry I press the shutdown button on the bar and close the lid of my laptop just after that. Often, I observe that instead of shutting down, the system suspends (because I closed the lid right after) and the shut down process resumes after I reopen the lid which wakes it up.

Is there any workaround such that once the shutdown button has been pressed, Ubuntu does not allow "suspension on lid close" and it carries out the shutdown (and not the sleep) even if the lid is pulled down right after the shutdown button is pressed?

Also, I don't want to switch off the "sleep on lid close" feature either.

share|improve this question
This might be an issue unique to lightdm. Perhaps gdm will not have this problem.. – hnasarat Feb 2 '13 at 14:20
May be any logout script delay the process. – totti Feb 2 '13 at 15:18
I have observed the same behavior on Windows 7 as well. – Pavel A Feb 8 '13 at 8:04
I think you have a process that is slowing down shutdown. Have you tried looking in the shutdown logs or whatever they are called ? – Suhaib Feb 8 '13 at 21:34
manage your time better so you are not in such a hurry? – TheXed Apr 30 '13 at 2:47

This is a bug, subscribe to it and wait till it's fixed:

share|improve this answer

You can try add this line sleep 5 bellow #!/bin/bash in file /etc/acpi/

Second possibility is edit /etc/acpi/ as following and old content leave below as backup (this is from this question

# /etc/acpi/
# Initiates a shutdown when the power putton has been
# pressed.

/sbin/shutdown -h now "Power button pressed"
exit 0

# leave the old code below (in case you want to revert!)
share|improve this answer

The best option is to change the suspend option when lid is closed. Change the lid close option to nothing. The shutdown process was initiated first but some process delays it and mean while when you close the lid it gets suspended.

share|improve this answer

protected by Community Apr 16 '14 at 18:35

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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