Re: reinitialize the video card (was `reboot video card')

Mike A. Harris (mharris@ican.net)
Tue, 22 Sep 1998 05:10:24 -0400 (EDT)


On 16 Sep 1998, Turbo Fredriksson wrote:

>I've been trying a lot of things, none which worked
>(SVGATextMode/SaveTextMode/DOSEmu/SwitchTo/Open)
>
>Can some kernel hacker out there take a look at this? I think this
>is a kernel think, not a svgalib thing... Is there a way to write
>a program that reinitializes the video driver somehow?

Use restoretextmode to SAVE the state of the card, and then use
it again to restore the state of the card. Dont bother trying to
blindly type it all though.

Make a script called "W" and put all the commands into that
script. Then you only need to type "W" to restore the video.
The reason for the name "W" is that you can put a:

kbd_mode -a

into the script ahead of the video restoration commands, and have
it also restore your keyboard to a sane state.

Then when some program hoses your keyboard and/or video, you only
need to type "W" blindly if your keyboard works, and it'll
restore your video, or if the keyboard is fried, you only need to
type:

2 F11 =

Where "2" is the 2 key on the top row (not the numpad 2), F11 is
the F11 function key, and "=" on the top row. This generates the
scancodes for CTRL-C which gives you a blank bash command prompt,
then F11 generates a capital "W", and finally "=" generates a
carriage return. This runs your W script (assuming it's in the
path) which then restores keyboard and video.

Cool eh? ;o)

--
Mike A. Harris  -  Computer Consultant  -  Linux advocate

Linux software galore: http://freshmeat.net

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/