6.x acpi powerbutton

Andriy Gapon avg at icyb.net.ua
Wed Apr 22 13:04:16 UTC 2009


on 21/04/2009 22:02 Nate Lawson said the following:
> 
> I don't think that's what they're asking for. The normal shutdown
> process creates log entries, even if destined for poweroff. For example,
> shutdown -p will log before powering off. acpi_ReqSleepState() can come
> through /dev/apm, sysctl, etc. as well as the power button handler.

Yes, the normal shutdown does log. But the other types of Sx state changes do not
seem to get logged anywhere, so I think that that log message might still be useful.

> They are interested in the initiator of the event, the button itself. So
> you'd be adding a printf to the power button handler, "power button
> pressed". Then the normal shutdown messages would be logged but they
> would know the reason. Remember that with sysctl, you can configure
> different events to button mappings. So the power button could be used
> to initiate a suspend, for example.

Yes, I agree.
Which place do you think is the best for this log - acpi sleep event handler
(acpi_system_eventhandler_sleep) or individual sleep event triggers (power button
sleep button, lid)?

-- 
Andriy Gapon


More information about the freebsd-acpi mailing list