On Thu, Oct 17, 2002 at 02:21:13PM -0700, Mark Vojkovich wrote: >On Fri, 18 Oct 2002, Brad Hards wrote: > >> On Fri, 18 Oct 2002 05:35, Mark Vojkovich wrote: >> > The "nv" driver doesn't know (and can't know) anything about >> > suspend events. It's handled entirely by the bios and there is >> > no mechanism for XFree86 to get these ACPI events from the kernel. >> > Subsequently, the bios will mess up the "nv" driver's state and >> > the "nv" driver won't know that it needs to be reinitialized. >> > You have to VT switch to clean things up. I think the only solution >> > to this problem is to have ACPI support in the kernel and >> > have the events routed to /dev/apm (which XFree86 supports) or >> > to some other device and have XFree86 add support for that device. >> >> Tim Hockin wrote a acpid (on sourceforge.net) that can take ACPI events from >> the kernel ( via /proc/acpi/event ) and runs things in userspace. That is a >> potentially useful approach in this case. >> >> I see something like this (generalised to handle many other events), along >> with the current Linux hotplug style approach, as the path to make X work in >> dynamic hardware and networking environments. >> > > I'm wondering if it's feasible for the kernel to route ACPI power >management events to the corresponding APM events through /dev/apm >(optionally, of course) for some sort of ACPI to APM backwards >compatibility for some apps that use /dev/apm (like XFree86). >Otherwise somebody will have to add /dev/acpi support to XFree86.
It might be feasible to do this in user space too with a daemon that listens on /dev/acpi and delivers translated events on /dev/apm. Ultimately we probably want to add ACPI support to XFree86 so that it can take full advantage of what ACPI offers over APM. I think the original poster mentioned swsusp, which I thought was independent of APM and ACPI? I don't know what (if any) mechanism it uses to inform interested user-space applications that a suspend has been initiated. Either the X server needs to be informed about the suspend and resume so that it can do what needs to do, or have something else does get informed use chvt(1) to make the X server VT switch to a text console on suspend and switch back on resume. I think the chvt method is what people used before XFree86 had support for monitoring APM events. David _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert
