Nvidia driver updated - mixed versions of 304.88 and 319.32

My problem is that after trying to update my driver through the additional drivers GUI I can't boot Ubuntu with GUI anymore, since Xorg says the kernel module is of version 304.88 (The old version before I updated) but the driver components are of version 319.32 (The new version)

This is the output of dpkg -l | grep nvidia

dkpg -l | grep nvidia
ii nvidia-304 : 304.88-0ubuntu0.0.3
 NVIDIA binary Xord driver, kernel module and VDPAU library
ii nvidia-319 : 319.32-0ubuntu0.0.1
 NVIDIA binary Xord driver, kernel module and VDPAU library
ii nvidia-common : 1:0.2.44.2
 Find obselete NVIDIA drivers
ii nvidia-current : 304.88-0ubuntu0.0.3
 Transitional package for nvidia-current
ii nvidia-settings : 304.88-0ubuntu.0.0.3
 Transitional package for nvidia-settings
ii nvidia-settings-304 : 304.88-0ubuntu.0.0.3
 Tool for configuring the NVIDIA graphics driver
ii nvidia-settings-319 : 319.32-0ubuntu.0.0.1
 Tool for configuring the NVIDIA graphics driver

That's the output of that file.

The message startx gives me is:

NVIDIA: API mismatch: the NVIDIA kernel module has version 304.88, but this NVIDIA driver component has version 319.32. Please make sure that the kernel module and all NVIDIA driver components have the same version.

   Fatal server error:
   no screens found

I understand that something went wrong during the update, so I wonder how to fix this so that the remaining parts of 304 are removed and replaced with 319. I don't know hwere to start because I thought that nvidia-current was the one that would update to 319 and so reinstalling that didn't work. And I googled and found that somebody said to try to install/reinstall/uninstall this package: nvidia-current-updates-dev

But I didn't have that package installed so it did not help. Other than that, I am clueless. I hope the information I provided will be enough so I can get an answer soon.

EDIT:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.3 LTS
Release: 12.04
Codename: precise

uname -a
Linux SQuad 3.2.0-52-generic #78-Ubuntu SMP Fri Jul 26 16:21:44 UTC 2013 x86_64 x86_64 x86_64 GNU/LINUX

Solution 1:

Instead of installing the latest version, I recommend you to install Kernel which is meant for Ubuntu 12.04.3 LTS that is Linux Kernel 3.8.0.30. It is available in the repository so no need to go to some other place. Here is the steps to install Kernel 3.8.0.30 for Ubuntu 12.04.3 LTS.

  • Execute following commands in series(one by one, if you get any error in any command just comment for the command for which you got the error with the error message)

    • Execute this to update repository:

      sudo apt-get update
      
    • Execute this to install Kernel 3.8.x(be careful, don't miss any character)

      sudo apt-get install linux-generic-lts-raring linux-headers-3.8.0-30 linux-headers-3.8.0-30-generic linux-headers-generic-lts-raring linux-image-3.8.0-30-generic linux-image-generic-lts-raring
      
    • Execute this to update grub:

      sudo update-grub
      
    • Execute this to re-configure all installed packages(It would take some time, so wait. If it fails, gives some error just proceed to next step)

      sudo dpkg-reconfigure -a
      
    • Execute this to restart your system:

      sudo reboot
      
  • While restarting, you would see one more entry in Grub Entry for Linux Kernel 3.8.0.30 chose that.

  • See what happens.. Reply for further assistance..


Now Removing nvidia-304 and re-configuring nvidia-319

Follow these steps to do so.. I am assuming that nvidia-319 is currently installed in your system.

  • Open terminal and execute following commands to completely nvidia-304

    sudo apt-get autoremove nvidia-304*
    sudo apt-get --purge remove nvidia-304*
    sudo apt-get autoremove
    sudo apt-get autoclean
    
  • Then execute these commands to re-configure nvidia-319

    sudo update-grub
    sudo dpkg-reconfigure nvidia-319
    

    if above command shows some error then try to replace nvidia-319 with nvidia-319*

    sudo update-grub
    sudo update-initramfs -u (it would take some time)
    
  • Then restart your system

    sudo reboot
    

Reply..