I experienced a lot of random X server crashes using the proprietary driver for the NVIDIA graphic card on my Thinkpad T61 running Ubuntu 9.04 x86 with Compiz activated.
I managed to fix the problem by installing the lastest NVIDIA driver. I wrote a little script to automate the process and save time. I recommend you to run this in command line mode. Here it is:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
#!/bin/bash # Check if the X server is running pid_of_X=`ps aux | grep X | grep -v 'grep' | grep root | awk '{ print $2 }'` if [ -z "$pid_of_X" ]; then echo -e '\n\n\n\n\n\n\n\n\n' echo -e 'X is not running! - Good!\n' # Stop the xserver (GDM) sudo /etc/init.d/gdm stop cd $HOME/Desktop if [ -e latest.txt ]; # Check for 'latest.txt' file then rm -f latest.txt fi if [ -e NVIDIA-Linux-x86-* ]; # Check for 'NVIDIA-Linux-x86-*' file then rm -f NVIDIA-Linux-x86-* fi # Get the latest driver from NVIDIA's ftp nvidia_ftp='ftp://download.nvidia.com/XFree86/Linux-x86' wget -c -T 10 $nvidia_ftp/latest.txt new_driver_version=`cat latest.txt | awk '{ print $1 }'` new_driver_filename=`cat latest.txt | awk '{ print $2 }'` wget -c -T 10 $nvidia_ftp/$new_driver_filename chmod +x $HOME/Desktop/NVIDIA-Linux-x86-* # Remove all nvidia* packages in the system sudo dpkg -l | grep nvidia | awk '{ print $2 }' | xargs sudo aptitude -y purge # Remove all the nvidia kernel objects currently installed export kernel_version=`uname -r` sudo rm -f `find /lib/modules/$kernel_version -iname nvidia.ko` # Install the new driver sudo sh $HOME/Desktop/NVIDIA-Linux-x86-*.run rm -f NVIDIA-Linux-x86-* rm -f latest.txt echo -e '\n\n\n\n\n\n\n\n\n' echo -e '---------\n' echo -e 'All done!\n' echo -e 'Starting GDM in 5 seconds...\n' sleep 5 # Start GDM sudo /etc/init.d/gdm start else echo -e '\n\n\n\n\n\n\n\n\n' echo -e 'X is running!\n' echo -e 'You should run this script in console mode!\n' echo -e 'Press CTRL+ALT+F1 to go to console mode, then run this script again!\n' echo -e '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n' echo -e 'Aborting in 5 seconds!' echo -e '\n\n\n\n\n\n\n\n\n' sleep 5 exit 0 fi |
0 Comments.