Messages in this thread Patch in this message | | | Date | Wed, 18 Mar 1998 01:32:58 +0200 (EET) | From | T Taneli Vahakangas <> | Subject | Re: Power Off on Halt (fwd) |
| |
On Tue, 17 Mar 1998, Johan Myréen wrote:
> I have the same problem. The machine (an ATX PPro, VS440FX) > does not power off, although it did it before. It just prints > "System halted." I have tried /sbin/halt -p and > /sbin/poweroff. > > This started happening when I compiled a new init (2.72) with > glibc (2.0.6), so the cause could be either init or glibc. (I > suspect glibc.) The kernel is compiled with "APM Power > Management BIOS Support" and "Power off on shutdown". > > Has anybody else seen this problem?
Yes, I used to have problems too, but saw a "fix" for it on linux-kernel some time ago. In the file kernel/sys.c there is the function sys_reboot(), which needs to be "prepared" thusly:
--- /usr/src/linux/kernel/sys.c Sun Mar 15 14:10:17 1998 +++ /usr/src/linux-2.1.88/kernel/sys.c Mon Feb 23 01:31:07 1998 @@ -199,6 +199,7 @@ case LINUX_REBOOT_CMD_HALT: notifier_call_chain(&reboot_notifier_list, SYS_HALT, NULL); printk(KERN_EMERG "System halted.\n"); + machine_power_off(); machine_halt(); do_exit(0); break; (use --ignore-whitespace as i'm using cut'n'paste... if you _really_ want this patch, i won't recommend on using it) As you can see this is crude and certainly the wrong way of doing this since it eliminates the possibility to halt the machine. I can live with that, though :) I'm using AL440LX, glibc and sysvinit 2.73.
I took a fast look on halt.c (in sysvinit 2.74 package) but couldn't see why it would fail... It even has a include file of it's own which has
#define BMAGIC_POWEROFF 0x4321FEDC
which matches the definition in include/linux/reboot.h. Where's the problem?
> > -- > Johan Myreen > jem@iki.fi >
Taneli <vahakang@cs.helsinki.fi>
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |