Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Ubuntu 12.04 with nmap and metasploit installed on it. My problem is when I try to shutdown, Ubuntu refuses to turn off. When I check the running processes, I see that PostgreSQL 9.1 is still in "stopping process" (I guess). The next time I try to stop PostgreSQL before shutdown, the case is still not solved.

After a frustrated time, I start to think to uninstall the metasploit with command ./uninstall but the result is still the same.

Is there anyone who know how to solve this problem?

share|improve this question
    
Have you tried removing Postgresql to see if that resolves the issue? (sudo apt-get remove postgresql) –  Mordoc Mar 9 '13 at 2:07
    
I did, but i still got the same result -_- –  dzul Mar 9 '13 at 3:49
    
Me too. Realy annoing especially I don't expect such bugs on LTS release. This bug accured inbetween 1st and 5th March –  vrcmr Apr 8 '13 at 13:17
    
Instead of shutdown it tooks me to login screen. –  vrcmr Apr 8 '13 at 13:28
add comment

1 Answer 1

up vote 10 down vote accepted
+200

If you have already done sudo halt, sudo shutdown -h now, sudo shutdown now or even init 0 and the system still does not actually shutdown, I suggest to first see in the logs which process is not shutting down correctly. I would start with syslog:

cat /var/log/syslog or better yet tail -n50 /var/log/syslog and see if there is anything in there mentioning the problem.

As you mentioned, you have removed several apps that you thought were the issue, even removing postgresql because it was the one that was showing as shutting down too slow.

Another very important part to check is your BIOS. Make sure, in the power management settings has the correct options enabled or set so that an OS can shutdown the computer.

Lastly, you can check some kernel options to see if the problem is power management related. In the terminal type:

sudo gedit /etc/default/grub

and on the line that says:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Add in the second line one of this options:

  • noapic - Will turn off APIC.

  • acpi=off or noacpi - Will turn off ACPI.

  • acpi=force - Will Force use of ACPI.

It should look like this after editing (Example showing noapic)

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="noapic"

More information about this 2 options in What are the F6 options during installation?

After setting one of those, save the file and type in the terminal sudo update-grub. then reboot and test to see if the system shuts down.

If you still have a system that does not shutdown and has what you commented:

gnome-session[2464]: WARNING: Unable to stop system: Authorization is required

You might be suffering from one of this bug reports

You will find there suggestions that go from editing /etc/default/halt to changing the order of some services in the rc folders (rc0.d...rc6.d).

What I would suggest, at least until the bug is eliminated is to do a sudo kill -9 PROCESSID or sudo killall PROCESSNAME command on the process that is giving you a problem.

share|improve this answer
    
Thank you for your answer. –  vrcmr Apr 9 '13 at 16:33
    
Apr 14 18:18:46 t61 gnome-session[2464]: WARNING: Unable to stop system: Authorization is required –  vrcmr Apr 14 '13 at 16:27
    
@vrcmr - When it says something related to Authorization you can read this bug report bugs.launchpad.net/ubuntu/+source/upstart/+bug/880240 of force the process to die painfully with a sudo kill -9 2464 for example or a sudo killall PROCESSNAME. There is also another bug report related to this here: bugs.launchpad.net/ubuntu/+source/unity-greeter/+bug/861171. Will add this information to the question and give you some aggressive options. –  Luis Alvarado Apr 14 '13 at 16:40
    
Shouldn't GUI application be run with gksu(do) instead of sudo alone? –  xZise Apr 28 at 9:42
add comment

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.