The enclosed patches fix three problems with the Linux console
driver (/usr/src/linux/kernel/chr_drv/console.c).

1) Text mode is not restored for Hercules (HGA) cards upon exit
from XFree86-1.2.  These patches fix this by forcing the HGA into
text mode whenever a switch is made to a text mode VT.

2) Ditto for switching VTs in XFree86-1.2.

3) There is a bug in the console code whereby information intended
for one VT can appear on a different VT if a VT switch occurs while
the information is being processed. Typically this happens if you
use Alt-Fn while a listing such as that from "ls -l" is being displayed.


If you only want to fix the first two problems then you only need the
part of the patch which puts stuff between #ifdef HERCULES and the
corresponding #endif. Actually, the last outp_b() by itself will do
the job since XFree86-1.2 appears to be doing half the job of getting
the HGA into text mode.


Bill Metzenthen
apm233m@vaxc.cc.monash.edu.au
