tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: powerd on boot



Christoph Egger wrote:

> I have a driver which implements support for PNP0C32 acpi hotkeys
> (aka "Direct Application Launch Buttons, 
> http://www.microsoft.com/whdc/system/vista/DirAppLaunch.mspx)
> 
> Those allow to turn on / resume a machine and generate an ACPI event
> on boot.
> My driver catches it and injects it into sysmon _before_ powerd
> starts.
> 
> When powerd starts I expect it to run /etc/powerd/scripts/hotkey_button,
> but that doesn't happen. But why?

sys/dev/sysmon/sysmon_power.c:sysmonopen_power() calls
sysmon_power_event_queue_flush() on open to flush any existing
events.

I'm not sure why this is done - it's been that way since the
open function existed.

Just for fun, you could try commenting out the call
sysmon_power_event_queue_flush() and see if that give you the
behaviour you want.

Cheers,
Simon.


Home | Main Index | Thread Index | Old Index