How to recover from corrupted textmode

From ThinkWiki
Revision as of 16:19, 17 August 2006 by Thinker (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

When configuring your ThinkPad, you may occasionally end up with a corrupted textmode display in which you can't see anything even though the system is still running. This is frequently related to X and suspend operations. Here's how to recover from such occasions by resetting the video state.

The followings was tested on a ThinkPad T43 with an ATI Mobility Radeon X300 running Fedora 5.

Preperation

First you need to take a configuration snapshot of a valid textmode configuration. Switch to textmode and run:

vbetool vbestate save > /usr/local/etc/textmode.vbe

Then save the following script as /usr/local/sbin/textmode and # chmod u+x it:

#!/bin/bash
chvt 1
vbetool post
sleep 2
vbetool vbestate restore < /usr/local/etc/textmode.vbe
setsysfont
for (( i=0; i<100; ++i )); do echo .; done
clear
echo Textmode restored.

Recovery

Somehow get a root shell (e.g., log in blindly) and blindly run:

textmode

Usually, you will get a working textmode console back. Rarely, this will hang your machine (probably due to the BIOS call).