![]() |
APMD-List: |
to APMD Home
|
Index:
[thread]
[date]
[subject]
[author]
From: Avery Pennarun <apenwarr@worldvisions.ca> To : <ncm@linuxlaptops.com> Re: [FIX] X and suspend/resumeOn Sat, Jul 31, 1999 at 10:38:01AM -0400, Nathan Myers wrote: > > I would recommend using chvt to switch away from and back to the main X > > display, _if_ your queryvt says we're on the current X terminal. This > > avoids all Xauthentication complexity, and works regardless of the X > > server configuration. > > Tried it, didn't work. X doesn't (necessarily) re-initialize the display > registers when it switches back in, it (often) restores what was there. > If what was there is garbage, it restores garbage. > > What might work is to switch away from the X vt on a suspend event, > and switch back on a resume event; you still need the current vt number, > but don't need to talk to X then. That's what I meant, actually. I'm all too familiar with what X does once the screen is corrupted :( > However, that depends on running a script during suspend, which is > iffy -- it may require spinning up the disk, for instance, which may > take longer than is allowed. In fact, the whole idea of a "suspend.d" > directory may be fatally flawed, on that basis. Since apmd and libc > may themselves be swapped out, I am doubtful about the safety of having > apmd monitor "suspend" events at all. As far as I know, there is no time limit, so there is no "take longer than allowed." We need to be able to do things on suspend, so that we can (for example) shut down pcmcia cards or flush disk cache buffers! > 1. How do I get the queryvt program folded into kbd or apmd, so that > the ioctl it uses (TIOCLINUX 12) doesn't get eliminated? I'd rather you folded it into kbd than apmd, since that's where chvt is already. Once that's done, we can probably change apmd (at least in Debian) to use queryvt/chvt during suspend/resume events. > 2. What other utility uses the ioctl that queryvt uses? I don't know. Presumably X does, since it can restore its original VT when it exits. I wouldn't worry too much about the ioctl getting eliminated -- Linux people aren't really big on taking out features (for better or for worse). > 3. (again) Does anybody know how to fake keyboard events below the level > that X and the VTs get them? That would avoid X authentication issues. I certainly don't know how. > p.s. why does my posting not appear in the archive? The archive is updated only occasionally. Have fun, Avery Index: [thread] [date] [subject] [author] |