Pages

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.

35 comments:

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

    ReplyDelete
    Replies
    1. Near the top of the grub file you will see the following lines:

      # For full documentation of the options in this file, see:
      # info -f grub -n 'Simple configuration'

      If you run that command in the terminal you see a help file, where it says, again near the top:

      "normally, [the contents of grub] will just be a sequence of 'KEY=value' lines, but if the value contains spaces or other special characters then it must be quoted. For example:

      GRUB_TERMINAL_INPUT="console serial"
      "
      So, "quiet splash" is one thing but has a space in the middle so must be quoted. The other terms such as acpi=off don't include spaces and are separate terms so are outside the quiet splash quotes and don't need to be quoted themselves.

      However, I see lots of examples like "quiet splash acpi=force apm=power_off" in forums and nobody seems to report that doesn't work.

      Delete
    2. Linuxed - Exploring Linux Distros: [Solved] Ubuntu Doesn'T Shutdown Properly Or Hangs At Shutdown? >>>>> Download Now

      >>>>> Download Full

      Linuxed - Exploring Linux Distros: [Solved] Ubuntu Doesn'T Shutdown Properly Or Hangs At Shutdown? >>>>> Download LINK

      >>>>> Download Now

      Linuxed - Exploring Linux Distros: [Solved] Ubuntu Doesn'T Shutdown Properly Or Hangs At Shutdown? >>>>> Download Full

      >>>>> Download LINK By

      Delete
  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
    Replies
    1. Thanks! This worked for me (ACER ASPIRE 1640 + LUBUNTU)

      sudo nano /etc/default/grub
      GRUB_CMDLINE_LINUX_DEFAULT="quiet splash reboot=bios"

      sudo update-grub and reboot

      Delete
    2. This is the one that works for me, I have a BRIX from GIGABYTE running Lubuntu:
      GRUB_CMDLINE_LINUX_DEFAULT="quiet splash reboot=bios"

      Note, you'll have to power cycle the machine manually at least once for this to work.


      Delete
    3. This is the answer! Thank you so much sir.
      I'm using a Lenovo y410p with Xubuntu 15.10 installed.

      sudo thunar /etc/default/grub
      GRUB_CMDLINE_LINUX_DEFAULT="quiet splash reboot=bios"

      sudo update-grub

      sudo shutdown -r

      Delete
  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
    Replies
    1. Yup this works for me too. Acer Aspire E 11 E3-112M-C2CZ

      Delete
  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
    4. It may happen in some cases because of Linux detecting wifi card wrongly. Please try out the solution given here. http://unix.stackexchange.com/questions/32724/can-linux-support-a-ralink-corp-rt2800-802-11n-pci-maybe-a-rt2860sta-in-an

      Delete
  12. Sorry. but it didn't work for me. I am having ubuntu 14.04 LTS. Please suggest something.

    ReplyDelete
  13. Sorry. but it didn't work for me. I am having ubuntu 14.04 LTS. Please suggest something.

    ReplyDelete
  14. I don't think i would ever solve this problem... :(

    ReplyDelete
  15. reboot=bios works it out for me, but without sudo update-grub. I don't know why. A mistake led me to the solution. Thanks a lot.
    On Mint Mate 17, HP 14-r230la

    ReplyDelete
  16. works for ubuntu 14.04, even fixed my suspension problem, that my it didn't turn on after suspension. Thanks a lot!!!

    ReplyDelete
  17. i have installed 16.04lts version,
    after typing this code in step 2,
    sudo gedit /etc/modules

    it doesnt shows the "lp" in my machine..
    is it okay if i just type below
    apm power_off=1

    plz someone help me.

    ReplyDelete
    Replies
    1. same happened with me... i did write it below
      but nothing changed.
      it freezed when i tried to shut i down!!

      Delete
  18. I Have acer Aspire ES1-512 Laptop and i installed ubuntu 15.10.
    i have tried many ways to solve the shutdown problem but none of them works....

    please help me to fix this....

    ReplyDelete
  19. Thanks for this great post! I just did this on an Asus GL703VD-WB71 running Ubuntu Mate 17.10 and my machine shuts down in less than 3 seconds now! It used to just hang at the desktop and not change.

    ReplyDelete
  20. Linuxed - Exploring Linux Distros: [Solved] Ubuntu Doesn'T Shutdown Properly Or Hangs At Shutdown? >>>>> Download Now

    >>>>> Download Full

    Linuxed - Exploring Linux Distros: [Solved] Ubuntu Doesn'T Shutdown Properly Or Hangs At Shutdown? >>>>> Download LINK

    >>>>> Download Now

    Linuxed - Exploring Linux Distros: [Solved] Ubuntu Doesn'T Shutdown Properly Or Hangs At Shutdown? >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete