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.

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.
share|improve this question
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 9: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 9: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
show 6 more comments

8 Answers

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.
share|improve this answer
    
Too long for a comment –  Javier Rivera Feb 16 '11 at 20:55
    
If you like the how-to add kernel parameters, don't forget to vote for the original Htorque answer. –  Javier Rivera Feb 16 '11 at 20:56
    
I edited the topmost entry and added acpi=off to the end of the line starting with linux. I noticed that the line wrapped to another line so I actually added it to that following line - not in the middle. I then booted with that entry and chose restart right from the login screen - and it immediately froze again... –  Torben Gundtofte-Bruun Feb 17 '11 at 6:14
    
Try noapic and nolapic, both are not acpi related. –  Javier Rivera Feb 17 '11 at 19:03
    
noapic = no effect. nolapic worked up to a point, see updated question. –  Torben Gundtofte-Bruun Feb 17 '11 at 19:41
add comment

I would:

  • reseat RAM chips
  • reset BIOS to defaults
  • try to run Live distro and see how it works
  • run MemTest for awhile
share|improve this answer
    
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
add comment

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).

share|improve this answer
    
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 6:22
add comment

Try deactivating the proprietary Nvidia driver to see if that interferes.

share|improve this answer
    
Nope. No impovement here either. But I do need to reconfigure my graphics again :) –  Torben Gundtofte-Bruun Feb 19 '11 at 6:40
add comment
up vote 5 down vote accepted

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.

share|improve this answer
1  
Submit a patch at Launchpad? –  Oxwivi Feb 25 '11 at 9:20
    
Sounds like a good idea. I'm totally new to Linux, so I'm not sure how to do that. Looking into it... –  Torben Gundtofte-Bruun Feb 25 '11 at 9:56
    
I think this bug has already been reported. –  Torben Gundtofte-Bruun Feb 25 '11 at 10:02
add comment

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

(http://linux.koolsolutions.com/2009/08/04/howto-fix-linux-hangfreeze-during-reboots-and-restarts/)

1) Access the grub start-up file :

cd .. && cd .. && sudo gedit etc/default/grub

(https://help.ubuntu.com/community/Grub2#A.2BAC8-boot.2BAC8-grub.2BAC8-grub.cfg)

2) Edit line 12 and save file :

GRUB_CMDLINE_LINUX="reboot=bios" (instead of GRUB_CMDLINE_LINUX="")

3) Update grub:

sudo update-grub

4) Reboot your computer

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

share|improve this answer
1  
You could also try the parameters for ACPI : 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 1:16
    
thanks Jonathan, you helped me a lot!!! –  Nick Bailuc Sep 11 '12 at 19:42
    
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. –  AliNa May 1 '13 at 0:33
add comment

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

INIT_HALT = POWEROFF
share|improve this answer
    
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
add comment

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.

share|improve this answer
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.