Ubuntu 12.04 - problem with nvidia drivers
I am not sure but think so Ubuntu not providing Nvidia latest driver version directly. You need to get help from Nvidia.
I think you need latest driver version, remove 331 that already installed, you can get Nvidia various driver version. Latest released on July 10, 2014.
Click here.
You will need bumblebee to enable the nvidia gpu.
For 12.04
sudo apt-get remove --purge nvidia-*
sudo rm /etc/X11/xorg.conf
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install ubuntu-desktop linux-headers-generic-lts-raring
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update && sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic
reboot
check these settings against your installed driver and adjust as necessary
sudo nano /etc/bumblebee/bumblebee.conf
*If you update the driver you will have to edit this file and adjust the settings.
Driver=nvidia
KernelDriver=nvidia-331-updates
LibraryPath=/usr/lib/nvidia-331-updates:/usr/lib32/nvidia-331-updates
XorgModulePath=/usr/lib/nvidia-331-updates/xorg,/usr/lib/xorg/modules
Usage [command] [option] [program]
optirun -b primus glxspheres
Or
primusrun
glxgears
primusrun
firefox
primusrun
wine gta-vc.exe
primusrun
steam
primusrun
nvidia-settings