Installing the NVIDIA display driver.

When i give command : ./cuda cuda_5.5_linux_32.run
I get

Installing the NVIDIA display driver…
It appears that an X server is running. Please exit X before installation. If you’re sure that X is not running, but are getting this error, please delete any X lock files in /tmp.

===========
= Summary =

Driver: Installation Failed
Toolkit: Installation skipped
Samples: Installation skipped


To get the list of processes, I used [ ps aux | grep X]

oprime@ubuntu:~$ ps aux | grep X
root 994 4.7 1.4 56360 29072 tty7 Ss+ 22:36 0:24 /usr/bin/X :0 -nr -verbose -auth /var/run/gdm/auth-for-gdm-Q7C3NZ/database -nolisten tcp vt7
oprime 1805 0.0 0.0 3360 868 pts/0 S+ 22:45 0:00 grep --color=auto X


I don’t know how to exit “X”

Can anyone help,please?

Someone had written in a forum

[ it says you are running an X server, meaning a graphical desktop. Try this:

CTRL+Alt+F2 to open a terminal session. Try running the NVIDIA.run from here then. ]

i tried it but even when i got off the desktop by CTRL+Alt+F2, i got exactly the same error that is
[ It appears that an X server is running. Please exit X before installation. If you’re sure that X is not running, but are getting this error, please delete any X lock files in /tmp. ]

There are many answers for how to stop the X server on the web. Try googling “ubuntu stop X”

yeah, there are many answers and i even tried them but those dint work.

assuming X is not running, according to If you’re sure that X is not running, but are getting this error, please delete any X lock files in /tmp.

I used " sudo rm /tmp/.X*-lock "
and then after i dint get the same error but different one which was


Installing the NVIDIA display driver…
The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages are installed and set up correctly.
If you know that the kernel source packages are installed and set up correctly, you may pass the location of the kernel source with the ‘–kernel-source-path’ flag.

===========
= Summary =

Driver: Installation Failed
Toolkit: Installation skipped
Samples: Installation skipped


So, to locate the kernel source,

first,i found the kernel version

oprime@ubuntu:~$ uname -r
2.6.32-73-generic

and then
I tried

oprime@ubuntu:~$ ./cuda_5.5.22_linux_32.run --kernel-source-path /usr/src/linux-headers-2.6.32-73-generic

But error dint change
and i got

Installing the NVIDIA display driver…
The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages are installed and set up correctly.
If you know that the kernel source packages are installed and set up correctly, you may pass the location of the kernel source with the ‘–kernel-source-path’ flag.

===========
= Summary =

Driver: Installation Failed
Toolkit: Installation skipped
Samples: Installation skipped

SAME ERROR AGAIN !!

Trying to resolve it since last few hours but nothing worked.

I’m stuck. WHat to do?

According to this link [ https://helxsz.wordpress.com/2014/05/23/adding-gtx-550-and-install-cuda-5-5/ ]

and
many other links regarding closing/killing X Server,

When i try “sudo service stop gdm”

it worked but while installing *.run file, i got the same error again. same i have mentioned above.

When you said this:

CTRL+Alt+F2 to open a terminal session. Try running the NVIDIA.run from here then. ]

i tried it

That certainly made it sound like you had a window manager running (i.e. X).

sudo stop gdm or some variant should work. If it does not, the issue is a linux issue not a CUDA one.

Try finding a method to set your ubuntu system to run at runlevel 3. Then reboot into runlevel 3. That will certainly prevent X from running. After that, you should be able to install. When you are finished with the install, modify the runlevel back to 5 and reboot.

I was gonna ask this.

when I try “sudo stop gdm”, i get into a screen like its diagnostic one.
it looks like

  • Setting sensors limits [ OK ]

  • Starting Denyhosts denyhosts [ OK ]

  • Speech-dispatcher configured for user sessions [ OK ]
    * Starting the Winbind daemon winbind [ OK ]

  • Saved ALSA mixer settings detected; aumix will not touch mixer.
    * Starting DHCP server dhcpd3

  • check syslog for diagnostics. [fail]

  • Starting Common Unix Printing System: cupsd [ OK ]

  • PulseAudio confirmed for per-user sessions
    * Enabling additional executable binary formats binfmt-support [ OK ]

  • Checking battery state… [ OK ]


THATS IT!
and then i get stuck at this screen and i cant get out of it unless I shut down the system forcefully and restart it.

OR
If i hit “Ctrl+Alt+F1/F2”, i enter into a termincal session. Normally,from here, when i hit “Ctrl+Alt+F7”, it brings me back to desktop but here, it takes me back to the screen i just showed ( d diagnostic one]

SO, i go in the loop between " Terminal session" and “Diagnostic screen” after using Ctrl+Alt+F1 & Ctrl+Alt+F7 OR ( Alt+Right/Left arrow )

UNLESS
i start the gdm by “sudo start gdm”

and it sends me to the screen we get right after restarting the system. I login and i get to the desktop all tabs and files closed LIKE I HAVE RESTARTED THE SYSTEM OR i get into another session or another user’s desktop"

Tell me if you got anything after the details i gave

otherwise

i will do as u said

[ Try finding a method to set your ubuntu system to run at runlevel 3. Then reboot into runlevel 3. That will certainly prevent X from running. After that, you should be able to install. When you are finished with the install, modify the runlevel back to 5 and reboot. ]

One thing i want to share:

while trying to find a method to change RUNLEVEL, i found what runlevels are and i expected ( according to your saying also ) that im at runlevel 5

but when i checked by command “sudo runlevel”, it says im at runlevel 2.

I’m little surprised as i found

Runlevel 2 - Multiple users, no NFS (network filesystem); also used rarely.

Runlevel 5 - Multiple users, GUI (graphical user interface); the standard runlevel for most Linux-based desktop systems.

according to this, i should be in runlevel 5. isnt it?

AS FOR NOW, i was about to change my runlevel to 3 BUT then i dn know if i should go to 5 or come back to where im i.e. 2

I tried to install after going at runlevel 3 yet i couldnt install it and i got the same error i was talking about

Installing the NVIDIA display driver…
The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages are installed and set up correctly.
If you know that the kernel source packages are installed and set up correctly, you may pass the location of the kernel source with the ‘–kernel-source-path’ flag.

Yes, that error is different than the “X is running” error.

Changing runlevels has no effect on that.

Basically, your ubuntu OS is either missing the kernel source package, or else it is in some place that the driver doesn’t expect it to be.

If you have a clean load of ubuntu (i.e. no kernel updates applied) and the proper kernel sources loaded, you should not see this error.

On RHEL/CentOS/Fedora, I would be doing yum list kernel-devel to see what kernel source packages are installed and available. I don’t happen to know what the corresponding commands are for ubuntu, but googling “ubuntu install kernel headers” seems to give promising links. The README file that ships with the driver discusses this in some detail:

http://us.download.nvidia.com/XFree86/Linux-x86/319.12/README/installdriver.html

it dint help me. I will try to resolve that.

To build benchmarks,

oprime@ubuntu:~/gpgpu-sim/ispass2009-benchmarks$ make -f Makefile.ispass-2009

THIS COMMAND should have been enough but I dont see even “BIN” directory in the “~gpgpu-sim/ispass2009-benchmarks” Directory which was SUPPOSED TO CONTAIN ALL .exe FILES OF BENCHMARKS.

THIS IS WHAT I GET


oprime@ubuntu:~/gpgpu-sim/ispass2009-benchmarks/BFS$ bash README.GPGPU-Sim
README.GPGPU-Sim: line 1: …/bin/release/BFS: No such file or directory


AND, when i had used “make -f Makefile.ispass-2009”

oprime@ubuntu:~/gpgpu-sim/ispass2009-benchmarks$ make -f Makefile.ispass-2009
rm -f …/common; ln -s /C/common …/common;
cd CP; export PARBOIL_ROOT=pwd; cd common/src; make; cd -; ./parboil compile cp cuda_short; cp benchmarks/cp/build/cuda_short/cp /home/oprime/gpgpu-sim/ispass2009-benchmarks/bin//release/CP
make[1]: Entering directory /home/oprime/gpgpu-sim/ispass2009-benchmarks/CP/common/src' gcc -c -std=gnu99 -I/include -I/home/oprime/gpgpu-sim/ispass2009-benchmarks/CP/common/include -g /home/oprime/gpgpu-sim/ispass2009-benchmarks/CP/common/src/parboil.c -o /home/oprime/gpgpu-sim/ispass2009-benchmarks/CP/common/src/../lib/parboil.o ar rc /home/oprime/gpgpu-sim/ispass2009-benchmarks/CP/common/src/../lib/libparboil.a /home/oprime/gpgpu-sim/ispass2009-benchmarks/CP/common/src/../lib/parboil.o ranlib /home/oprime/gpgpu-sim/ispass2009-benchmarks/CP/common/src/../lib/libparboil.a make[1]: Leaving directory /home/oprime/gpgpu-sim/ispass2009-benchmarks/CP/common/src’
/home/oprime/gpgpu-sim/ispass2009-benchmarks/CP
Parboil parallel benchmark suite, version 0.1

make[1]: Entering directory /home/oprime/gpgpu-sim/ispass2009-benchmarks/CP/benchmarks/cp' mkdir -p build/cuda_short /usr/local/cuda/bin/nvcc -I/include -I/home/oprime/gpgpu-sim/ispass2009-benchmarks/CP/common/include -g -Xcompiler "-m32" -c src/cuda_short/main.cu -o build/cuda_short/main.o mkdir -p build/cuda_short /usr/local/cuda/bin/nvcc -I/include -I/home/oprime/gpgpu-sim/ispass2009-benchmarks/CP/common/include -g -Xcompiler "-m32" -c src/cuda_short/cuenergy_pre8_coalesce.cu -o build/cuda_short/cuenergy_pre8_coalesce.o /usr/local/cuda/bin/nvcc -L/home/oprime/gpgpu-sim/ispass2009-benchmarks/CP/common/lib -Xcompiler "-m32" -L/lib/ -L/home/oprime/gpgpu-sim/ispass2009-benchmarks/CP/common/src build/cuda_short/main.o build/cuda_short/cuenergy_pre8_coalesce.o -o build/cuda_short/cp -lcudart -lparboil -lm -lz -lGL make[1]: Leaving directory /home/oprime/gpgpu-sim/ispass2009-benchmarks/CP/benchmarks/cp’
cp: cannot create regular file `/home/oprime/gpgpu-sim/ispass2009-benchmarks/bin//release/CP’: No such file or directory
make: *** [default] Error 1
make: *** [default] Error 1


WHATS WRONG WITH IT? Help, PLEASE!!!

without bin directory or i should say BENCHMARKS, how would i work?

I resolved issues by myself.

in case, anyone encounters the same/such issue, leave your message @ arjuniitbhu@gmail.com

This worked for me

sudo rm /tmp/.X*-lock
sudo apt-get purge nvidia-*
sudo reboot
sudo service lightdm stop
press alt+F1
sudo rmmod nvidia
sudo sh cuda_8.0.61_375.26_linux.run
sudo service lightdm start

and reboot

Just one command works for me:

sudo rm /tmp/.X*-lock

thanks all.

Late at night (always dangerous) I sleepily followed bashar_rajoub’s steps above.

“sudo apt-get purge nvidia-*” will kill your display after you reboot.

To fix, I booted into recovery mode, dropped into root terminal, "su - " to then do “sudo sh cuda_8…run”

This worked for me after reboot.