36

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?

  • 1
    Does it freeze on a black screen? – YoureSOStubborn Apr 28 '18 at 7:03
  • Until the problem is solved it may help with SysRq REISUB. It will reboot the computer gracefully. The corresponding shutdown/poweroff is SysRq REISUO – sudodus Apr 28 '18 at 7:45
  • 1
    It freezes when it shows ubuntu logo – Peter Apr 28 '18 at 8:08
  • 2
    How long did you wait? I see a 90 second CUPS timeout sometimes on 18.04 shutdown. – ubfan1 Apr 28 '18 at 15:17
  • 1
    look for errors in file /var/log/syslog after you boot back up – Scott Stensland Dec 28 '18 at 16:50

20 Answers 20

16

Interestingly, this problems seems to have many fixes/causes. While none of the above 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.

  • 1
    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 Jun 28 '18 at 5:21
  • I'm using Elementary OS Juno with the same hardware (ASUS ROG G501VW). And I can confirm this solution has solved the problem. – frm.adiputra Oct 19 '18 at 8:11
  • This one also worked for me - desktop with GeForce GT640. I've switched to nvidia-driver-390. – mdob Jan 21 at 8:11
  • 1
    This worked for MSI GL Laptop with GTX 1050Ti, Ubuntu additionally prompted setting a password for secure boot and using it on next boot. – aksh1618 Jun 1 at 22:31
  • 1
    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. – takeshi Jun 28 at 9:55
9

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

  • I will try this :) – Peter Jun 2 '18 at 14:37
  • This fixed the problem. Hope ubuntu will send a fix soon – User123456 Sep 6 '18 at 7:40
  • Also this solution does not work for me. – Carmine Mar 10 at 16:16
  • This worked for me: change Bios Graphic card from Discrete to UMA : forums.lenovo.com/t5/Linux-Discussion/… – Carmine Mar 17 at 16:36
  • 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. – Laraveldeep Mar 21 at 10:04
5

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.

  • I will give it a try if it happens again. – Peter May 1 '18 at 17:53
  • 2
    I had 16.04 (stucking on shutdown) upgraded to 18.04 - the same stuff. <br>Tried clean install of 18.04 - the same problem. – R S May 15 '18 at 21:50
  • 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 Mar 10 at 16:15
  • 1
    The second worked for me too: sudo reboot -f – J D Jun 10 at 10:13
  • 1
    sudo reboot -f works for me. It also reboots from lock screen with no problem. – takeshi Jun 28 at 9:28
3

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

  • I've been stuck with this for a few months, upgrading to every new kernel, but this finally worked! Thanks. – Tihomir Nedev Jan 11 at 12:35
  • 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 Mar 10 at 15:56
2

There are scores of scripts that run when you shutdown. I'm still on 16.04 and for me these are the ones in /etc/rc0.d (which are really links to /etc/init.d). One of them may have a long delay set in what it does for stop.

AFAIK these scripts are run in alphabetical order, so you can insert a few that would just log their execution somewhere, helping you spot where the delay is.

  • 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 – Jekis Apr 25 at 11:23
2

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.

  • 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? – Hee Jin May 8 '18 at 15:44
  • 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. May 9 '18 at 23:04
  • 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. May 9 '18 at 23:11
  • 1
    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. May 10 '18 at 7:35
  • In my case, Wifi router was not even switching off/on even when pressing the Wifi button. – Peter Jul 9 '18 at 7:19
1

My system is an older Dell Dimension E521 desktop, dual core, with Lubuntu 18.04, 64-bit.

In /etc/default/grub, I removed acpi=off and the system started behaving normally.

More specifically, I changed this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noapic acpi=off"

to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noapci"

Now my box once again shuts down when I tell it to, and is refreshingly responsive.

0

After doing more testing on two computers found it is in fact the Wifi Manager and the way it connects / identifies with the network. On two identical computers the problem disappears once the Wifi manager is turned off. Also tried USB Wifi dongle which worked on one computer but once again caused system to freeze at moment of registration on network. Have already tried a different Wifi manager with improved conditions. Also noticed in BIOS if secure boot is disabled then there is a list of drivers rejected bi BIOS due to security issues. Perhaps this is the underlying issue related to the Wifi manager.

  • Temporary fix: a) Turn Wifi off or b) Try disabling original Wifi Manager and install different one instead. – Karl S. May 13 '18 at 1:04
  • 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. – Rohitt Vashishtha May 25 '18 at 7:11
0

I had success turning off usb 3.0 driver in bios, not ideal, but it is fixed until more research is done.

0

I noticed that it happens to me too if i use my laptop for more than 10 hours, the gnome-shell uses more memory with time starting from 200 and going up to 500, firefox too starts with memory usage of 150 and goes all the way up to 900, restarting my laptop every 4 to 5 hours solved the issue of shutdown freezing for me I hope it helps you.

0

I had the same problem after installing 18.04 on a Fujitsu Scaleo.

During the install I had to add the acpi=off to be able to install Ubuntu because of a conflict with the Intel 82G33/G31 Express Integrated Graphics Controller. After that Ubuntu would just halt at System Halted when I shut it down.

In the end I changed the BIOS ACPI Suspend Type from S3 to Auto. I did this in Power Management. After this the PC would power down and I could even remove the acpi=off from Grub.

0

I had similar problem with ubuntu 18.04. I installed nvidia driver and now it works fine. Install your driver as described in https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linux

0

I don't know why but for me, when I remove whole "quite splash acpi=off" and leave it blank, the issue is gone. Now my PC boot and reboot smoothly

  • 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. – Charles Green Dec 28 '18 at 16:48
  • 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. – Lemaire Dec 28 '18 at 18:38
  • Nothing works like success! Why did your system have that boot option set? – Charles Green Dec 28 '18 at 19:17
  • It is there by default – Lemaire Dec 30 '18 at 10:05
0

Had the same problem yesterday while installing 18.04 As mentioned earlier in the post. updating NVIDIA drivers. There are several ways of doing this but i recommend following steps

  1. find your graphics card name and download it.
  2. run following commands sudo dpkg --add-architecture i386 sudo apt update sudo apt install build-essential libc6:i386

  3. reboot

  4. on start run sudo telinit 3

  5. use terminal to navigate to Downloads folder and type sudo ./the driver download file

  6. after install: sudo reboot

0

In my case, i have the driver nouveau, Ubuntu 18.04

Solution:

Open terminal

sudo gedit /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_rev_override=1 nouveau.modeset=0"

sudo update-grub

This solved the issue for me, now i can shutdown and restart

0
  1. open terminal and type : sudoedit /etc/default/grub
  2. change GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" into GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force"
  3. save the file
  4. sudo update-grub

that's it ... it worked for me

0

I solved it by this way below(dell laptop with Ubuntu 18.04):

Open the Terminal and input this line: sync && sudo sync press Enter, and continue to input the second line: sudo shutdowm -h now or sudo reboot press Enter. If it works well. and then you can normally shutdowm or reboot your system as usual.

0

I had the same issue after a kernel upgrade. Shutdown/restart command was working smoothly before the upgrade. But started freezing after the upgrade. I attempted all fixes that are mentioned here and various other forums but nothing seemed to work. So I started installing various versions kernels and checked up shutdown command with different kernels and found that my machine freezes for all kernels greater than the following version:

linux-image-4.15.0-20-generic 

My PC has the following specifications:

Intel Core i5-8250U
NVIDIA Geforce MX150 with 2 GB VRAM

I had the same issue when I installed Kali along with Ubuntu. Searching for its solutions I found it was probably a GPU issue and disabling the generic nouveau driver might fix it.

I applied the solution given below for kali:

  1. Check your apt sources as per https://docs.kali.org/general-use/kali-linux-sources-list-repositories
  2. Run apt-get update && apt-get dist-upgrade
  3. Create the following file: /etc/modprobe.d/nouveau-blacklist.conf
  4. Edit that file and add only one line that says blacklist nouveau
  5. Reboot your PC.
  6. Run apt-get install libcuda1 libnvidia-ml1 --no-install-recommends -y
  7. Dn not reboot your PC at this point. You must edit one file before doing so or your GDM greeter won't work
  8. Edit the file /etc/modprobe.d/nvidia.conf and comment out the second line that says remove nvidia-current rmmod nvidia nvidia-uvm, or delete that line. Make sure that file has only one line that says alias nvidia nvidia-current
  9. Run apt install nvidia-kernel-amd64 nvidia-kernel-common nvidia-kernel-dkms
  10. Reboot your PC.

https://forums.kali.org/showthread.php?27173-Solution-for-Reboot-Issues

and it worked for my kali. Applied the same for my Ubuntu, and it worked.

0

Imad's suggestion: change

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" 

into

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force"  

This is the only solution that works consistently for me. Will take that back. Nothing on this page works for me. AMD Turion X64 Duo Core Toshiba A215

0

Yes, it's a pain.

In my case, turning acpi off in grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noacpi"

then

sudo update-grub

and

reboot -d

did the trick.

Suspend mode and shutdown are behaving normally again. I don't know what caused the problem in the first place: I was having issues while using Unity, Ubuntu would freeze when working on a specific text file. So I installed XFCE to see whether it was a UI problem or a hardware (disk-related) problem. Disks were supposedly clean and checked. With XFCE I no longer had freezes with the txt file, but shutdown and suspend would not work anymore...

Not the answer you're looking for? Browse other questions tagged or ask your own question.