Subject: Re: ATX power button
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Eric Delcamp <e.delcamp@wanadoo.fr>
List: port-i386
Date: 04/28/2002 19:55:36
The interrupt and putting the machine in suspend mode is made by the BIOS.
Maybe there is a way to intercept this call, doing some task before and
giving back the hand to BIOS.

----- Original Message -----
From: "Manuel Bouyer" <bouyer@antioche.eu.org>
To: "Michal Pasternak" <michal@pasternak.w.lub.pl>
Cc: "Julio Merino" <jmmv@hispabsd.org>; <port-i386@netbsd.org>
Sent: Saturday, April 27, 2002 12:43 PM
Subject: Re: ATX power button


> 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.
>
> --
> Manuel Bouyer <bouyer@antioche.eu.org>
> --