Ubuntu doesn't want to turn off

5,100

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:
5,100

Related videos on Youtube

dzul
Author by

dzul

Updated on September 18, 2022

Comments

  • dzul
    dzul over 1 year

    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?

    • Admin
      Admin about 11 years
      Have you tried removing Postgresql to see if that resolves the issue? (sudo apt-get remove postgresql)
    • Admin
      Admin about 11 years
      I did, but i still got the same result -_-
    • Admin
      Admin about 11 years
      Me too. Realy annoing especially I don't expect such bugs on LTS release. This bug accured inbetween 1st and 5th March
    • Admin
      Admin about 11 years
      Instead of shutdown it tooks me to login screen.
  • vrcmr
    vrcmr about 11 years
    Apr 14 18:18:46 t61 gnome-session[2464]: WARNING: Unable to stop system: Authorization is required
  • Luis Alvarado
    Luis Alvarado about 11 years
    @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.
  • xZise
    xZise about 10 years
    Shouldn't GUI application be run with gksu(do) instead of sudo alone?