Installing CUDA 7.5 in Ubuntu 14.04
After some problems installing CUDA 7.5 in Ubuntu 14.04, facing login loops and other problems, I found a solution on a NVIDIA forum (link in the end of the post). This procedure installs the graphics card for CUDA purposes, not allowing its use for rendering.
- Install the build-essentials package by running:
-
Download the CUDA installation (.run) file from the NVIDIA website (Link).
-
If you have a xorg.conf file, remove it (backup the file first to avoid any problems):
- Create the /etc/modprobe.d/blacklist-nouveau.conf file containing:
blacklist nouveau option nouveau modeset=0
- The run the following command and reboot your computer.
-
When the login screen appears, type Ctrl + Alt + F1 to access the text interface and login with your user.
-
Go to the directory where the CUDA .run file was downloaded and run:
- Stop the lightdm service and run the CUDA installation file (OpenGL libs should not be installed!):
-
During the installation you should ACCEPT the EULA conditions, say YES to installing the NVIDIA driver, YES to installing the CUDA Toolkit and Driver and YES to installing the CUDA Samples. If asked, you should say NO when asked if you want to rebuild any Xserver configurations.
-
After the installation is complete, check if device nodes are present (if nothing happens, it means everything is ok!):
- Set environment path variables (this can be added to the end of the XXXXXX file so that there is no need to rerun this commands every time you restart your computer). Remember to change YOUR_CUDA_PATH to the right path, depending on your CUDA version (e.g. /usr/local/cuda-7.5):
- Verify the NVIDIA driver version and the CUDA driver version:
- (Optional) Now, you can switch the lightdm back on. You should then be able to login through the GUI without any problems:
To test the CUDA installation:
- Create the CUDA Samples by accessing its folder and running:
- Go to the release folder inside the CUDA Samples folder (e.g. NVIDIA_CUDA-7.5_Samples/bin/x86_64/linux/release/) and run two standard checks (first to see your graphics card specs and then to check if its operating correctly). Both tests should ouput ‘PASS’:
Everything should be ok after you reboot.
Leave a comment