Re: [gpm] Untangling the sleep hotkey mess



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.

-- 
Matthew Garrett | mjg59 srcf ucam org



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