Re: [gpm] Untangling the sleep hotkey mess



On 1/9/06, Matthew Garrett <mjg59 srcf ucam org> wrote:
> On Mon, Jan 09, 2006 at 04:14:40PM -0500, Dmitry Torokhov wrote:
> > And what do you do if:
> >
> > 1. You don't have ACPI available (other platforms)
> > 2. APM works better for some reason
> > 3. The hotkey (sleep, power, etc) does not come from ACPI?
>
> With most APM machines, pressing the hotkey causes the BIOS to send a
> system suspend event. There's no real way for the OS to tell what's
> caused this (it could be low battery, a closed lid or a sleep key press)
> and so the correct thing to do is to tell userspace that a suspend is
> about to happen and then do it.
>
> But yes, PMU sleep requests are (last time I checked) generally managed
> by keycode 142 being generated and userspace dealing with it. There's no
> equivalent to /proc/acpi/events. This is why I think standardising on
> the input layer is a more sensible approach than trying to turn input
> events into acpi ones.
>

I probably was not clear in my original message. The new input handler
for ACPI would be only used for compatibility with cirrent
installations relying on ACPID. This will allow gradual conversion of
ACPI drivers to use input layer instead of sending events dircetly to
/proc/acpi/events.

OTOH there should probably be anotehr generic power interface
filtering out power-related input events from the stream of all input
events in the system and making them available to userspace without
requiring applications (be it individual applications or HAL) to open
zillion of raw /dev/input/evenX devices.

--
Dmitry



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]