Bug 726387

Summary: systemd: 'halt' does not poweroff
Product: [openSUSE] openSUSE 12.1 Reporter: Ludwig Nussel <lnussel>
Component: DocumentationAssignee: Frederic Crozat <fcrozat>
Status: RESOLVED FIXED QA Contact: Karl Eichwalder <ke>
Severity: Normal    
Priority: P5 - None CC: coolo, forgotten_ghcFYO_ifG, hpj, jeffm, ke, sledz, werner
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ludwig Nussel 2011-10-25 14:06:15 UTC
if systemd-sysvinit is used typing 'halt' does not power off the machine. In sysv despite the name halt would actually power off on x86 and x86_64 (see /etc/init.d/halt). Iow in sysv 'halt' is equivalent to 'shutdown -h now' whereas with systemd it's equivalent to 'shutdown -H -h now'.
Systemd behavior is probably correct wrt some specification but sysv way is certainly smarter and more convenient on x86 as there is no firmware one could drop into after OS exit.
Comment 1 Frederic Crozat 2011-10-25 14:45:06 UTC
well, systemd is implementing what is in halt manual.

it appears SUSE is not respecting this manual (no idea why).
Comment 2 Ludwig Nussel 2011-10-25 14:56:19 UTC
the manual actually only states that halt calls shutdown but does not state how it calls shutdown.
Comment 3 Dr. Werner Fink 2011-10-25 15:03:28 UTC
I'm aware that the manual page does not mention the environment variable
INIT_HALT nevertheless the source and the log files of SysVinit does and
as well as Debian SuSE does use this variable and both distributions had
used in the boot scripts a way to use the appropiate options for halt/reboot
(see /etc/init.d/halt) based on the users choise in /etc/sysconfig/shutdown

This  smart behaviour was implemented over the years due several bug reports
and feature requests from the users side.
Comment 4 Frederic Crozat 2011-10-25 15:27:52 UTC
I think we should document it in release notes

"When using systemd, halt will no shutdown the system. Use "halt -p" or "shutdown""
Comment 5 Karl Eichwalder 2011-10-26 14:11:32 UTC
Here is my proposal:

  <sect3 id="sec.121.systemd-shutdown">
   <!-- bnc#726387 -->
   <title>System Shutdown with systemd</title>

   <para>
    To halt and poweroff the system when using
    <command>systemd</command>, issue <command>halt -p</command> or
    <command>shutdown -h now</command> on the command-line or use the
    shutdown button provided by your desktop environment.
   </para>

   <para>Note: A plain <command>halt</command> will not shutdown the
   system properly.</para>
  </sect3>
Comment 6 Karl Eichwalder 2011-10-27 14:44:08 UTC
SR: created request id 89560
Comment 7 David Majda 2011-11-09 14:51:56 UTC
*** Bug 728922 has been marked as a duplicate of this bug. ***
Comment 8 Ludwig Nussel 2011-11-23 07:36:10 UTC
*** Bug 731574 has been marked as a duplicate of this bug. ***
Comment 9 Jeff Mahoney 2011-11-23 15:29:18 UTC
I don't think documenting this is good enough. This is a regression from pretty much every previous SUSE release.
Comment 10 Karl Eichwalder 2011-11-23 16:15:20 UTC
(In reply to comment #9)
> I don't think documenting this is good enough. This is a regression from pretty
> much every previous SUSE release.

Frederic, please take a look.

If you want me to change the release notes entry or remove it completely, please reassign.
Comment 11 Frederic Crozat 2011-11-29 12:59:16 UTC
Please keep the release notes from now.

I'm not in favor of adding a SUSE only patch to systemd to handle a SUSE only behaviour which was not even present in halt manpage..

And I don't think systemd upstream will accept a "arch dependant" patch for changing "halt" to "halt -p" on x86/x86-64 (but feel free to ask them).