Unable to shutdown, restart or log out

7,932

Ok, this is usually a hardware issue but could be drivers. Normally if you see it related it X it's a stale video driver. Try updating your video drivers. Finally you can always

echo 0 > /proc/sys/kernel/hung_task_timeout_secs

This will effectively quite is symptom but the problem will remain. This is certainly related to either failing hardware or bad drivers. The fact that you can actaully reboot via command line leads me to believe that it's a bad video driver. Make sure your running the latest video driver and that when you upgraded to 12.04 you kept using the same driver you were using when it was working (open v.s. propitiatory).

Another thing to look at is making sure you don't have any network shares mounted. When you log out of X network manager terminates a wireless connection. This will cause the system to hang for several minuets per file system read. During shutdown this can be quite a lengthy process. The quick test/fix is make sure all remote shares are unmounted before logging out. If that is the case then you should try adjusting your mount commands to show that they are network mounts and should be unmounted before you turn off the wifi connection. This varies by file system and mount type.

Share:
7,932

Related videos on Youtube

schonjones
Author by

schonjones

Updated on September 18, 2022

Comments

  • schonjones
    schonjones over 1 year

    I have been unable to restart, shutdown, or log out of ubuntu since the release of 12.04. I have upgrade at the time of release for 12.10 and now for 13.04 and have had no change in the situation. On logout or restart i get a solid black screen where it just sits.

    I have let it sit for long periods and I get a message every 2 minutes or so stating something about Xorg blocked for 120seconds. I have search extensively and can't find anything that actually fixes it. Using the shutdown now command works from terminal with -P -r. Updating grub had no effect. Any clues or help would be great.

    • GM-Script-Writer-62850
      GM-Script-Writer-62850 about 11 years
      What hardware? sudo reboot should reboot the system sudo poweroff should shut it down; I see no reason it cant logout and let you switch accounts
    • schonjones
      schonjones about 11 years
      only "sudo shutdown -P now" or "sudo shutdown -r now" work. I'm using a Toshiba Satelite laptop from 2006. I had no issues with Ubuntu 11.10. The issue seems to be related to Xorg being blocked and never being able to shut down fully. The laptop uses an integrated intel graphics gma945 express chipset if I remember correctly. I figured it was a bug of some sort when upgrading to 12.04, but 2 distros later and I still have the same issue.
    • GM-Script-Writer-62850
      GM-Script-Writer-62850 about 11 years
      What about sudo halt I have had that not work on some systems under certain distros; is this a clean install of raring?
    • schonjones
      schonjones about 11 years
      "sudo halt" appears to work, however it gives me a init_halt not found error 2 lines above system halted and after turning off the power the system locked up during POST the first 2 times I tried powering it on. If I use the gui reboot, log off, or shutdown commands after I ctrl+alt+del when the system is stuck it also freezes during post until I shut it down. Using the "sudo shutdown -r now" i have no issues on the reboot.
    • Tanel Mae
      Tanel Mae almost 11 years
      You should edit grubs GRUB_CMDLINE_LINUX_DEFAULT line, remove "quiet" and replace "splash" with "nosplash". Update grub and after restart you should be able to see where exactly does the shutdown hang. It is also possible to add boot parameters temporary at the grub boot menu by pressing “e” while certain menu entry is select. Boot parameter should be added to the line that starts with “linux” and to boot with these settings press f10.
    • schonjones
      schonjones almost 11 years
      I don't even get the splash screen, it hangs prior.
  • Tanel Mae
    Tanel Mae almost 11 years
    You should always avoid to force computer shut down by holding down the power button as there is high risk of data loss, breaking your system or damaging your hardware. If your computer has such problem it should be fixed.
  • schonjones
    schonjones almost 11 years
    I got rid of compiz as it was constantly giving me issues. I'm using openbox and razor-qt at the moment. Unity started to give me all sorts of issues with the upgrade to 13.04 and is slower than I would like.
  • schonjones
    schonjones almost 11 years
    where should this line be added? I'm using Intel integrated gma950. I have gone through several drivers over the years at one point it was stuck on gallium and I had a difficult time getting it set back up correctly. I used the experimental line of drivers for a while and for some reason I only have 3 resolutions to choose from.
  • schonjones
    schonjones almost 11 years
    I reinstalled the intel video drivers and uninstalled apache as it also liked to hang, can't remember why I had installed it in the first place. Still hangs now without telling me anything useful. What configs should I be looking at specifically. I'm not really sure what I'm looking for. I know logout does not work from a terminal window as I had tried that before. I'll have to check on shutdown and get back with you. Live cd for 12.10 works fine.
  • schonjones
    schonjones almost 11 years
    "sudo shutdow -r now" does not work from a terminal window. I am unsure how to print the output from "ps aux" to a file and it is longer than the screen so I can't see everything running. I rarely ever restart or shut off my computer, but with all this work on getting it to work recently I've noticed an occasion error when I log in. "ubuntu 13.04 has experienced a problem" when I ask for the details it only tells me "usr/bin/Xorg". I send the happy little error report and go on my merry way with no noticable difference in the session. also an error related to nn-something.
  • schonjones
    schonjones almost 11 years
    nm-applet is the other thing crashing on occasion. figured out printing "ps aux" to file. It's located at pastebin.com/TMcBAtHS
  • Martin Owens -doctormo-
    Martin Owens -doctormo- almost 11 years
    Tuxest - There is not a 'high' risk of data loss or even hardware damage. A forced power cycle will result in memory data loss, but usually not operating system failure. Sometimes a couple of inodes need cleaning though. It's also very unlikely (but not impossible) to cause hardware failure. The problem should be fixed, but don't scaremonger the users.
  • schonjones
    schonjones almost 11 years
    It is upgraded in order 11.10 - 12.04 -12.10 -13.04. it would be very difficult for me to back up everything I have and reload it. I have 80gb of Digital Negatives and nowhere else to store them at the moment. I have a second partition, but it's a small partition of only 10gb for a windows install I only use for itunes very rarely.
  • schonjones
    schonjones almost 11 years
    also,halt does just that. halts everthing and just sits there.
  • schonjones
    schonjones almost 11 years
    ran a dpkg-reconfigure on xserver-xorg. Same issue, though xorg does not defunct now. here is the new ps aux output pastebin.com/92V5Fe7b
  • schonjones
    schonjones almost 11 years
    Given you out me on the right track and I must award the points I'm going to go ahead and award them. I have found the issue is definetly with lightdm. As to correct it, I'm not sure. I installed kde and it will alow me to do all three, but is horribly slow and give me an error and lxdm won't ever actually login. But at least I found what was misbehaving.
  • coteyr
    coteyr almost 11 years
    dav.otixo.com home/mike/dav and dav.otixo.com home/mike/dav mounted. This will cause issues. Specially if you try to logout before you have unmounted. Make sure you unmount first, then logout.
  • schonjones
    schonjones almost 11 years
    while messing with display managers I noticed GDM had the same problem. I tried slim and it gave me a lot of issues just trying to log in so I did a temp edit to grub to get text only and noticed otixo. The otixo account has been cancelled and I forgot I had added it fstab to auto mount. I removed it from fstab and reset all lightdm settings to a fresh state and suprise, the problem was fixed. Thanks for pointing me on the right path, without your help I would have never got this worked out.
  • Tanel Mae
    Tanel Mae about 10 years
    Martin - Yes, saying "high risk" might have been overestimation but the point was not about the risk level when doing such thing once. Rather my comment was about risks involved when adopting such approach to problems as regular (daily?) practice - thereby probability of unlikely events increases. In any case the original answer has been updated, so removing down vote.