Tuesday 1 March 2016

Installing Nvidia Drivers on Linux

If you are going to use Octane on Linux, you will need to install the Nvidia drivers.  As of Octane 3 alpha 5, you will need at less Nvidia driver version 353 installed in order to render.  There are a number of approaches to installing the Nvidia drivers on Linux, and having gone through the pain of installing and updating Nvidia drivers on a number of Linux installs this week, I though I would post my workflow.  This workflow is based on using the Nvidia driver installer from Nvidia, and will vary depending on the type and ago of your Linux distro.

1) Determine which is the correct, most recent driver for your card via http://www.nvidia.com/Download/index.aspx?lang=en-us and download the installer.  Make the installer executable (ie. "sudo chmod +x ~/Downloads/NV*.run")

2) [OPTIONAL] Remove all existing Nvidia drivers (Ubuntu = sudo apt-get remove nvidia*).  I'm not sure this step is absolutely required.

3) Install the kernel headers and source (this will vary depending on your Linux flavour).  For Red Hat, Centos, etc see http://www.dedoimedo.com/computers/centos-7-nvidia.html. For Ubuntu it will be "sudo apt-get install dkms build-essential linux-headers-generic".  If you have changed your build environment (ie. changed gcc/g++ to be an earlier or later version than came with your distro, then you might need to change this - easiest option is to remove then reinstall gcc/g++).

4) Blacklist or remove/uninstall the Nouveau driver.  Blacklist on Centos as per the above link.  To blacklist on Ubuntu, see http://www.allaboutlinux.eu/remove-nouveau-and-install-nvidia-driver-in-ubuntu-15-04/.

5) Reboot

6) Stop your X server.  Mint is Ctrl-Alt-F2, or in Centos open a terminal and "init 3".  If the Nvidia installer gives an error indicating the X server is still running, kill the process via "sudo /etc/init.d/lightdm stop" (Cinnamon) or "sudo /etc/init.d/mdm stop" (MATE), etc.

7) Run the Nvidia driver installer as root

8) Reboot 

If you cannot get the driver working, and you are using Cinnamon, as a last resort, install  MATE, since it does not use the graphics acceleration that Cinnamon does, so is more tolerant to incorrectly installed graphics drivers.

No comments:

Post a Comment