Re: APM power off fails

Chris Wedgwood (
Mon, 2 Jun 1997 14:16:19 -0400


I'm not writing about this. In file kernel/sys.c, the option
LINUX_REBOOT_CMD_RESTART stands for reboot, _both_
Kernel 2.0.30 turns power off after the command 'shutdown -h now',
kernel 2.1.40 doesn't. Looks like a bug to me, hence my question.

The change looks very deliberate to me. The behavior was altered from that
of 2.0.x in such a way that it doesn't look like an accident. I wasn't
responsible for the change, so I don't know.

In 2.0.x if CONFIG_APM_POWER_OFF=y when a reboot(magic1,magic2,0xCDEF0123)
(system halt) is issue, the system will halt then power-down.

In 2.1.x th system will only halt. It will, however, power-down if you issue
a reboot(magic1,magic2,0x4321FEDC) (power off). Issuing this on a 2.0.x
kernel will do nothing.

All that 2.1.x has done is separate what it means to halt and to power-down.

Why would one not want to turn off power after system halt

For most people, you wouldn't. There are a couple of uses I can think of
though. When a system it halted, it still routes packets, responds to pings,
etc. This means it may be useful to halt a machine and not power-down in the
case of a router. (If it's halted, its also going to be damn hard to hack).

I've also had faulty hardware which doesn't like being power-down EVER.
True, both of these are somewhat contrived.

The halted system leaves 2 options: reboot and turning off power. The
first you would rather achieve with 'shutdown -r now', the latter
automatically with APM.