Re: 6.x acpi powerbutton
- From: Nate Lawson <nate@xxxxxxxx>
- Date: Fri, 17 Apr 2009 12:27:32 -0700
Ian Smith wrote:
On Fri, 10 Apr 2009, Nate Lawson wrote:
> Andriy Gapon wrote:
> > on 09/04/2009 23:24 Stephen Clark said the following:
> >> Is there a reason it doesn't send and event like Linux that can be acted
> >> upon by user space other
> >> than signaling init? I like to have a message written in
> >> /var/log/messages that someone pressed
> >> the powerbutton.
> >
> > I think that for all suspend states except S5 userland is notified via
> > devd mechanism and potentially can veto the suspend. S5 (soft-off) is
> > coded to start shutdown immediately. You can try to hack on
> > acpi_ReqSleepState in sys/dev/acpica/acpi.c.
> >
> > I am not sure what is the reason for this special behavior of S5. But I
> > like it, because it sometimes allows me to perform semi-clean shutdown
> > when X goes crazy. But I also see when it could be useful to have S5
> > request go through userland. So this could be configurable.
>
> The reason for userland getting into the loop in the first place was to
> run programs to shut down devices and reinit them after resume. This
> isn't necessary in the shutdown case because init already sends a
> signal, as you mention.
>
> There's already a mechanism for timing out if userland is not
> responding, so a suspend will ultimately happen whether or not it
> answers. However, that waits for a while (1 minute?) and devd used to be
> optional, so I thought it best to keep the existing S5 behavior
> (immediate shutdown).
>
> It may be ok to enable this for S5 but I don't think it's very useful.
Perhaps a silly question, but is it too late at this stage of the game
to try logging S5 events to syslog before dying? I agree with Stephen,
logging 'shutdown by powerbutton' surely beats what might otherwise
resemble a spontaneous reboot? Or is something already logged here?
I'm not resisting this, but I'm having trouble seeing the importance.
What happens differently than if someone hits CTRL-ALT-DEL on a virtual
console?
--
Nate
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: 6.x acpi powerbutton
- From: Stephen Clark
- Re: 6.x acpi powerbutton
- From: Chuck Swiger
- Re: 6.x acpi powerbutton
- From: Kostik Belousov
- Re: 6.x acpi powerbutton
- References:
- 6.x acpi powerbutton
- From: Stephen Clark
- Re: 6.x acpi powerbutton
- From: Andriy Gapon
- Re: 6.x acpi powerbutton
- From: Stephen Clark
- Re: 6.x acpi powerbutton
- From: Andriy Gapon
- Re: 6.x acpi powerbutton
- From: Nate Lawson
- Re: 6.x acpi powerbutton
- From: Ian Smith
- 6.x acpi powerbutton
- Prev by Date: Re: 6.x acpi powerbutton
- Next by Date: Re: FreeBSD 7.2-RC1 Available
- Previous by thread: Re: 6.x acpi powerbutton
- Next by thread: Re: 6.x acpi powerbutton
- Index(es):