49

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?

Zanna
  • 72,312
Peter
  • 815

21 Answers21

24

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
rob
  • 405
  • 2
  • 12
15

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

6

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.

Broadsworde
  • 4,532
6

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

Zanna
  • 72,312
Sunny Ray
  • 111
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.

xenoid
  • 5,759
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.

Karl S.
  • 31
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 noapic"

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

David
  • 3,487
2785528
  • 161
1

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

1
  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

1

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.

zorbamj
  • 33
1

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

1

For my Lenovo E580 the solution was adding the open ubuntu graphics drivers from https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt-get update
Dman
  • 61
  • 4
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.

Karl S.
  • 31
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.

Mattijs
  • 113
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

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

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.

Kulfy
  • 18,154
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...