25

My system is working perfectly but it freezes during shutdown/reboot/suspend/hibernate: All windows and the menu bar disappear but the desktop wallpaper remains. It doesn't even show the shutdown screen (the one with the animated dots) where I could hit ESC and watch the shutdown console text. The system is brand-new and fully updated using Update Manager.

  1. How can I determine what is causing the freeze?
  2. Is there a log I can investigate?
  3. How can I fix this?

I see no obvious cause of the freeze. The only USB attachment is a mouse/keyboard; I don't have any external storage attached; and I don't have any programs running (the machine freezes even when doing shutdown right from the login screen).

What I've tried so far:

  • Based on other questions (this, this, and this) that suggest some ACPI settings, I've tried sudo shutdown -h now to see whether the shutdown console text display offers any hints, but the system doesn't even get that far - it still freezes while the screen shown the desktop background image, without any toolbars. Only sudo shutdown --force works, but that's not a solution.
  • Editing the grub menu to add acpi=off to the kernel didn't help. I guess there's not much point in trying the other (lesser) ACPI suggestions?
  • Adding noapic to the grub entry had no discernible effect. Adding nolapic instead did something (I had removed the quiet option) - the system managed to continue further with the shutdown, right until the line Checking for running unattended-upgrades: which were the last characters on the screen.
  • I've also checked the system BIOS, especially regarding power options, but didn't see anything out of the ordinary. Switching the BIOS standby setting from S3 to S1 didn't help. The standby setting can't be disabled, and there are no other ACPI-related settings AFAIK.
  • BIOS reset didn't help. Not surprised; hadn't changed anything.
  • I tried going to a virtual console (CtrlAltF1) as suggested by djeikyb and from there did a shutdown -h now and it froze there too, after this console output. I didn't try killing processes one at a time because I'm still too newbie to figure out how to do that.
  • Booting with kernel 2.6.35.22 rather than 2.6.35.25 didn't help.
  • Disabling the Nvidia drivers didn't help.
  • Booting from Live CD (USB stick in fact) didn't help; it freezes the same way.
  • Booting from Live CD, with acpi=off noapic nolapic didn't help either. Neither did just nolapic. So evidently this is not some custom setting in my install, but some sort of basic issue.
  • MemTest competed in 1 hour without errors.
  • 2
    Hanging at shutdown/restart shouldn't prevent any kind of installation. Linux is not windows, files can be replaced while in use, Ubuntu will not make the upgrades while rebooting. Reboot is only required to make sure that the new executables are loaded. – Javier Rivera Feb 16 '11 at 09:00
  • @Javier sorry but I disagree. Some installations and specifically the Nvidia drivers explicitly require steps during shutdown. There's also a step in the normal shutdown procedure that checks for any other pending installations just before reboot. If you're right, why does the Update Manager ask for a reboot, and why does the power menu rename the "reboot" entry to "reboot to finish installing upgrades"? (quoted from memory.) In general I am very pleased with Ubuntu and also with the fact that all programs can be installed and are available instantly. But for drivers it may be different? – Torben Gundtofte-Bruun Feb 16 '11 at 09:10
  • Don't be sorry about disagreement. Knowledge usually comes after disagreement. I can't see any script related to upgrades executed at shutdown but for /etc/init.d/inattended-upgrades, and this just checks if a upgrading is in process and forces shutdown to wait for them to complete. The menu changes because you usually(*) need to reboot to apply the upgrades, the kernel should be reloaded. I don't know about nvidia proprietary driver, but most graphical drivers while start just with an X reboot (and maybe some rmmod). – Javier Rivera Feb 16 '11 at 10:14
  • @Javier, ah yes "unattended-upgrades" is what I see during shutdown (on my other machine). Thanks for explaining that! :-) – Torben Gundtofte-Bruun Feb 16 '11 at 11:00
  • @torbengb: sorry but, this is not the case. Power menu has that "reboot to finish installation upgrades" is highly misleading and it does not mean what you think. There is nothing that should be do on shutdown to "finish installation" as you may think. That text is intended to mean that you have to reboot to use the new version of some softwares, like new kernel can be installed/upgraded but you still use the older one till a reboot. It does NOT mean that shutdown does any extra step on installation! You are wrong here, even nvidia driver install does not do anything "extra" on shutdown. – LGB Feb 16 '11 at 12:48
  • @LGB thanks for clarifying further what Javier also explained. I now understand that the reboot itself does not affect the upgrade process - and that is cool! - But I am still stuck with a system that cannot shut down. – Torben Gundtofte-Bruun Feb 16 '11 at 13:23
  • I agree with you. It's likely an ACPI issue, I hope that the output of a command line shutdown can help. If not, then I was going to suggest to boot with quiet option and look at the shutdown messages. – Javier Rivera Feb 16 '11 at 14:56
  • @Javier: please put that as an answer. – Torben Gundtofte-Bruun Feb 16 '11 at 15:19
  • @torengb: I prefer that answer are just that answers not request for more info ;). Askubuntu has great placement in Google, this question will be useful for much more people than us. I believe that keeping answers as, well... answers will be more helpful for all of them. – Javier Rivera Feb 16 '11 at 16:34
  • I'm really running out of options here... I dearly hope a solution will present itself. It would be catastrophic to not be able to suspend, or even shutdown! (Meaning back to Windows installation again, which I'd really hate to do.) – Torben Gundtofte-Bruun Feb 23 '11 at 19:13
  • I'd check with the manufacturer to see if theres a BIOS update. Posting the actual model of the computer as well as the BIOS firmware version (command: dmidecode) would be helpful. – komputes Feb 24 '11 at 16:10
  • Try deactivating the proprietary Nvidia driver to see if that interferes. – Torben Gundtofte-Bruun Feb 18 '11 at 07:28
  • Nope. No impovement here either. But I do need to reconfigure my graphics again :) – Torben Gundtofte-Bruun Feb 19 '11 at 06:40
  • Check what kernel version is in use. According to this answer, there's a problem with one version; try another. If that other kernel version works, then the problem has been identified (not solved). – Torben Gundtofte-Bruun Feb 18 '11 at 07:24
  • Newest kernel is 2.6.35.25. Also available is 2.6.35.22. I've just tried that; problem remains. – Torben Gundtofte-Bruun Feb 19 '11 at 06:22
  • 2* "try this"answers.... shouldn't these be converted to comments or deleted altogether? ;-) – Fabby Oct 26 '16 at 21:19

8 Answers8

8

This answer on Ubuntu Forums has the exact solution! (Why didn't I post there in parallel to here on AU? It would have saved a week of calendar time and several hours of computer time!)

The wrong driver is loaded which prevents shutdown. To fix it you need to do this:

Open a terminal and type: sudo modprobe -rf rt2860sta

Followed by: sudo modprobe rt2860sta

Then you need to blacklist the wrong driver:
echo blacklist rt2800pci | sudo tee -a /etc/modprobe.d/blacklist.conf

Once you have rebooted (you will need to do a hard power off for the last time!) you will find you can reboot properly.

4

For Ubuntu 11.10, you could try the reboot=bios option (or other options):

  1. Access the GRUB configuration file as explained here.

    cd .. && cd .. && sudo -H gedit etc/default/grub
    
  2. Edit the line GRUB_CMDLINE_LINUX="" so it says:

    GRUB_CMDLINE_LINUX="reboot=bios"
    

    and save the file.

  3. Update GRUB to write the configuration:

    sudo update-grub
    
  4. Reboot your computer

    (it may hang on the purple screen, but hopefully for the last time...)

abu_bua
  • 10,783
Jonathan
  • 1
  • 1
  • 1
    You could also try the parameters for ACPI : http://www.brighthub.com/computing/linux/articles/39504.aspx – Jonathan Jan 24 '12 at 18:17
  • 1
    It is always safer to put options on GRUB_CMDLINE_LINUX_DEFAULT coz it doesn't affect boot entry for recovery mode. – Mahesh May 19 '12 at 01:16
  • I had this problem only when rebooting with Ubuntu/Lubuntu/Xubuntu on an old PC (Intel Celeron, 512 MB RAM). I tried all solutions, but just your answer helped. Thanks. – AliNajafies May 01 '13 at 00:33
2

I have fixed this by adding the following line to the file /etc/default/halt:

INIT_HALT = POWEROFF
Peachy
  • 7,117
  • 10
  • 38
  • 46
Fabio
  • 582
  • Thank you it really worked!!!. I still cannot find out which package really brought this nuisance. I was aware of each packages as I installed them. It started to show when I had installed virtualbox (I later thought it was due to mpd). I cannot really determine how to revert it. – razor Oct 23 '12 at 15:54
2

It could be an ACPI problem. You can try to pass the kernel some parameters to disable some of ACPI functions. Note this will result in a loss of features (power management) or performance (lots of polling).

First a little explanation about how to add some kernel parameters, robbed miserably from Htorque:

  1. Start your system and wait for the GRUB menu to show (if you don't see a GRUB menu, press and hold the left Shift key right after starting the system).
  2. Now highlight the kernel you want to use, and press the c key. You should be able to see and edit the commands associated with the highlighted kernel.
  3. Go down to the line starting with linux and add one of the following parameters after a space.
  4. Now press Ctrl + x to boot.

You cant try the following options, one each time, they are ordered from more aggressive, likely to work to less aggressive but less functions disabled:

  • acpi=off , this one should completely disable acpi. It's the most likely to work, but you will lose all your power management.
  • pci=noacpi , this will make the kernel to ignore acpi for pic scanning and irq assignment.
  • acpi=noirq, this will only disable irq assignment through acpi.
  • irqpoll, this will make the kernel poll for all unattended irq interruptions.
  • noapic, this will make the kernel ignore the APIC.
Javier Rivera
  • 35,153
1

I would:

  • reseat RAM chips
  • reset BIOS to defaults
  • try to run Live distro and see how it works
  • run MemTest for awhile
jet
  • 7,274
  • Live distro didn't help; same effect. BIOS reset didn't help; same effect. MemTest is planned for tonight. Reseating the RAM requires breaking the seal; I'd rather not, as this is a brand new machine. – Torben Gundtofte-Bruun Feb 23 '11 at 12:26
0

In most of the cases this happens due to buggy graphics card. E.g In ubuntu 12.04, I had to install all updates (including the ones related to xorg). After that, I installed catalyst 12.10, which solved the problem. I suggest you remove (if installed) laptop-mode-tools (including its dependencies i.e ethtool, sdparm), because it also causes the shutdown to crash.

razor
  • 398
0

Strangely enough my problem was resolved when I removed the parameter "now". That is, I was using:

sudo /sbin/reboot now

and it was getting stuck,

but when I used:

sudo /sbin/reboot

the problem was solved.

I don't understand why. The problem appeared only when I installed Ubuntu 13.10.
I still have 3 other stations with the same exact hardware but with an older version of Ubuntu 12.04 and I don't have this issue.

swift
  • 3,281
  • 2
  • 23
  • 46
Haroon
  • 1
  • I noticed that when I add the "now" parameter then the following message is printed: "The system is going down for maintenance NOW!" and when I omit it then the message is slightly different: "The system is going down for reboot NOW!" – Haroon Jun 28 '14 at 09:09
0

I also faced the same situation but could not get it solved through any of the above methods. Although there can be many causes to this problem but i solved this by disabling the USB 3.0 controller in BIOS menu.

Kapil Garg
  • 113
  • 4