How to install NVIDIA.run?
Solution 1
As the error states, you are still running an X server. This error occurs when you try to install the Nvidia .run
files while logged in.
Make sure you are logged out.
- Hit Ctrl+Alt+F1 and login using your credentials.
- kill your current X server session by typing
sudo service lightdm stop
orsudo lightdm stop
- Enter runlevel 3 by typing
sudo init 3
- Install your
*.run
file.- you change to the directory where you have downloaded the file by typing for instance
cd Downloads
. If it is in another directory, go there. Check if you see the file when you typels NVIDIA*
- Make the file executable with
chmod +x ./your-nvidia-file.run
- Execute the file with
sudo ./your-nvidia-file.run
- you change to the directory where you have downloaded the file by typing for instance
- You might be required to reboot when the installation finishes. If not, run
sudo service lightdm start
orsudo start lightdm
to start your X server again. - It's worth mentioning, that when installed this way, you'd have to redo the steps after each kernel update.
Solution 2
I installed latest nvidia drivers by this method:
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current
It is working fine with unity 3d. Thanks to all.
Solution 3
Add the --no-x-check
flag when you run this in the terminal:
sudo ./NVIDIAxxxx.run --no-x-check
Solution 4
I had the same problem installing the driver for an old GeForce 9800 GT in Ubuntu 14.04-2. It was the NVIDIA-Linux-x86_64-340.76.run
I switched to the the tty1 using Ctrl+Alt+F1 and also stopped the service lightdm and when running the executable got the same error .
What I did to solve the problem was navigate to the /tmp folder and erase the .X0-lock file.
You will only see it listed if you use ls -la as it is a hidden folder by default(that is why it has a dot in front of the name)
cd /tmp
rm -rf .X0-lock
After erasing that folder and executing the NVIDIA-Linux-x86_64-340.76.run it installed just fine.
Solution 5
Ubuntu 16.04 with Quadro 4000 confirmed that this method work:
sudo apt-get update
sudo apt-get install nvidia-375
Note that I don't use nvidia-current as I downloaded the run file from NVIDIA and its version is 375.66
Related videos on Youtube
Kiranraj
Updated on September 18, 2022Comments
-
Kiranraj over 1 year
I have a Nvidia Ge force Ge6150 SE graphics card. I am running ubuntu 12.04. When I try to install the .run file it fails. It shows the message like this:
I tried to install it after uninstalling the old driver.still same message. Here is the log file:
nvidia-installer log file '/var/log/nvidia-installer.log' creation time: Mon Jun 11 05:46:17 2012 installer version: 295.53 PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games nvidia-installer command line: ./nvidia-installer Using: nvidia-installer ncurses user interface -> The file '/tmp/.X0-lock' exists and appears to contain the process ID '1062' of a >runnning X server. ERROR: You appear to be running an X server; please exit X before installing. For >further details, please see the section INSTALLING THE NVIDIA DRIVER in the README >available on the Linux driver download page at www.nvidia.com. ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' >for details. You may find suggestions on fixing installation problems in the README >available on the Linux driver download page at www.nvidia.com.
but no such file is shown in the process manager.
-
dobey almost 12 yearsDoes installing the nvidia-current package in ubuntu with apt-get not work with your card? Why are you trying to install that version of the driver, rather than the supported version packaged for ubuntu 12.04?
-
Kiranraj almost 12 yearsIt has problems with my card.It conflicts with unity.Glitches in video playback .Nvidia Current is still 295.40!It do not give me the resolution 1440*900
-
Dominic Cerisano over 6 yearsDon't use the
.run
file. Justsudo add-apt-repository ppa:graphics-drivers/ppa
. The latest drivers will appear in "Software & Updates --> Additional Drivers". -
Giang Nguyễn over 3 yearsFollowing this link surely helps you: unix.stackexchange.com/a/524151/365545
-
Admin almost 2 years@DominicCerisano , this add option to
software and update
but further did not work for me. e.g., I could see driverv510
using nvidia-smi, but this command addv515
. but next it says...couldn't communicate with driver
-
Admin almost 2 yearsYou really need to give the command lines you are using. Eg. the errors you gave indicate you need likely need to be root (sudo).
-
Admin almost 2 yearsMy bad, it is working perfectly now. the error message was because I did not restart the machine.
-
-
amc almost 11 yearsit's not clear if this gets around the problem of trying to install the driver while an X server is running.
-
amc almost 11 yearsplease provide a summary of the steps required in addition to posting a link
-
Felby over 9 yearsThis doesn't fix the X server issue when trying to install the .run file, but it does offer another way to install/update to the latest nvidia drivers packaged for the unbuntu distro.
-
Nathan Schwermann about 9 yearsThe driver this serves up is many versions outdated. Is there a way to get the actual current version through apt-get?
-
Aracthor over 8 yearsI strongly not recommend this method. It made my X server to refuse to start on system start, I had to remove it on console mode. It seems that those drivers are now very outdated and not updated anymore.
-
user1111929 over 8 yearsThis made my laptop unusable. I boot successfully into the login screen, but when I login to any account, I see a black screen for a second and I am back at the login screen... any idea what's going on or how to resolve it? :(
-
Jack Tong over 8 yearsThis happened to me on my GT220 card, updating to nvidia 340. Apparently, the card is not supported by the latest driver. You may try going down a version or two until you have a usable desktop. Good luck!
-
Kalamalka Kid almost 8 years"Enter runlevel 3 by typing sudo init 3 and install your *.run file" can you please clarify how to install the .run file?
-
Jack Tong almost 8 yearsOnce you've managed to enter runlevel 3, you can simply type <path to your *.run file> and execute. The installer will guide you through the process.
-
Dor over 7 yearsNotice that runlevel
3
is the same as runlevel 2-5 in all Debian distros (including Ubuntu), see: Debian and Ubuntu Linux Run Levels. This means that you need tosudo service lightdm stop
after that you enter to runlevel3
. In our case, it seems redundant to enter to runlevel3
, isn't it? -
Jack Tong over 7 yearsThey are not the same. More like similar because they are all multi-user modes. #2 has a graphical display manager, whereas #3 does not. Read the part about `#telinit 3' somewhere near the bottom.
-
Mona Jalal over 7 years
jalal@klein:~/Downloads$ sudo ./cuda_8.0.44_linux.run --no-x-check Unknown option: no-x-check
-
khaverim about 7 yearsThis doesn't resolve the issue on 16.04 for me. Driver installation still detects X server running and fails.
-
khaverim about 7 yearsI have 15.04 and the same graphics card.
x-updates
is apparently now justupdates
. Also I had to installnvidia-304
beforenvidia-current
as a prerequisite. And now, alas, accessingtty1
is perpetually stuck sayingScanning for Btrfs filesystems
, so I am sad. I can't issue commands intty1
, and so I can't access my computer anymore, until I find a way -
MasterHD about 7 yearsI strongly recommend this console method (don't use the website or .run files at all) as confirmed here: askubuntu.com/a/624967/662072
-
Shautieh about 7 yearsGreat advice to kill your machine...
-
Andrea Thacker almost 7 yearsIf you have a black screen you might have a terminal prompt out of view, type enter a handful of times to make sure you still don't have a terminal session open but you just can't see it.
-
Jabberwockey almost 7 yearsThis killed my Ubuntu installation after stopping the lightdm service. Now I have another problem to solve. Why is this the most upvoted answer?
-
web.learner almost 7 years@Jabberwockey A few things have changed since this answer was posted but this is still the correct process. More likely you installed the wrong Nvidia driver for your card or a corrupted file. Ask a new question with the specifics.
-
XavM over 6 years@Jabberwockey, how did you solved your installation issue? I follow these instructions and it crashed my installation too.
-
karel over 6 yearsThis is a duplicate of this answer: askubuntu.com/questions/149206/how-to-install-nvidia-run/…
-
crypdick over 6 yearsYou can restart from terminal with
shutdown -r 0
-
Sarz about 6 years
Kill [ID]
killing process ID is logging me out and have to login again. Is X server related to logged in UI? -
thirtydot about 6 yearsI couldn't get any of the
.run
files from Nvidia's site to work (they would install but driver was broken). Using thegraphics-drivers
PPA instantly worked for me, as detailed in this answer: askubuntu.com/questions/61396/….nvidia-390
. -
thang almost 6 yearsfor some reason service lightdm stop doesn't stop it. had to manually kill it.
-
user2979044 over 5 yearsIf your install for some reason has lightdm permanently disabled on reboot (causing login issues), edit the conf at bootup with 'e', find the line starting with 'linux', and append a '3' to the end of the line. This should start you up straight into terminal, where you can then restart the lightdm.
-
B Furtado about 5 yearsDid this work? Why the answer everyone complains in the comments is the most upvoted?
-
Mr. Unnormalized Posterior about 5 yearsWorks on
Ubuntu 18.10
. Thanks! Additionally, I used this link askubuntu.com/questions/842256/… and during installation say yes to all installation steps (nvidia-xconfig utility, 32-bit OpenGL libraries, DKMS support) -
Brana almost 5 yearsI do not undestand, how do I do anything when I am not logged in
-
Yossarian42 almost 5 yearsAlthough this method works with unity, it will crash when installing driver with a gnome desktop
-
rahul almost 5 yearsThis even worked for linuxlite 4.4
-
Hossein over 4 years@user1111929 I also the same problem. Did you find any way to resolve it? Or just reinstall Ubuntu?
-
user1111929 over 4 years@Hossein This was 3.5 years ago, I do not remember sorry. But given the 18 upvotes on my comment, I suspect we're not the only ones.
-
marcelocra over 4 yearsFrom the docs:
--no-x-check Do not abort the installation if nvidia-installer detects that an X server is running. Only under very rare circumstances should this option be used.
-
IgNite about 4 years@marcelocra , Where did you find such document? Could you attach the link?
-
marcelocra about 4 yearsThe ./NVIDIAxxxx.run command is a bash script. I believe the documentation was inside of it. If that's really the case, try
vim ./NVIDIAxxxx.run
(sorry, I don't remember anymore, but since I didn't link it, that is probably correct). -
Giang Nguyễn over 3 yearsIt killed my pc awwwwwwwwwwwwwwwwwww
-
Giang Nguyễn over 3 yearsAlright! This is how I solved the problem: sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt update sudo apt install nvidia-367 sudo reboot
-
Giang Nguyễn over 3 yearsAlso, follow this link to install cuda driver: unix.stackexchange.com/a/524151/365545
-
Admin almost 2 yearsWorked for me Debian 10 Buster, Nvidia Driver 460.91.03.
-
Admin almost 2 yearsthis solution does not work and destroyed my graphics and ubuntu. now nothing is working.
-
Admin almost 2 years+1 for the
sudo
- other answers did not mention this, but the error in the OP indicates root is required.