Re: Re: Hardware state saving & X

Alan Hourihane
2003-10-16T00:10:01Z

On Wed, Oct 15, 2003 at 09:32:18AM -0700, Patrick Mochel wrote:
> The fact that different behavior exists is completely obvious (refer to
> the question and documentation). The question was *how* it was different
> from a userpsace perspective. I.e. what exactly is saved, and what isn't.
>
> Under APM, the BIOS handles the state transition, but it does not know
> each device initimately, so the OS still has to handle some of the device
> state.
>
> Video devices have an int10 call to save/restore state, which is what the
> APM BIOS uses. Alan, would it suffice to call that from the kernel, in
> either vm86 mode or real mode to handle all the saving/restoring. If we
> were able to call that, what more would you have to do?

I'm not sure you can call int10 from kernel space. But think about
other architectures too that don't have int10/x86 available to them.
XFree86 already has an x86 emulator to do the softbooting via int10 in
userspace, but I appreciate if people are not running X, then the kernel
needs to restore some sort of text mode too from the last session.

It's never been an issue of what to save/restore for X - that's the drivers
responsibility in X. And if it doesn't do it properly now, I'd consider it
a bug in the driver and should be fixed.

The main question was how to get events from suspend/resume so that we
can do this saving and restoring.

If the /sbin/hotplug & DBUS is the recommended route, then I really
need to go look at these two pieces of software and craft something up for X.

Alan.