Monday, November 21, 2011

[SOLVED] Ubuntu doesn't shutdown properly or hangs at shutdown?


One issue I finally solved. Ubuntu 11.04 works like a charm for my desktop (1 GB DDR RAM and Pentium 4). No issues with either desktop configuration or shutdown. 


However, with my Asus EeePC 1101HA, from the beginning itself there were different issues. It has 1 GB DDR2 (probably) RAM and Intel Atom processor. I had issues with the default desktop configuration (4:3) which made everything appear stretched. I had to install the Intel EMGD drivers to  get a proper display, as posted earlier.


Another issue that was bugging me for sometime - after 2-3 hours of use, even if I shutdown, still it won't stop and it required me to force shutdown. I feared that it may hurt my notebook in long run.


A bit of research gave me an effective solution. Couple of simple steps and you can get rid of the bug easily. Try these steps only when the following command at the terminal doesn't work.



sudo shutdown -P now


If it works, no worries. Else, you need to try Step 1 and 2 along with the Note provided below. With these my shutdown problem is a thing of the past.


Step 1: Go to terminal and type


sudo gedit /etc/default/grub


It will open the grub file. Change the line 
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" 
 to 
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" acpi=force apm=power_off
and close it after saving.


Step 2: Again hit the terminal and type


sudo gedit /etc/modules


It will open the modules - just type apm power_off=1 below lp and save the file.


Step 3: Next type in the terminal
sudo update-grub


Now the grub will be updated and you won't face any issue with shutdown.


This works like a charm in Ubuntu 11.04 with grub2. Hopefully it will work for other versions as well.


Addition on 14Nov2011:


In addition, you may need to modify ACPI configuration to enable smooth shutdown. To do so, type the following in the terminal.


sudo modprobe -rf rt2860sta
sudo modprobe rt2860sta
echo blacklist rt2800pci | sudo tee -a /etc/modprobe.d/blacklist.conf


Once you restart your computer, your shutdown would be proper and things won't hang at shutdown.

18 comments:

  1. Is not like this?
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force apm=power_off"

    ReplyDelete
  2. I tried what you suggested (copied and saved in notepad and placed on the HDD Linux Mint 14 is installed - so I could switch between systems and type it accurately) and now it shuts down within 60-75 seconds of executing the command from grub as it should for a slowish PC with 2 OS installed - all that remains now is to fix the restart problem (Linux hangs instead of restarting and logout does the same) - perhaps there is a fix for those as well?

    ReplyDelete
    Replies
    1. I don't have a ready answer on the restart thing - got to check if there is solution; nothing instant with me right now :)

      Delete
  3. Fixing reboot/shutdown freezes

    If your machine freezes upon attempts to shutdown or reboot, try modifying /etc/default/grub. Open the file with gksudo gedit /etc/default/grub (graphical interface) or sudo nano /etc/default/grub (command-line). Any other plaintext editor (Vim, Emacs, Kate, Leafpad) is fine too. Find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT and add reboot=bios to the end.

    If done properly it should result in something like GRUB_CMDLINE_LINUX_DEFAULT="quiet splash reboot=bios"

    Then save the file, run sudo update-grub and reboot in any way that's possible for you. After that, reboots and shutdowns should start working properly.

    With certain hardware (notably DELL) the kernel parameter that you add needs to be reboot=pci (instead of reboot=bios), the procedure remains the same.


    --.............................------------------------
    This is the solution on the : https://help.ubuntu.com/community/Grub2

    ReplyDelete
  4. It's work for UbuntuGnome 13.10 to.
    Thankyou for this information.

    ReplyDelete
  5. I use GRUB_CMDLINE_LINUX_DEFAULT="" and fixed similar issue in Ubuntu 14.04.

    ReplyDelete
  6. ive tried everything i can find and this on here still struggling to shut down 14.04 any more advice would be helpful thanks

    ReplyDelete
  7. get error now saying killing all remaining processes... [fail]

    ReplyDelete
  8. Why wouldn't this be fixed on subsequent updates ?
    I am new to Ubuntu, and not super familiar with changing commands.
    It would be nice to have a step by step version for us newbies.
    I have been pressing the power button to shut down, and I hope it does not affect the machine.
    I would assume it does not, but a definitive answer would be nice.

    ReplyDelete
    Replies
    1. It happens at times due to mismatch in the drivers and the hardware. In my Ubuntu 14.04 installation, these things are corrected and even Ubuntu 14.04 works damn good on my laptop with touchscreen. So, things are progressing, I guess.

      Delete
  9. Hi,
    I have an AMD 5000+ x2 procecor with NVIDIA GeForce 8200 (OS Linux Mint 17 "Qiana").
    When I going to shouting down my PC it freezing. (on rebooting works perfect)
    I need your help.
    Pericles from Greece.

    ReplyDelete
    Replies
    1. It happens due to mismatch in drivers and the hardware of your PC. Can you please run "Additional Drivers" software in your LM 17 installation and check if it installs any additional drivers.

      Delete
  10. Hi,
    I have an AMD 5000+ x2 procecor with NVIDIA GeForce 8200 (OS Linux Mint 17 "Qiana").
    When I going to shouting down my PC it freezing. (on rebooting works perfect)
    I need your help.
    Pericles from Greece.

    ReplyDelete
  11. Sorry if this is duplicate but it kicked me out when I signed in.

    I installed 14.04 a few months ago and it's working fine (dual boot with Windows) until today. After I let updates run and then restarted the laptop, it didn't want to boot. It comes up with either the menu for choosing what I want to boot (and stays forever), a blank screen (forever), or a command line (forever). I googled a bit and chose to boot up a recovery version, and it booted, but the Netflix package I had previously installed and worked well) is jumpy now, and when I restart the machine I still get one of those other screens. Do I need to install 14.04 again (and, thus, Netflix after that)?

    ReplyDelete
    Replies
    1. And thank you for your reply. Normally I'm not a rude person, just a frazzled newbie.

      Delete
    2. Hi Onoir:

      What are your computer specifications? May be if I know of the computer specs, the graphic cards present, it will help. To know graphic card options, please open the terminal and run the command:
      lspci | grep VGA
      Post the output here for me to assess the graphic cards, processor and RAM present in your laptop.

      Regards,
      Arindam

      Delete
    3. Hi Arindam

      Regards. I tried this method on my Linux Mint KDE 17 edition (you know, what I was thinking, right?) This command: echo blacklist rt2800pci | sudo tee -a /etc/modprobe.d/blacklist.conf disabled my wifi. I seem to have blacklisted it. I have a dual boot laptop with windows 7. The wifi is disabled in windows as well. No matter what I do, I can't seem to get it back on. I tried to reset the bios, no use. Could you help?

      Delete