system doesn't turn off if "sudo halt" is given
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart (Ubuntu) |
Medium
|
Unassigned |
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 : | #1 |
affects: | ubuntu → upstart (Ubuntu) |
Launchpad Janitor (janitor) wrote : | #2 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in upstart (Ubuntu): | |
status: | New → Confirmed |
Menachem Shapiro (menachem) wrote : | #3 |
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 : | #4 |
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 : | #5 |
Is this an ubuntu change or an upstream change?
Thomas (t.c) wrote : | #6 |
I have the same problem.
thomas@Home-PC:~$ cat /etc/default/halt
# Default behaviour of shutdown -h / halt. Set to "halt" or "poweroff".
HALT=poweroff
but this file is more history?! it comes from the initscripts package...
Menachem Shapiro (menachem) wrote : | #7 |
changing /etc/default/halt to:
HALT=halt
didn't make any difference.
crjackson (crjackson) wrote : | #8 |
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=
Chris Jones (jonesc-x) wrote : | #9 |
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.
Marco Aschwanden (m-aschwanden) wrote : | #10 |
Fresh install on a Lenovo ThinkCentre M91. I cannot shutdown my system via the "normal" buttons.
Csimbi (turbotalicska) wrote : | #11 |
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.
But.
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 : | #12 |
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 : | #13 |
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-
gnome-session[
Do: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
gnome-settings-
Tony Ballantyne (ballantony) wrote : | #14 |
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 : | #15 |
For me, what seems like the same bug also prevents restart, and logoff. Anyone else?
Scott Baker (14scottyb) wrote : | #16 |
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 : | #17 |
Yes same issue here. Since upgrade. Only difference is I run the machine through virtualbox
Justin Thomas (justin-nitj) wrote : | #18 |
SAme problem
Fix Plz
Anthony Nguyen (portablestew) wrote : | #19 |
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 : | #20 |
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 : | #21 |
I'm experiencing the exact same problem. Halt freezes while power off or shutdown -h now works fine.
Thanks for a quick resolution guys
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 : | #23 |
I wonder if it's a polkit permission problem, with lightdm... because when I run d-feet and look at org.freedesktop
Tipi Koivisto (tipit) wrote : | #24 |
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=
dbus-send --system --print-reply --dest=
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 : | #29 |
Fix it please! not interested in long code entries in the terminal each time.
Alex (alex-tambo) wrote : | #30 |
Hi All,
The solution that worked for me was in the following link:
https:/
I renamed the links in /etc/rc0.d and rc6.d:
- S31umountnfs.sh to S05umountnfs.sh
- 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 : | #32 |
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,
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=
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):
poweroff
Viswanath (rvishu77) wrote : | #35 |
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 : | #36 |
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 : | #37 |
Ubuntu 12.04 (precise) is affected by this bug, too.
tags: | added: oneiric precise |
gianluca (antonelli) wrote : | #38 |
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 : | #39 |
This bug has been reported on the Ubuntu ISO testing tracker.
A list of all reports related to this bug can be found here:
http://
tags: | added: iso-testing |
Isil - ITM (isil-h) wrote : | #40 |
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 : | #41 |
Running:
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 : | #42 |
# 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:
[ 576.022944] res 01/60:00:
[ 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 : | #43 |
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 : | #44 |
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 : | #45 |
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 : | #46 |
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 : | #47 |
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 : | #48 |
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 : | #49 |
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 : | #50 |
You could try the workaround found in this article: http://
Run in terminal> sudo nano /etc/default/grub
Edit this line and save> GRUB_CMDLINE_
Run in terminal> sudo update-grub
Restart your PC
Yannick Drolet (ydrolet) wrote : | #51 |
Modification in /etc/default/grub takes effect next time OS starts.
Mauro Cabella (mauro-cabella) wrote : | #52 |
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/
It's the response of the system after pressing the power button and it works for me.
HTH.
Bye, Mauro
Steve Langasek (vorlon) wrote : | #53 |
... 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 : | #54 |
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 : | #55 |
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 : | #56 |
Ok, I'll do it.
Thank you.
Mauro
DrKay (dr-jameskay) wrote : | #57 |
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 : | #58 |
That's a different bug.
Rarylson Freitas (rarylson) wrote : | #59 |
Hi,
I think the current behavior is correctly, but the comment in "/etc/default/halt" sould be updated.
So, I proposed a patch in https:/
/var/log/messages