How to recover from corrupted textmode

From ThinkWiki
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.


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:

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


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


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