Subject: Re: X server crash/recovery
To: Space Case <wormey@eskimo.com>
From: Matthieu Herrb <matthieu@laas.fr>
List: port-i386
Date: 01/27/1999 09:28:39
You wrote (in your message from Mon 25)
 > I have in my system a S3/Virge card.  About once a month, something bites
 > the X server, causing it to coredump and leaves the console unreadable.
 > (Unless I log in from another system and restart the server, but things
 > don't come up quite right, then.)
 > 
 > Is there any way of resetting the graphics, short of rebooting the system?

Unfortunatly not. The console drivers don't know how to completly
reinitialize a VGA board to a given text mode. Each chipset has its
own set of registers to program. So writing a program that takes a VGA 
board in an unknown state and resets it to a known text mode is
nontrivial, and putting it into the kernel is probably a bad idea. 

The X server saves the registers it uses and normally it should
restore them upon exit (and should do so after a segmentation
violation too. If it doesn't, it a bug).

The old linux SVGAlib has some knowledge on how to program text modes on
some VGA boards. 

Another brute force approach would be to call the VGA BIOS reset from
NetBSD and the redo the basic programming done by the console driver
at boot time, but I don't know if it's possible.
-- 
					Matthieu