74

I recently upgraded from Ubuntu 11.10 to 12.04. If it makes any difference, my system is a Dell Inspiron 1520.

I encounter a problem whenever I shutdown or restart; it kills all running processes (as far as I can tell), but once I get past the shutdown text screen and the screen goes black, my computer doesn't power off. The fans still run and the screen is still on, etc. I have to hold down the power button in order to complety shut down.

Does anyone know how to resolve this problem?

Braiam
  • 67,791
  • 32
  • 179
  • 269
Justin H
  • 741
  • 1
  • 6
  • 3
  • 1
    Ok, just to make sure, you are shutting down by clicking the right corner button and pressing shutdown right? – eltommo Apr 27 '12 at 04:38
  • 2
    yes. That is right – Justin H Apr 27 '12 at 04:39
  • 2
    ok, while you are looking for a solution to this problem, you should be able to work around it by typing sudo poweroff at a terminal prompt, or if you are unfamiliar with the terminal press "alt-f2" and type "gksudo poweroff" and that may bring your computer to a complete power off. – eltommo Apr 27 '12 at 04:42
  • It looks like there is a bug for that: https://bugs.launchpad.net/bugs/987220 . If you are affected, click on "yes, it affects me too" at the top of the page. This will be counted. You can log on to Launchpad with your UbuntuOne ID. – Andre May 19 '12 at 17:28
  • 1
  • I have the same problem on exactly the same model (Inspiron 1520). The culprit seems to be the proprietary NVIDIA graphics driver. If you uninstall it and fallback to Nouveau it will work as usual. To run Nouveau instead of the NVIDIA driver you just remove/inactivate [both] NVIDIA drivers in "additional drivers" (not running English system so I can't be sure of the name). Ubuntu will then use Nouveau automatically. Depending on your usage though, Nouveau might not be "good enough". But in my case I don't need the performance of the NVIDIA driver (no gaming here!). – krax Apr 27 '12 at 18:11
  • Do you have a caddy in your notebook? Some models have a switch inside the disk bay that may prevent complete shutdown. – Carlos Maestre Jul 19 '20 at 02:09
  • To investigate what's going on behind the splash screen, press Esc. You will see what is stopping it from shutting down. Then you can troubleshoot for that problem. For many cases reported, it was redis-server. – Musaffa Jun 26 '15 at 01:13

7 Answers7

34

I have the same problem and found a solution which worked out for me.

Type in terminal:

  1. EDITOR=gedit sudoedit /etc/default/grub
  2. Find the line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
  3. Change this to: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force"
  4. Save the file and close the file.
  5. Finally, in terminal: sudo update-grub
  6. exit (to end the root shell)

I found it here: Dell Studio 1569 Cannot Shutdown in Ubuntu 11.10 or 12.04

vanadium
  • 88,010
kubahaha
  • 1,167
  • 16
    This does not appear to work either. – skeggse Aug 01 '12 at 18:57
  • this seemed to work for me, on my Dell XPS M1330 with an Nvidia 8400M – fohswe Aug 11 '12 at 23:41
  • Works for me. Dell XPS M1530 Nvidia 8600 – Garfield Oct 02 '12 at 01:59
  • The solution above worked for a while but then the problem re-occurred. So I removed acpi=force from GRUB_CMDLINE_LINUX_DEFAULT and added it to GRUB_CMDLINE_LINUX instead, using the steps above (i.e. GRUB_CMDLINE_LINUX="acpi=force"). Then I shut down the computer, using the power button to power off after it stopped shutting down at the black screen with a series of messages that ended with "[end trance ...]" as it did before (I had GRUB_CMDLINE_LINUX_DEFAULT="" to show messages instead of the splash screen). After re-booting, shutdown worked correctly (I tested it several times). – Cee Oct 28 '12 at 02:44
  • The problem re-occured after another update with Update Manager. As before, the screensaver also froze (even with just blank screen & 2d screensavers) when trying to return to using the computer after a while. And again there was also freezing at the screensaver instead of automatic shutdown of the computer by Power Management. Shutdown works properly again after following the steps above (moving acpi=force to GRUB_CMDLINE_LINUX_DEFAULT this time) shutting down and manually powering off. So you may have to repeat these steps each time the problem reoccurs, seemingly after system updates. – Cee Nov 11 '12 at 00:40
  • After the problem re-occurred for a third time, I was able to get shutdown working properly again after re-installing GRUB with Boot-Info (https://help.ubuntu.com/community/Boot-Info) shuting down and manually powering off. – Cee Nov 13 '12 at 14:21
  • It works for me, Ubuntu 12.04.04 Lenovo G580 i7, the key is "acpi=force" – sugab Jan 21 '14 at 04:16
  • If you upvote this answer, consider upvoting this one too. (It's where the answerer got their answer.) – Kevin May 19 '14 at 18:38
  • sudo gedit is not recommended, but gedit in a root shell is ... better?? – greggo Jun 29 '16 at 14:35
  • @greggo I dont know, this part was added by guntbert – kubahaha Jun 30 '16 at 22:21
  • you should add one more step - reboot to use the new options. – Spikolynn Nov 11 '16 at 17:22
  • This does not work for me (Dell Inspiron 3420). Found something looks promising here: https://help.ubuntu.com/community/Grub2#Fixing_reboot.2Fshutdown_freezes About to try and see if it works. – Bing Ren Jun 08 '17 at 02:48
7

Another possible solution - especially for newer hardware using (U)EFI - is to add the boot parameter apm=power_off. You can add it to the definition of GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub or add the line if it does not exist yet.

GRUB_CMDLINE_LINUX_DEFAULT="apm=power_off"

Then update the grub installation according to your operating systems manual, e.g: update-grub or grub2-mkconfig -o /boot/efi/EFI/[osname]/grub2.cfg or similar.

sebix
  • 473
3

It is a bug. Ref - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/987933

Forever Learner
  • 1,403
  • 2
  • 11
  • 14
1

The key may be in this sentence, "it kills all running processes". In my case, it did NOT! The problem was caused by the redis-server process which, for some reason, couldn't be stopped normally. Once I killed all redis-serverprocesses, sudo killall redis-server, I was able to do shut down normally. Since I don't need redis that often, I stopped it from running at startup with these commands:

sudo update-rc.d -f redis-server remove

sudo update-rc.d -f redis_6379 remove

I will wait for an update that fixes this problem, but for now I will remember to stop the redis process before shutting down. It may not be redis in your case, but it's likely a buggy process that Ubuntu couldn't kill.

This may help you inspect the problem:

  • service --status-all: lists all services registered with the system. Services that start with OS boot will have a [+] symbol before them.

  • Read the log messages that appear on the screen when you press the power button to manually power off. In my case, I read something about trying to close the redis server. The messages may also appear if you press some random keys.

  • Review the programs you installed recently, maybe one of them is causing the problem.

  • Try closing all unnecessary processes and see if you can shut down normally. If you can, repeat the process, narrowing down the candidates, till you reach the buggy app.

Karim Sonbol
  • 265
  • 1
  • 2
  • 10
0

I encountered the same thing with Ubuntu 18.04, the solution above did not work for me and I end up updating the kernel to 5.03

sudo apt install --install-recommends linux-generic-hwe-18.04

And then reboot.

Eliah Kagan
  • 117,780
Tarek
  • 21
0

After installing windows 10 on a different partition I had the same issue. Even after removing windows and creating a new partition table in that drive didn’t solve the problem (I thought it could be something windows installer wrote to the drive’s MBR). All the linux distros on other drives and partitions couldn’t shutdown. Kernel instructions didn’t help either. What solved the problem was removing the motherboard battery before I went to work and after this reset to the BIOS/CMOS the problem was solved.

0

As per suggestions above:

GRUB_CMDLINE_LINUX="acpi=force"

Worked for powering off a Xubuntu 22.04 (with EFI boot) that didn't want to power off on shutdown.

Enrico
  • 11