press CTRL + ALT + F1
login and run following command
sudo service gdm stop
sudo apt-get build-dep xserver-xorg-video-tdfx
sudo apt-get source xserver-xorg-video-tdfx
sudo apt-get install libglide3
sudo ldconfig
cd ~/xserver-xorg-video-tdfx-1.4.3/
./configure
make
make install
cd /usr/local/lib/xorg/modules/drivers/
sudo cp *.* /usr/lib/xorg/modules/drivers/
sudo Xorg -configure
sudo mv ~/xorg.conf.new /etc/X11/xorg.conf
Add the following red line to /etc/X11/xorg.conf
Section "Device
Identifier "Configured Video Device"
Driver "vesa"
Section "Module"
Load "glx"
Load "dri"
Load "GLcore"
Load "v4l"
sudo service gdm start
reference link