Subject: Re: ATX power button
To: None <port-i386@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: port-i386
Date: 04/27/2002 12:16:18
On Sat, Apr 27, 2002 at 12:43:31PM +0200, Manuel Bouyer wrote:
> On Sat, Apr 27, 2002 at 10:37:35AM +0000, Micha? Pasternak wrote:
> > Manuel Bouyer [Sat, Apr 27, 2002 at 12:14:58PM +0200]:
> > > On Fri, Apr 26, 2002 at 11:31:18PM +0200, Julio Merino wrote:
> > [...]
> > > > And the real question: could I change the button function to do a
> > > > 'shutdown -p halt' instead of the suspend?
> > > Rigth now I'm not sure it's possible.
> > 
> > I notice, that NetBSD pops out a message on console, when I press the power
> > button, then the computer shuts.. so it seems possible for me, at least on
> > my box.
> 
> Yes, the event is probably reported by APM. But I don't think you can get
> the button event itself, only APM events. When you get the APM event
> I suspect it's too late, the machine is already in process of being powered
> down of put in suspend mode.

Don't think so....
If the APM interrupts are enabled, the power button just generates
an interrupt.  Holding it in (the button you fool) for about
5 seconds will turn off the psu.

(At least that is what happened when I enabled APM (I think it
was APM) on an ATX system a few years ago to play with hot plu PCI.)

	David

-- 
David Laight: david@l8s.co.uk