RE: Applications & ACPI events

Grover, Andrew
2003-10-15T17:01:28Z

> [mailto:acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of
> Patrick Mochel
> > Currently I've got X opening /proc/acpi/events and acting
> upon them, but
> > obviously this race condition is with the kernel shutting
> us down before
> > X has a chance to catch up. This is where the stickling point is on
> > how to signal X from the kernel.
>
> It's actually a lot cleaner, and a lot easier to use the
> hotplug interface
> that I described before. We can extend the X API to include a
> PM event
> signalling mechanism. The hotplug scripts can call some
> simple X app that
> sends the message to the server and causes the graphics
> driver (and any
> XInput drivers that need the message) to save state.
>
> This would also be portable across Linux platforms that used
> different
> mechanisms for reading PM events from the kernel (acpid or some APM
> daemon); and across OSes that have similar needs.

This was what I was aiming for with ospmd/libpower -- a
PM-implementation-neutral method for user apps to get notified of
shutdowns before the kernel does its thing. However, have you read
anything about D-bus? That initiative seems like it might be right for
this kind of thing, too.

http://www.freedesktop.org/Software/dbus

Regards -- Andy