Ubuntu 18.04 stuck at shutdown

91,281

Solution 1

While none of the other answers here helped for me (encountering the same problem), I fixed it by switching from the X.org graphics driver to the propietary nvidia driver that is recommended under software&updates. Since then, reboot works flawlessly.

My setup: Asus G Series Laptop G501VW, with Nvidia 960M graphics card.

To do this:

  • open Software&Updates (top left: Click on activities and type "software". Pick software&updates)
  • go to "additional drivers"
  • select a nvidia driver instead of the X.org driver
  • reboot the system

Solution 2

Same problem here on my laptop. After some observation, I found out that it has something to do with power saving mode specially automatic suspend.

Go to Settings > Power then turn off all Automatic Suspend options. Also choose Blank screen to Never.

Till Ubuntu team will figure out why suspend mode is interfering with shutdown process, this solved my problem.

Hope this helps

Solution 3

Try a couple of sudo reboots from terminal to see if it clears things up: 1st to try, reboot without writing wtmp file:

sudo reboot -d

If that reboots successfully then try your natural close down. If it doesn't reboot, try forced reboot:

sudo reboot -f

If this was an upgrade from 16.04 to 18.04, it may be worth considering a clean install.

Solution 4

I had this problem and in my case it seems to be related to the Intel Bay trail CPU which is causing some firmware bugs.

Anyway I have a solution which isn't the best but good enough for now

Solution:

  • Open the terminal and run

    sudo -H gedit /etc/default/grub
    
  • Edit GRUB_CMDLINE_LINUX_DEFAULT="quite splash" so that it says

    GRUB_CMDLINE_LINUX_DEFAULT="intel_idle.max_cstate=1"
    
  • Save and exit, and write the changes to GRUB's actual config file:

    sudo update-grub
    
  • Restart your computer forcefully one last time

Let me know if it worked or when you have a better solution

Solution 5

Had the same problem on a brand new ASUS N705u. Found had to do with how the video driver installs which causes a conflict with the "secure boot" function of the BIOS. Solution: Turn the "secure boot" function off until other solution will become available.

Share:
91,281

Related videos on Youtube

Peter
Author by

Peter

I am just a guy who is here for fun :) Topics that I love - Ubuntu Open Source Linux Themes Blockchain ?? Does this help in getting more profile views ;)

Updated on September 18, 2022

Comments

  • Peter
    Peter almost 2 years

    I am having this weird problem in Ubuntu 18.04. My laptop gets stuck at the shutdown screen every time I use shutdown and I have to manually press the power button for 5 seconds to turn the machine off.

    Before 18.04, I was using Ubuntu 16.04 and it never got stuck at shutdown.

    Any fix for this?

    • YoureSOStubborn
      YoureSOStubborn about 6 years
      Does it freeze on a black screen?
    • sudodus
      sudodus about 6 years
      Until the problem is solved it may help with SysRq REISUB. It will reboot the computer gracefully. The corresponding shutdown/poweroff is SysRq REISUO
    • Peter
      Peter about 6 years
      It freezes when it shows ubuntu logo
    • sudodus
      sudodus about 6 years
      Have you tried SysRq REISUB or SysRq REISUO yet? In that case, does it help?
    • ubfan1
      ubfan1 about 6 years
      How long did you wait? I see a 90 second CUPS timeout sometimes on 18.04 shutdown.
    • WinEunuuchs2Unix
      WinEunuuchs2Unix about 6 years
      @ubfan1 Occasionally on 16.04 my shutdown would be inhibited for 90 seconds or so too.
    • Peter
      Peter about 6 years
      I am not sure what happened now, but somehow it has shutting down properly. But now I am seeing regular system crashes. No idea what is happening here :)
    • Naser Hamidi
      Naser Hamidi about 6 years
      I got same problem with 18.04. In my case it not showing the logo page but shows shutdown process. In shutdown it printing a lot of error on nouveau (nvidia VGA)
    • Peter
      Peter about 6 years
      Tried all the new solutions in the comments but still same. :/
    • Laraveldeep
      Laraveldeep about 6 years
      Same problem here in my Acer Travelmate laptop. What I noticed is (1) if I turn off after short use (without leaving idle with screen locks) it turns off fine. (2) Turning off after unlocking the screen hangs (in this case I have tried sudo poweroff also but still hangs). (3) Once I noticed windows style install update and shutdown thing... Not sure if it tried to install updates during shutdown process. But I didn't find any updates to be installed when checked. I hope I have given some clue for someone to investigate deeper on this issue. :)
    • Scott Stensland
      Scott Stensland over 5 years
      look for errors in file /var/log/syslog after you boot back up
    • User
      User over 3 years
      On Lubuntu 20.04 shutdown and reboot both hang on a Lubuntu splash screen. I hit the ESC key and was dropped into some text output. The screen is filled with lines with timestamps and among them shows: watchdog: BUG: soft lockup - CPU#3 stuck for 22s! [systemd-shutdow:1]. and CPU: 3 PID: 1 Comm: systemd-shutdow Tainted: G L 5.4.0-54-generic #60-Ubuntu It seems to be stuck in some kind of loop and repeats every 20 seconds or so. This is with a brand new install.
  • Peter
    Peter about 6 years
    I will give it a try if it happens again.
  • Hee Jin
    Hee Jin about 6 years
    Do you have any more information, like which video driver causes the problem, and how it causes a problem with secure boot that inhibits shutdown?
  • Karl S.
    Karl S. about 6 years
    That laptop comes with a NVIDIA GeForce MX150 graphics card. During installation of Ubuntu 18.04 a remark is made that a third party driver is needed which requires safe boot option to be turned off. It also asks for a password to allow safe boot disabling process. However, this password is never being asked for and it appears safe boot remains on regardless. (BIOS -ASUS 302).
  • Karl S.
    Karl S. about 6 years
    Also after initial installation a third party driver "GP107M" is being downloaded and installed. A second computer - same model, that initial question doesn't come up during install once safe boot is disabled in BIOS
  • Karl S.
    Karl S. about 6 years
    UPDATE: As mentioned above got two new computers with new Kubuntu 18.04 installs. Both kept playing up either on shutdown or then suddenly during the final stages of starting up. - Turns out it's the WIFI Manager ! Turn my WIFI Repeater off - all good. But if it's on those problems are back!
  • Karl S.
    Karl S. about 6 years
    Temporary fix: a) Turn Wifi off or b) Try disabling original Wifi Manager and install different one instead.
  • R S
    R S about 6 years
    I had 16.04 (stucking on shutdown) upgraded to 18.04 - the same stuff. <br>Tried clean install of 18.04 - the same problem.
  • Rohitt Vashishtha
    Rohitt Vashishtha about 6 years
    The unsecure driver theory and wifi makes sense to me. In my case, I installed a modified WiFi driver and since then the problem began. Will be trying disabling secureboot.
  • Peter
    Peter about 6 years
    I will try this :)
  • Peter
    Peter about 6 years
    For me, no solution has worked till now. Whatsoever I tried, I might have to switch back to previous version as this issue has no solution.
  • Peter
    Peter almost 6 years
    In my case, Wifi router was not even switching off/on even when pressing the Wifi button.
  • User123456
    User123456 almost 6 years
    This fixed the problem. Hope ubuntu will send a fix soon
  • frm.adiputra
    frm.adiputra over 5 years
    I'm using Elementary OS Juno with the same hardware (ASUS ROG G501VW). And I can confirm this solution has solved the problem.
  • Charles Green
    Charles Green over 5 years
    Hi! This is truly more of a comment rather than an answer. Your 'fix' is probably the acpi=off part - the quiet suppresses boot messages, and the splash displays a pretty image during boot.
  • Lemaire
    Lemaire over 5 years
    Yeah I'm just a newbie. But tried all above solution but it didn't work for me. So I tried remove all three of it and magically it reboot and boot without stuck.
  • Charles Green
    Charles Green over 5 years
    Nothing works like success! Why did your system have that boot option set?
  • Lemaire
    Lemaire over 5 years
    It is there by default
  • Tihomir Nedev
    Tihomir Nedev over 5 years
    I've been stuck with this for a few months, upgrading to every new kernel, but this finally worked! Thanks.
  • mdob
    mdob over 5 years
    This one also worked for me - desktop with GeForce GT640. I've switched to nvidia-driver-390.
  • Carmine
    Carmine over 5 years
    Unfortunately this did not worked for me. On second reboot, it does check something, with showing that is all good but then Ubuntu start normally, but on reboot freeze again.
  • Carmine
    Carmine over 5 years
    I did not solved yet, but the first option does not work, instead the second does. The problem still persist on simply restart from terminal, as it keep freezing
  • Carmine
    Carmine over 5 years
    Also this solution does not work for me.
  • Carmine
    Carmine over 5 years
    This worked for me: change Bios Graphic card from Discrete to UMA : forums.lenovo.com/t5/Linux-Discussion/…
  • Laraveldeep
    Laraveldeep over 5 years
    There seems to be multiple cause for this. I recently bought a desktop and had dual boot with Ubuntu 18.04 LTS. Faced the same issue regardless of power settings I suggested earlier. However when I try to sudo poweroff from terminal it works as expected (shuts down fast without any delay) Not sure if any issue with permissions during the shutdown process.
  • Martín De la Fuente
    Martín De la Fuente about 5 years
    It solved the problem for me as well. Asus Zenbook with Nvdia GTX 1050
  • Jekis
    Jekis about 5 years
    You are right. Stopping MySQL server took about 10-15 minutes on my Ubuntu 18.04. Really don't know why it is so long. Screen photo
  • aksh1618
    aksh1618 about 5 years
    This worked for MSI GL Laptop with GTX 1050Ti, Ubuntu additionally prompted setting a password for secure boot and using it on next boot.
  • J D
    J D about 5 years
    The second worked for me too: sudo reboot -f
  • takeshi
    takeshi about 5 years
    sudo reboot -f works for me. It also reboots from lock screen with no problem.
  • takeshi
    takeshi about 5 years
    I found too many nouveau related issues in /var/log/syslog. So I used sudo ubuntu-drivers autoinstall to install NVidia drivers. It works fine now. Had to undergo enrolling new MOK procedure. Xiaomi Notebook Pro.
  • flexxxit
    flexxxit almost 5 years
    its not immediately obvious how to do the above
  • Budi Mulyo
    Budi Mulyo almost 5 years
    Thanks, worked for asus a509fj,, first time install in this notebook..
  • masahane
    masahane almost 5 years
    I'm seriously surprised - this actually worked for me
  • Justin S
    Justin S over 4 years
    this also worked for me
  • David
    David over 4 years
    This worked for me though not immediately but after several updates spanning several days my Kubuntu 18.03.3 LTS finally restarted and shutdown gracefully
  • Martin Oscar Caballero
    Martin Oscar Caballero over 4 years
    This worked for me, thanks. Fr reference, my notebokk has an Intel HD Graphics 4400 chip.
  • Adam
    Adam over 4 years
    do you suffer from dyslexia, or are these actually 3 different yet valid arrangements of letters A, C, P and I?
  • 2785528
    2785528 over 4 years
    @Adam - "ACPI, known as a Hardware Abstraction Layer (HAL) in embedded computing, is an abstraction layer between the operating system, platform firmware and hardware. This allows the OS and the platform to evolve independently. ... " and "Most (all) Intel-MP compliant SMP boards have the so-called ‘IO-APIC’, which is an enhanced interrupt controller." and yes, I just checked and the last 'noapci' should be 'noapic'. Thanks.
  • Heschoon
    Heschoon about 4 years
    Finally! Thanks a million!
  • pije76
    pije76 almost 4 years
    This worked for me too.
  • BangTheBank
    BangTheBank over 2 years
    On ubuntu 20.04, now I can lock the screen again...Still cannot reboot/power off (now black screen and nothing happens..before it was just stuck). To note that this happens to me only when I use a dell usb dock station to attach 2 additional monitors to the laptop. I have updated nvidia and displaylink drivers
  • Carlos Peña
    Carlos Peña over 2 years
    Solved it for me on Ubuntu 20.04.