Re: X and VT-switching bug?

Pavel Machek (
Fri, 12 Dec 1997 14:04:39 +0100


> You mean you've been changing virtual consoles as fast as you can on a
> SUN and an SGI? Nah.... Didn't think you tried that.

Me did, sun ended with keyboard messed up. I managed little messed
graphics, too ;-).

> Sun and SGI have a frame buffer that is graphics mode only, and
> doesn't need changing from VC to VC.
> I think that things are "implementation issue": If an Xserver would:
> - on switch away, only tell the kernel that the switch is done
> after everything is actually done. Discard keystrokes recieved after
> the switchaway was initiated.

This is bad. Linux just discarded some keystrokes I did, which is bug
in my eyes. It was hard to write them, how is it possible that it
simply discarded my keypresses? (Note that it is inconsistent with VC
switching, it never discards anything). And: How can I know when I can
start typing? I do not like looking at the screen.

> - on switch-to-X, first tell the kernel (keyboard->raw mode) and
> process keystrokes once your're fully switched.

Here's race:

Alt-F9: switch-to-X
X wake up and want to call switch to raw mode
Alt-F1: switch to tty1
X switch into raw mode, not knowing switch to tty1 happened,
yet, they start drawing themselves.
Current tty is 1 and it is in graphics. Screwed console. I've seen
this happening, with overloaded system and fast fingers this is not
that hard to recreate.

> then, everything would be just fine.....

No. You still lost keypresses. And there's race.


I'm really 	   Pavel
Look at ;-).