* RE: [Acpi] Re: shutdown on pressing the ATX power button
@ 2001-08-09 20:31 Grover, Andrew
2001-08-09 20:38 ` Pavel Machek
2001-08-10 9:22 ` Sergei Haller
0 siblings, 2 replies; 5+ messages in thread
From: Grover, Andrew @ 2001-08-09 20:31 UTC (permalink / raw)
To: 'Pavel Machek', Sergei Haller, linux-kernel, ACPI mailing list
Just use acpid - it should notice the power button press and do the right
thing.
We do not want to hardcode what specific buttons do.
Regards -- Andy
> -----Original Message-----
> From: Pavel Machek [mailto:pavel@suse.cz]
> Sent: Thursday, August 09, 2001 10:56 AM
> To: Sergei Haller; linux-kernel@vger.kernel.org; ACPI mailing list
> Subject: [Acpi] Re: shutdown on pressing the ATX power button
>
>
> Hi!
>
> > is there any way to let the system execute something by
> pressing the ATX
> > power button (preferrable executing 'shutdown -h now', but
> would be nice
> > if it was configurable)
> >
> > I looked into the (very large) list archive but didnt find
> any answer.
> > if it is a kind of FAQ or off topic, please point me to the
> place I could
> > find an answer.
>
> Try this, and put this: into inittab
>
> # Action on special keypress (ALT-UpArrow)
> kb::kbrequest:/etc/rc/rc.reboot 2 0
>
> --- clean/drivers/acpi/events/evevent.c Sun Jul 8 23:26:27 2001
> +++ linux/drivers/acpi/events/evevent.c Sun Jul 8 23:25:01 2001
> @@ -193,6 +168,8 @@
>
> if ((status_register & ACPI_STATUS_POWER_BUTTON) &&
> (enable_register & ACPI_ENABLE_POWER_BUTTON)) {
> + printk ("acpi: Power button pressed!\n");
> + kill_proc (1, SIGWINCH, 1);
> int_status |= acpi_ev_fixed_event_dispatch
> (ACPI_EVENT_POWER_BUTTON);
> }
>
>
> --
> I'm pavel@ucw.cz. "In my country we have almost anarchy and I
> don't care."
> Panos Katsaloulis describing me w.r.t. patents at
> discuss@linmodems.org
>
>
> _______________________________________________
> acpi maillist - acpi@phobos.fs.tum.de
> http://phobos.fs.tum.de/mailman/listinfo/acpi
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Acpi] Re: shutdown on pressing the ATX power button
2001-08-09 20:31 [Acpi] Re: shutdown on pressing the ATX power button Grover, Andrew
@ 2001-08-09 20:38 ` Pavel Machek
2001-08-10 9:22 ` Sergei Haller
1 sibling, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2001-08-09 20:38 UTC (permalink / raw)
To: Grover, Andrew; +Cc: kernel list
Hi!
> Just use acpid - it should notice the power button press and do the right
> thing.
This is not hardcoded, you can set it up in init just fine. (Well, I
should not use SIGWINCH but some other signal). C-A-D is handled in
very similar way, and I think it is the right way, and should be
extended to halt, too.
I just don't want to run acpid just because I want
powerdown-on-powerbutton.
Pavel
> We do not want to hardcode what specific buttons do.
>
> Regards -- Andy
>
> > -----Original Message-----
> > From: Pavel Machek [mailto:pavel@suse.cz]
> > Sent: Thursday, August 09, 2001 10:56 AM
> > To: Sergei Haller; linux-kernel@vger.kernel.org; ACPI mailing list
> > Subject: [Acpi] Re: shutdown on pressing the ATX power button
> >
> >
> > Hi!
> >
> > > is there any way to let the system execute something by
> > pressing the ATX
> > > power button (preferrable executing 'shutdown -h now', but
> > would be nice
> > > if it was configurable)
> > >
> > > I looked into the (very large) list archive but didnt find
> > any answer.
> > > if it is a kind of FAQ or off topic, please point me to the
> > place I could
> > > find an answer.
> >
> > Try this, and put this: into inittab
> >
> > # Action on special keypress (ALT-UpArrow)
> > kb::kbrequest:/etc/rc/rc.reboot 2 0
> >
> > --- clean/drivers/acpi/events/evevent.c Sun Jul 8 23:26:27 2001
> > +++ linux/drivers/acpi/events/evevent.c Sun Jul 8 23:25:01 2001
> > @@ -193,6 +168,8 @@
> >
> > if ((status_register & ACPI_STATUS_POWER_BUTTON) &&
> > (enable_register & ACPI_ENABLE_POWER_BUTTON)) {
> > + printk ("acpi: Power button pressed!\n");
> > + kill_proc (1, SIGWINCH, 1);
> > int_status |= acpi_ev_fixed_event_dispatch
> > (ACPI_EVENT_POWER_BUTTON);
> > }
> >
> >
> > --
> > I'm pavel@ucw.cz. "In my country we have almost anarchy and I
> > don't care."
> > Panos Katsaloulis describing me w.r.t. patents at
> > discuss@linmodems.org
> >
> >
> > _______________________________________________
> > acpi maillist - acpi@phobos.fs.tum.de
> > http://phobos.fs.tum.de/mailman/listinfo/acpi
> >
--
The best software in life is free (not shareware)! Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Acpi] Re: shutdown on pressing the ATX power button
2001-08-09 20:31 [Acpi] Re: shutdown on pressing the ATX power button Grover, Andrew
2001-08-09 20:38 ` Pavel Machek
@ 2001-08-10 9:22 ` Sergei Haller
2001-08-11 1:36 ` Pavel Machek
1 sibling, 1 reply; 5+ messages in thread
From: Sergei Haller @ 2001-08-10 9:22 UTC (permalink / raw)
To: Grover, Andrew
Cc: 'Pavel Machek',
linux-kernel, ACPI mailing list, suse-linux, suse-linux-e
On Thu, 9 Aug 2001, Grover, Andrew wrote:
> Just use acpid - it should notice the power button press and do the right
> thing.
Thats exactly what I need. Thanks.
One problem I had, though. With ACPI on (and thus APM off) the system
wouldn't power off after halting. Here is the reason:
The shutdown script on my system (SuSE 7.2) looks for /proc/apm or
/proc/sys/acpi and calls 'halt -p' in both casese, else 'halt'.
Changing /proc/sys/acpi to /proc/acpi solved that last problem.
I suppose that other (older) kernel versions used /proc/sys/acpi instead
of /proc/acpi. The best solution is then to check for existence of one of
/proc/apm, /proc/sys/acpi and /proc/acpi.
Thanks again.
> -----Original Message-----
> From: Sergei Haller <Sergei.Haller@math.uni-giessen.de>
> To: linux-kernel@vger.kernel.org
>
> Hi!
>
> > is there any way to let the system execute something by pressing the ATX
> > power button (preferrable executing 'shutdown -h now', but would be nice
> > if it was configurable)
> >
> > I looked into the (very large) list archive but didnt find any answer.
> > if it is a kind of FAQ or off topic, please point me to the place I could
> > find an answer.
c ya
Sergei
--------------------------------------------------------------------
eMail: Sergei.Haller@math.uni-giessen.de
--------------------------------------------------------------------
Be careful of reading health books, you might die of a misprint.
-- Mark Twain
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Acpi] Re: shutdown on pressing the ATX power button
2001-08-10 9:22 ` Sergei Haller
@ 2001-08-11 1:36 ` Pavel Machek
0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2001-08-11 1:36 UTC (permalink / raw)
To: Sergei Haller
Cc: Grover, Andrew, 'Pavel Machek',
linux-kernel, ACPI mailing list, suse-linux, suse-linux-e
Hi!
> The shutdown script on my system (SuSE 7.2) looks for /proc/apm or
> /proc/sys/acpi and calls 'halt -p' in both casese, else 'halt'.
That's just plain stupid. halt -p should be called. Always.
Pavel
--
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Acpi] Re: shutdown on pressing the ATX power button
@ 2001-08-09 21:05 Grover, Andrew
0 siblings, 0 replies; 5+ messages in thread
From: Grover, Andrew @ 2001-08-09 21:05 UTC (permalink / raw)
To: 'Pavel Machek'; +Cc: kernel list
Well, I think we're both familiar with both sides of this argument from a
few months ago. I won't rule out your proposed implementation but I'm
sceptical. Can we revisit this issue in a few months? Once acpid is more
feature-complete, we should be able to use it as a reference to discuss the
requirements an init-based power policy would have to meet.
Regards -- Andy
> From: Pavel Machek [mailto:pavel@suse.cz]
> > Just use acpid - it should notice the power button press
> and do the right
> > thing.
>
> This is not hardcoded, you can set it up in init just fine. (Well, I
> should not use SIGWINCH but some other signal). C-A-D is handled in
> very similar way, and I think it is the right way, and should be
> extended to halt, too.
>
> I just don't want to run acpid just because I want
> powerdown-on-powerbutton.
>
> Pavel
>
> > We do not want to hardcode what specific buttons do.
> >
> > Regards -- Andy
> >
> > > -----Original Message-----
> > > From: Pavel Machek [mailto:pavel@suse.cz]
> > > Sent: Thursday, August 09, 2001 10:56 AM
> > > To: Sergei Haller; linux-kernel@vger.kernel.org; ACPI mailing list
> > > Subject: [Acpi] Re: shutdown on pressing the ATX power button
> > >
> > >
> > > Hi!
> > >
> > > > is there any way to let the system execute something by
> > > pressing the ATX
> > > > power button (preferrable executing 'shutdown -h now', but
> > > would be nice
> > > > if it was configurable)
> > > >
> > > > I looked into the (very large) list archive but didnt find
> > > any answer.
> > > > if it is a kind of FAQ or off topic, please point me to the
> > > place I could
> > > > find an answer.
> > >
> > > Try this, and put this: into inittab
> > >
> > > # Action on special keypress (ALT-UpArrow)
> > > kb::kbrequest:/etc/rc/rc.reboot 2 0
> > >
> > > --- clean/drivers/acpi/events/evevent.c Sun Jul 8 23:26:27 2001
> > > +++ linux/drivers/acpi/events/evevent.c Sun Jul 8 23:25:01 2001
> > > @@ -193,6 +168,8 @@
> > >
> > > if ((status_register & ACPI_STATUS_POWER_BUTTON) &&
> > > (enable_register & ACPI_ENABLE_POWER_BUTTON)) {
> > > + printk ("acpi: Power button pressed!\n");
> > > + kill_proc (1, SIGWINCH, 1);
> > > int_status |= acpi_ev_fixed_event_dispatch
> > > (ACPI_EVENT_POWER_BUTTON);
> > > }
> > >
> > >
> > > --
> > > I'm pavel@ucw.cz. "In my country we have almost anarchy and I
> > > don't care."
> > > Panos Katsaloulis describing me w.r.t. patents at
> > > discuss@linmodems.org
> > >
> > >
> > > _______________________________________________
> > > acpi maillist - acpi@phobos.fs.tum.de
> > > http://phobos.fs.tum.de/mailman/listinfo/acpi
> > >
>
> --
> The best software in life is free (not shareware)! Pavel
> GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-08-14 11:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-09 20:31 [Acpi] Re: shutdown on pressing the ATX power button Grover, Andrew
2001-08-09 20:38 ` Pavel Machek
2001-08-10 9:22 ` Sergei Haller
2001-08-11 1:36 ` Pavel Machek
2001-08-09 21:05 Grover, Andrew
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).