Intallation CUDA to Ubuntu 12.10 with Optimus Nvidia Cards

I installed Ubuntu 12.10 to my brand new machine but as always I started to deal lot of deriver problems coming around. Most consuming trouble was about the Nvidia drivers. I installed all kind of drivers suggested by the Additional Drivers tool and the Nvidia website but I cannot get my Graphic card working. After hours of investigation see that with the new generation notebooks with Nvidia cards there is a new technology called Optimus. With that system, new machines have two different graphic cards as the Intel’s native one on the mother board and Nvidia Card. To prolong the battery life, Intel card is working for simple graphic rendering where as Nvidia comes into play with hard rendering problems so that machine can keep the battery life better in hours. However, Nvidia is deficient to provide a driver supporting new tech on Linux machines. As always solution is taken by the open source approach, Bumblebee driver interface is developed. In order to make your card working at Ubuntu you need to install bumblebee drivers and use ‘optirun appname’ command to utilize Nvidia card. If you don not run your app with optirun, Intel card will handle.  To get moe detail abut Bumblebee follow the above link.

Now what is the problem about CUDA. Actually installing Bumblebee is not directly the solution for the problem. Since we use Ubuntu 12.10 and CUDA currently support officially only the 11.10 version, we need to do some minor changes. For my installation, changing the native gcc compilers from 4.7 version to 4.4 version has solved the problem. 12.10 comes with 4.7 version of compilers but CUDA installation needs 4.4 version.

I find an bash script and have some little changes over (since it was not enough to handle all compilation at my case). Here is the script at github. This script will handle all the needs of intallation. All you have to do that downloading CUDA installation file from NVIDIA  (if you are on 12.20 64 bit than install 11.10 64bit version) and retyping the  installation file path on the script. Than run the script with ‘bash’ command. Thats all!


Do not install suggested driver from the CUDA installation file. It destroys the Bumblebee configuration on system.

If you have any trouble or question let me know.

After installation you need to run CUDA executables with ‘optirun ./executable.out’