system doesn't turn off if "sudo halt" is given

Bug #880240 reported by magowiz on 2011-10-23
This bug affects 93 people
Affects Status Importance Assigned to Milestone
upstart (Ubuntu)

Bug Description

Since I upgraded from 11.04 to 11.10 the system doesn't turn off at the end of halt procedure if it's called via commandline (local or remote shell) . At some point of halt procedure the system freezes and all I can do is turning off pc via physical power button and halting it using GUI or via "sudo shutdown -h now" , these two methods work flawlessly.

 I have this problem on both x86_64 and x86. Anyway if I shut down the pc using ligthdm or unity the system is turned off properly.

Description: Ubuntu 11.10
Release: 11.10
Linux travelmate 3.0.0-13-generic #21-Ubuntu SMP Mon Oct 17 20:18:09 UTC 2011 i686 i686 i386 GNU/Linux

magowiz (magowiz) wrote :


IKT (ikt) on 2011-10-23
affects: ubuntu → upstart (Ubuntu)
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in upstart (Ubuntu):
status: New → Confirmed
Menachem Shapiro (menachem) wrote :

This bug did not affect me when I was running lubuntu 11.04, but started affecting me when I upgraded to 11.10.

spotter (spotter-yucs) wrote :

This is due to "halt", no longer powering off the machine as well, now one has to tell it to poweroff explicitly.

I personally don't get the use case where one would want to "halt" the machine without powering it off, as well as the fact that it changes years of behavior.

Menachem Shapiro (menachem) wrote :

Is this an ubuntu change or an upstream change?

Thomas (t.c) wrote :

I have the same problem.

thomas@Home-PC:~$ cat /etc/default/halt
# Default behaviour of shutdown -h / halt. Set to "halt" or "poweroff".

but this file is more history?! it comes from the initscripts package...

Menachem Shapiro (menachem) wrote :

changing /etc/default/halt to:

didn't make any difference.

crjackson (crjackson) wrote :

I assume this is the same bug that's affecting 8 of my systems, and several other people on the ubuntu forums. If I select to shutdown from the normal GUI menu, I get a popup conformation and after selecting my choice, it throws me back to the desktop as though I never issued a shutdown request, OR it starts to shutdown and hangs with unity gone but a grayed/shaded desktop view, a black screen, or a login screen.

My workaround was to issue a dbus shutdown and create a launcher for the Dash bar. This is no solution, but it's a usable workaround.

dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop

Chris Jones (jonesc-x) wrote :

I just installed 11.10 and I am having the same problem with system halt via bash shell call. The only way to halt the system is to press the power button physically.

Fresh install on a Lenovo ThinkCentre M91. I cannot shutdown my system via the "normal" buttons.

Csimbi (turbotalicska) wrote :

I have nearly the same problem as the original poster.
Ubuntu server, 64bit.
I just upgraded from 11.04 to 11.10 (Zotac ITX board) - and I did not change any settings in the process so it should work as before.
The system will not power off when it's supposed to - which is scheduled to happen at 23:00 every day (via cron).
It will halt the system but it will not cut the power; I have to hold down the power button to cut the power.
The last two messages are:
* Will now halt...
[ 174.941747] System halted.
Thanks for fixing.

Same as Bug #881792, Bug #809628 and Bug #859075.

Csimbi (turbotalicska) wrote :

BTW, wake-on-lan won't work after this. I wonder if it's related.
Since physical access to the hardware is limited, I would appreciate a fast-track resolution on this.
Thank you.

Ludovic Claude (ludovicc) wrote :

This bug affects me as well.
I cannot shutdown from the menus, most of the time I return to the login screen. Then from the login screen if I try to shutdown, then there is an ugly Gnome confirmation dialog which asks 'Do you want to shutdown or restart ?'. Pressing any of the buttons does nothing.

I tried 'sudo halt' and it hang the computer on the shutdown.
I looked also in .xsessionerror, and there are those errors. My user has sudo rights, so I don't understand where the Authorization error is coming from.

(nautilus:2737): Eel-WARNING **: "unique eel_ref_str" hash table still has 4 elements at quit time (keys above)

(nautilus:2737): Eel-WARNING **: "nautilus-directory.c: directories" hash table still has 3 elements at quit time
gnome-session[2661]: WARNING: Unable to stop system: Authorization is required
Do: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
gnome-settings-daemon: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.

Tony Ballantyne (ballantony) wrote :

Can't shutdown from the panel menu. The standard menu appears asking if I want to shutdown or restart, but pressing this makes no difference.

Can only return to log in screen, have to use the power button

crjackson (crjackson) wrote :

For me, what seems like the same bug also prevents restart, and logoff. Anyone else?

Scott Baker (14scottyb) wrote :

This same bug was making me crazy. I was running 11.10 (ubuntu) on a Dell M90 precision laptop, with the Intel Centrino dual processor. I tried several fixes, with no effect. Had to switch back to 11.04 to get a working comp again.

lionslair (nathan-lionslair) wrote :

Yes same issue here. Since upgrade. Only difference is I run the machine through virtualbox

Justin Thomas (justin-nitj) wrote :

SAme problem
Fix Plz

Anthony Nguyen (portablestew) wrote :

Since I didn't see it explictly laid out in previous comments -- "sudo poweroff" works great for me. The computer shuts down completely, and I'm able to WOL afterwards as well.

Tipi Koivisto (tipit) wrote :

When I do "shutdown -r 0" as root boot is executed nicely. Says "*Will now reboot" and reboots.

On the other hand when I do "shutdown 0" as root the last message in standard output is "*Will now halt..." and then comes Mr. Freeze. I can even hear the hardrive shutting down but then it just freezes. "poweroff" (with any option) gives the same result. Executing "poweroff -f" the screen freezes instantly after printing "Powering off".

Therefore I think the problem is in somewhere between Halt / Poweroff and hardware.

At the moment with Lenovo S205 Ideapad and 11.10 the only way to shutdown seems to be is by pressing power button.

moi (guiguibud) wrote :

I'm experiencing the exact same problem. Halt freezes while power off or shutdown -h now works fine.

Thanks for a quick resolution guys

snevas (snevas) wrote :

To clarify:

The bug is that the /etc/default/halt isn't used in the way it should. When you say HALT=poweroff the system should poweroff when you use the command 'halt'.

Karl Hegbloom (karl.hegbloom) wrote :

I wonder if it's a polkit permission problem, with lightdm... because when I run d-feet and look at org.freedesktop.Accounts on the system bus, I see there are two nodes; one is me, user1000, and the other is lightdm, user130. I wonder if it's because of no permission to shut down with other users active?

Tipi Koivisto (tipit) wrote :

If I shutdown as root the other active user acounts should not bother in anyway. However I did tested logging out and shutting down the computer only as root. Did not make any difference. The problem is still there.

I have notice also that sometimes when I run "sudo shutdown 0" or "sudo shutdown -P 0" the computer first tries to start sendmail program and then makes a reboot. That is even more annoying than just freezing. :)

My restart works fine however when i shutdown it says will now halt... then nothing. i did notice when its shutting down it says fail on killing all remaining processes. that is the only visible problem is it normal?
using sudo shutdown -h now doesnt work either just forced power button.

when i say restart works fine its just started now where it will turn off then when it tries to restart just a blank purple screen

dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart

dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop

those in terminal or in a txt editor can work but not for me. make sure its an exe though

ending in .stop = shutdown
ending in .restart = restart

Kathleen Murphy (windrose1) wrote :

Fix it please! not interested in long code entries in the terminal each time.

Alex (alex-tambo) wrote :

Hi All,
The solution that worked for me was in the following link:

I renamed the links in /etc/rc0.d and rc6.d:

- to
- S35networking to S15networking

Then I restarted the computer and all was good.

I can't shutdown my computer from SSH and halt, because the computer still freezed....
This happens in 2 machines for me: a netbook and a desktop computer.
Some idea about when the fix will be at Ubuntu repositories?

Sam Clark (samclark-tm) wrote :

This happened to me just a few days ago. Yesterday, I reinstalled ubuntu and it worked for a while. Today, however it's started again. The actions that I took during my last login are two numerous to immediately pinpoint which one may have caused it, but the most likely candidate is that right before I tried to shutdown, I had just modified the fstab with the line:
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

i.e. I had just created a fixed mount point for my cd-rom drive to better take advantage of wine. I don't know if this has anything to do with this problem though.

I have the same problem on Oneiric, but the nightmarishly lengthy

dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop

works. Another thing which works for me is the much shorter

halt -p

I also second the request that /etc/default/halt should be evaluated as expected though.

P.S.: This also works (more intuitive):


Viswanath (rvishu77) wrote :

Just installed 11.10 and I am having the same problem with shutting down. The only way to halt the system is to press the power button physically.
If memory serves, it started after I did an update today (Mar 02, 2012).

DELL Studio 1558
Dual booting Ubuntu 11.10 (x64) & WIN 7 (x64)

mityi (mityi) wrote :

I am having the problem with shutting down too

summary: - ubuntu 11.10 : the system doesn't turn off if "sudo halt" is given
+ system doesn't turn off if "sudo halt" is given
Changed in upstart (Ubuntu):
importance: Undecided → Medium
Benjamin Drung (bdrung) wrote :

Ubuntu 12.04 (precise) is affected by this bug, too.

tags: added: oneiric precise
gianluca (antonelli) wrote :

same for me, upgrading from 11.04 to 11.10 and this bug shoed up

sudo halt freezes regurarly

the GUI shut down works fine

Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:

tags: added: iso-testing
Isil - ITM (isil-h) wrote :

I have the same problem. Is there a solution for it? I keep shutting down my computer from the power off button. Does it have a negative effect for my computer? What can I do?

CharlesA (charlesa) wrote :


sudo shutdown -h now

From a terminal worked for me when running sudo halt didn't.

I don't know why, cuz they do the same thing.

Michael Paoli (michael-paoli) wrote :

# shutdown -h -P now
executed as root from serial console
as described on Bug #958838 (which may or may not be same bug - has been merged with this one in any case)
results in system hung / locked up (imperfectly halted?), but not powered down, whereas same/equivalent works fine with 10.04 LTS,
I retested this on both the released production 12.04 LTS and 11.10:
Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423)
from the CD ISOs, and the results on both of those are nearly identical, about the only noteworthy difference seen,
is in the case of Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423), some additional output/diagnostics
are seen on the console just after the output of:
umount: /run/lock: not mounted
but before the system freezes (kernel panic?) which are seen on 12.04 LTS but not seen with 11.10:
[ 576.022406] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6
[ 576.022943] ata2.00: cmd a0/00:00:00:08:00/00:00:00:00:00/a0 tag 0 pio 16392 in
[ 576.022944] res 01/60:00:00:08:00/00:00:00:00:00/a0 Emask 0x3 (HSM violation)
[ 576.024203] ata2.00: status: { ERR }
In either case, both are quite stuck at that point, and system requires physical reset or power off to continue, and that issue does not exist in 10.04 LTS.

CharlesA (charlesa) wrote :

On all the machines I have tested so far with Precise, running "halt" by itself only halts the machine but doesn't power it off.

However, running halt -p powers it off just fine. Was this change documented somewhere or is it a true bug?

/etc/defaults/halt has the same POWEROFF entry on 10.04 as 12.04 yet 10.04 halts and powers off just fine if issued the halt command.

Paulo da Silva (psdasilva) wrote :

halt -p also works here. Nevertheless I think this should be fixed! halt always used to power off the computer. Now, if one forgets the -p when shutting down a remote computer ends up with a remote frozen machine. This is a bad thing.

Kalsan (info-kalsan) wrote :

Had to change all my scripts to "sudo poweroff". This is kinda embarrassing. What's the use of a halt-command that doesn't actually turn off the machine? Who needs a computer that's ready for poweroff but still running?
I believe that the halt-command made more sence before than it does now. I recommend changing it back.

Kate Stewart (kate.stewart) wrote :

bumping up the priority of this, given the number of people affected, and amount of time its been lingering.

tags: added: quantal rls-q-incoming
Changed in upstart (Ubuntu):
importance: Medium → High
Steve Langasek (vorlon) wrote :

Note that this is the result of a deliberate upstream behavior change as described in bug #532366.

I think it's appropriate to extend upstart's halt implementation to respect /etc/default/halt, but possibly only as a distro patch rather than in upstart upstream.

Changed in upstart (Ubuntu):
status: Confirmed → Triaged
importance: High → Medium
Steve Langasek (vorlon) wrote :

Correction: in sysvinit, /etc/default/halt is a config file for the /etc/init.d/halt script only, which uses it to decide whether to pass '-p' to halt. So this is already supposed to have the intended effect; and if I invoke 'halt -d -f -i -p -h' directly, it does power off the system. Likewise if I invoke 'sh -x /etc/init.d/halt stop', I see the correct command being run and the system powers off.

So something is going awry here specifically wrt /etc/rc0.d/S99halt when called via the 'halt' command.

Steve Langasek (vorlon) wrote :

Ok, I've worked my way all the way through this bug now, and I have to conclude this is behavior we can't/shouldn't change.

- The 'shutdown' command has three options: '-h' (halt or power off), '-H' (halt), and '-P' (power off).
- The 'halt' command maps to -H, by design.
- The 'poweroff' command maps to -P, by design.
- The /etc/default/halt configuration *only* affects the behavior when neither -H nor -P has been specified.
- There is no way to make 'halt' by itself map to 'poweroff', without making it impossible to do a real 'halt'.
- These are all standard options that shouldn't be changed.

So I'm closing this bug report as 'wontfix'. The current behavior is inconsistent with previous upstart behavior, but that behavior was buggy. The current behavior is correct, and I'm afraid people will just have to learn that 'halt' doesn't mean what you were led to believe it means.

If you want the system to poweroff, you need to run either 'shutdown -h now', 'halt -p', or 'poweroff'. All three commands work. 'halt -p' is the shortest and probably the most compatible with existing muscle memory.

Changed in upstart (Ubuntu):
status: Triaged → Won't Fix
Yannick Drolet (ydrolet) wrote :

You could try the workaround found in this article: "reboot=bios" fixed the shutdown and reboot hangs for me.

Run in terminal> sudo nano /etc/default/grub
Edit this line and save> GRUB_CMDLINE_LINUX="reboot=bios"
Run in terminal> sudo update-grub
Restart your PC

Yannick Drolet (ydrolet) wrote :

Modification in /etc/default/grub takes effect next time OS starts.

Mauro Cabella (mauro-cabella) wrote :

Hello to everyone.
Please excuse my poor english...
I found a trick, it's not a solution, but it's useful.
You can use the script /etc/acpi/ for your scheduling, to do the dirty job :)
It's the response of the system after pressing the power button and it works for me.
Bye, Mauro

Steve Langasek (vorlon) wrote :

... or you could read the explanation for why this is not a bug that will be fixed in Ubuntu, and use 'halt -p' as indicated.

Mauro Cabella (mauro-cabella) wrote :

Yes, sure, but "halt -p" make a reboot instead a shutdown on my server... I don't know why, but i've noticed that /sbin/halt it's a symbolic link to reboot.
This is the reason I use /etc/acpi/
Bye, Mauro

Steve Langasek (vorlon) wrote :

If halt -p reboots instead of shutting down, that's a bug but it's not this bug. Please open a separate bug report against the Linux package for your issue.

Mauro Cabella (mauro-cabella) wrote :

Ok, I'll do it.
Thank you.

DrKay (dr-jameskay) wrote :

OK, how about if shutting down a 12.04 system with the shutdown menu, then clicking the 'shutdown' button causes the system to hang at the 'Ubuntu' screen? Is this the same bug or different?

Steve Langasek (vorlon) wrote :

That's a different bug.

Rarylson Freitas (rarylson) wrote :


I think the current behavior is correctly, but the comment in "/etc/default/halt" sould be updated.

So, I proposed a patch in (a related bug).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments