9/30/13

How to enable CUDA in Linux (Ubuntu) for Blender

You can easily enable CUDA in Ubuntu. CUDA is capable of delivering faster render in supported GPU.
First of all make sure that you have CUDA supported Nvidia graphics card. If so connect to Internet,

Open Ubuntu software center.
Go to editsoftware sources→other software
and turn on
Canonical partners and independent
Save and close.
Open terminal and type
“sudo apt-get update” .
Press enter and give password for root. Wait for the update to finish. Then type
“sudo apt-get install”
Press enter and wait for the installation to finish. Close the terminal and reboot.
You can use Ubuntu DVD also if you haven't internet connection. Just turn on DVD as installation media.
Open Ubuntu software center.
Go to editsoftware sources→Additional drivers
And look for available nvidia drivers. If found any install the latest proprietary driver. (you wont get the latest as from the developers site).
If you can't find any drivers,
In the Ubuntu software center search for “ additional drivers” and click on that link. Install or use this source. Restart your computer and repeat the steps.

Once installed you need to restart your computer to get the driver to work properly.
Open a new Blender, turn on CUDA and do a test render with GPU. You will get the GPU render.
If the render yields only black output you need to add some libraries.
Open terminal and type

“sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev”

then
“sudo apt-get update”
“sudo apt-get install”
Reboot your computer. CUDA will work perfectly.
Some times you may not get the correct CUDA rendering. Then you need to update Blender first. Update nvidia driver manually.

Update nvidia driver manually.

You can get the latest nvidia driver by manual installation. But you need to manually install the driver whenever you update your Linux kernel.
Download latest nvidia driver from manufactures website. Select the correct version suited for your system (32/64).
Copy it in desktop and rename to nvidia.run
Press CTRL+ALT+F1.
Login with your user name and password.
Then type
sudo service lightdm stop”
then
“cd Desktop”
“sudo ./nvidia.run”
carefully follow the on screen instructions and install the driver.
You will get several error message. Proceed further by clicking ok until you reach installation can continue.
Type
“sudo reboot”.
After reboot repeat the process from CTRL+ALT+F1
Follow the onscreen instructions and you can successfully install nvidia driver.
 Once finished either you can restart or start using your desktop by typing
sudo service lightdm start”

No comments: