Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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? And also, I dont want to switch off the "sleep on lid close" feature either. Thanks!

share|improve this question
This might be an issue unique to lightdm. Perhaps gdm will not have this problem.. – hnasarat Feb 2 at 14:20
May be any logout script delay the process. – totti Feb 2 at 15:18
I have observed the same behavior on Windows 7 as well. – Pavel A Feb 8 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 at 21:34
manage your time better so you are not in such a hurry? – Gui Apr 30 at 2:47
show 4 more comments

3 Answers

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

Second possibility is edit /etc/acpi/powerbtn.sh as following and old content leave below as backup (this is from this question askubuntu.com)

#!/bin/sh
# /etc/acpi/powerbtn.sh
# 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

Dude, if you have the setting of suspending when close lid is on, if you close the lid before complete shutdown, it is going to suspend. I tried it before too... it just DOES it. The best thing for you is to just let it shut down and then close it, or turn the lock feature off.

share|improve this answer
It does not with me. If it's shutting down, it doesn't enter suspended state when I close the lid. This is not wanted behavior anyhow. Ubuntu should not be able to enter suspended when shutting down, it's not logical. – labsin May 21 at 23:54

Your Answer

 
discard

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.