True
I reinstalled the OS and re-ran everything same as before adding the --no-opengl-libs flag. This is the critical part. I would like to add something else though! I did not install have to install the NVIDIA driver explicitly first. I ran the cuda.run file instead, and said yes to install the NVIDIA driver when it prompted me to. I feel like doing this in one straight run made everything way easier. Thanks for everything!
Post of final script and solution
- Download your relevant CUDA.run file: mine was: cuda_7.0.28_linux.run
Note, that once again this install is if you purely want to use your graphics card (Titan X) for GPU/CUDA purposes and not for rendering.
Also run: $sudo apt-get install build-essential
-
I start off with the regular GUI and Ubuntu working with no login problems.
-
No need to create an xorg.conf file. If you have one, remove it (assuming you ahve a fresh OS install). $ sudo rm /etc/X11/xorg.conf
-
Create the /etc/modprobe.d/blacklist-nouveau.conf file with :
blacklist nouveau
option nouveau modeset=0
Then $sudo update-initramfs -u
-
Reboot computer. Nothing should have changed in loading up menu. You should be taken to the login screen. Once there type: Ctrl + Alt + F1, and login to your user.
-
Go to the directory where you have the CUDA driver, and run
$chmod a+x . -
Now, run $ sudo service lightdm stop
The top line is a necessary step for installing the driver. -
I run the CUDA driver run file. *Notice that I explicitly don’t want the OpenGL flags to be installed:
$ sudo bash cuda-7.0.28_linux.run --no-opengl-libs -
During the install:
Accept EULA conditions
Say YES to installing the NVIDIA driver
SAY YES to installing CUDA Toolkit + Driver
Say YES to installing CUDA Samples
Say NO rebuilding any Xserver configurations with Nvidia.
-
Installation should be complete. Now check if device nodes are present:
Check if /dev/nvidia* files exist. If they don’t, do :
$ sudo modprobe nvidia -
Set Environment path variables:
$ export PATH=/usr/local/cuda-7.0/bin:$PATH
$ export LD_LIBRARY_PATH=/usr/local/cuda-7.0/lib64:$LD_LIBRARY_PATH
*Change depending on your cuda version.
-
Verify the driver version:
$ cat /proc/driver/nvidia/version -
Check CUDA driver version:
$ nvcc -V
[Optional] At this point you can switch the lightdm back on again by doing:
$ sudo service lightdm start.
You should be able to login to your session through the GUI without any problems or login-loops.
-
Create CUDA Samples. Go to your NVIDIA_CUDA-7.5_Samples folder and type $make.
-
Go to NVIDIA_CUDA-7.5_Samples/bin/x86_64/linux/release/ for the demos, and do the two standard checks:
./deviceQuery
to see your graphics card specs and
./bandwidthTest
to check if its operating correctly.
Both tests should ultimately output a ‘PASS’ in your terminal.
- Reboot. Everything should be ok.