Advanced search

Message boards : Frequently Asked Questions (FAQ) : HOW TO - Install NVIDIA drivers on Linux 64 bit (generic)

Author Message
Profile [B^S] Time Bandit
Volunteer moderator
Project tester
Volunteer tester
Avatar
Send message
Joined: 16 Jul 07
Posts: 464
Credit: 13,414,611
RAC: 0
Level
Pro
Scientific publications
watwatwatwatwat
Message 1385 - Posted: 29 Jul 2008 | 10:00:33 UTC
Last modified: 25 Aug 2008 | 18:11:55 UTC

A little guide how to install NVIDIA drivers on 64bit Linux PCs

Before we start, you should know that normally you would have to recompile the NVIDIA kernel modules after every kernel update. Therefore some people have developed tools which will automatically install the NVIDIA drivers for you, and will also update the kernel modules after a kernel update to make your live easier...

Additionally you could also download and install the the NVIDIA graphics drivers directly from the NVIDIA website which should work an almost all Linux OS.


How to manually install the NVIDIA graphics drivers (the recommended way for GPUGRID)

You will need to have the kernel sources and the development environment installed!


    * Download the drivers from the NVIDIA website into a directory (for instance /tmp)
    * Press ctrl-alt-F1, a text login screen will appear
    * login as root
    * type "init 3" to stop the X server
    * type "sh NVIDIA....pkg.run" to install the driver from the directory where you had downloaded it
    * answer yes to all questions from the installer
    * type "init 5"
    * press "ctrl-alt-F7" to get back to X Windows




The easier way (not recommended for GPUGRID because the drivers are mostly older than the newest)

Fedora

For Fedora Linux we can use the livna repositories to easily install the NVIDIA graphics drivers. This way the driver's kernel modules will also be auto-updated after a kernel update.

To add the livna repositories just go to http://rpm.livna.org/rlowiki/ and click on the link that fits your Fedora version in the repository RPMS section to add the livna repos to your software sources.

Open a Terminal and become root by typing

su - root

Enter your root password and press the enter key.
Now you are root and are able to install the NVIDIA drivers with

yum install kmod-nvidia


That's it - after a reboot the NVIDIA drivers should be automatically loaded at boot time.


Ubuntu

For Ubuntu Linux there's a software called Envy which will automatically install the NVIDIA drivers and auto-updates the NVIDIA kernel modules after a kernel update.

To be able to install Envy make sure you have enabled 3rd party repositories in your software sources.

For Ubuntu 8.04 open the Synaptic package manager and search for Envy. The package manager should find Envyng, Envy-gtk and Envy-qt.
Simply click on Envy-gtk to install it, which will also install Envyng. After the installation you should find a new entry in the Applications menue for Envy. Just start it and you will see a GUI program which allows you to install NVIDIA and also ATI drivers.


I don't give any guarantee for these instructions! If you kill your system or it is in an unbootable state, don't make me responsive... ;)
If you have suggestions to make this HOW TO better, just leave a message here.
____________

pixelicious.at - my little photoblog

Profile Venturini Dario[VENETO]
Send message
Joined: 26 Jul 08
Posts: 44
Credit: 4,832,360
RAC: 0
Level
Ala
Scientific publications
watwatwatwatwatwatwat
Message 2102 - Posted: 5 Sep 2008 | 17:47:33 UTC
Last modified: 5 Sep 2008 | 17:47:56 UTC

Your method didn't work for me. I couldn't stop the X server with "init 3"

So, the solution was to use instead "sudo /etc/init.d/gdm stop" (or sudo /etc/init.d/kdm stop if you're using KDE) and to restart "sudo /etc/init.d/gdm start"

Dario
Boinc.Italy

STE\/E [BlackOps]
Send message
Joined: 18 Sep 08
Posts: 356
Credit: 250,952,560
RAC: 0
Level
Asn
Scientific publications
watwatwatwatwatwatwatwatwat
Message 3186 - Posted: 21 Oct 2008 | 0:48:08 UTC - in response to Message 1385.
Last modified: 21 Oct 2008 | 0:49:59 UTC

This is what worked for me to install the Video card drivers on Linux Ubuntu 8.04 after about 12 hours of trying spread out over 3 days ... Maybe it can help somebody else ...

LINUX Ubuntu 8.04 CUDA Video Card Driver Installation Procedure:

Download the drivers from the NVIDIA website into a directory (for instance /tmp)

* Press ctrl-alt-F1, a text login screen will appear

* login as root

* type "sudo /etc/init.d/gdm stop" to stop the X server

* type "sh NVIDIA....pkg.run" to install the driver from the directory where you had downloaded it

* answer yes to all questions from the installer

* type "sudo /etc/init.d/gdm start" to start the X Server again

The init 3 & init 5 Commands don't work as far as I can tell on Ubuntu 8.04

You don't need to install the Toolkit or SDK Files for the WU's to run !!!

STE\/E [BlackOps]
Send message
Joined: 18 Sep 08
Posts: 356
Credit: 250,952,560
RAC: 0
Level
Asn
Scientific publications
watwatwatwatwatwatwatwatwat
Message 3191 - Posted: 21 Oct 2008 | 9:03:49 UTC
Last modified: 21 Oct 2008 | 9:44:40 UTC

My post below is inaccurate in a sense since once I Re-Booted everything was messed up again & I couldn't run the CUDA Wu's again. Trying to figure it out now again ...

PS: The only solution I found so far is to re-install the Video Card Drivers again & then I can run CUDA again that way. But re-boot again and it's gone again until doing another re-install of the Video Drivers again.

Stefan, you can delete\hide these posts if you want to because they probably don't belong here really ...

Profile [B^S] Time Bandit
Volunteer moderator
Project tester
Volunteer tester
Avatar
Send message
Joined: 16 Jul 07
Posts: 464
Credit: 13,414,611
RAC: 0
Level
Pro
Scientific publications
watwatwatwatwat
Message 3193 - Posted: 21 Oct 2008 | 13:13:00 UTC - in response to Message 3191.
Last modified: 21 Oct 2008 | 13:14:20 UTC

I think it's not necessary to hide your posts, maybe they can help someone...
I think I have read about problems with the NVIDIA drivers and Ubuntu 8.04. And a fix for the problem, but it will be the best to have a look at the Ubunut Forums for that fix.

I had also problems with Xubuntu 7.10 and the NV drivers. I had to switch to runlevel 1 (init 1) to install them...

With Fedora 8 and 9 the guide in the first post should work.
If init 3 does not work, try sbin/init 3... (I think it was Fedora 10 beta where I had to use sbin/init ...)
____________

pixelicious.at - my little photoblog

STE\/E [BlackOps]
Send message
Joined: 18 Sep 08
Posts: 356
Credit: 250,952,560
RAC: 0
Level
Asn
Scientific publications
watwatwatwatwatwatwatwatwat
Message 3216 - Posted: 22 Oct 2008 | 10:17:49 UTC
Last modified: 22 Oct 2008 | 10:18:29 UTC

I messed with it a few hours again this morning, the "sbin/init 3" command does nothing & tells me I haven't exited the X Server when trying to install the Video Drivers.

You can get the Video Drivers installed using the "init 1" command but I won't put the procedure here because once you re-boot you lose the drivers & CUDA useage again until you re-install the V-Drivers again.

I'll check around the Ubuntu Forms & see what I can find, it's no big deal anyway as running the Wu's in Windows is faster for me anyway than Linux. I'd just like to figure it out & have the Option to run in Linux since all my Box's are Dual Boot Linux & Windows Box's ...

bzm
Send message
Joined: 18 Jun 07
Posts: 3
Credit: 102,264,143
RAC: 0
Level
Cys
Scientific publications
watwatwatwatwatwatwatwatwatwatwatwatwat
Message 3334 - Posted: 26 Oct 2008 | 0:17:52 UTC

Installing on a headless box (no X-windows)

Since required devices are normally created during X startup. I had to add the following to /etc/rc.local:

mknod -m 0666 /dev/nvidiactl c 195 255
mknod -m 0666 /dev/nvidia0 c 195 0

If you have a second card, add:

mknod -m 0666 /dev/nvidia1 c 195 1

Jens-Ola*
Send message
Joined: 28 Sep 08
Posts: 5
Credit: 8,934,364
RAC: 0
Level
Ser
Scientific publications
watwatwatwatwatwatwatwatwatwatwat
Message 3452 - Posted: 28 Oct 2008 | 20:33:11 UTC

This was my inelegant workaround to access init 3 in Mandriva 2009 64. Nothing of what was said in prevoius posts worked for me.

Edit the file /etc/inittab, line ”id:5:initdefault:” to ”id:3:initdefault:”.
Reboot and install the driver, and edit back file /etc/inittab to ”id:5:initdefault:”.

Hope this is helpful.

Profile 7ri9991 [MM]
Send message
Joined: 6 Mar 09
Posts: 10
Credit: 25,079,588
RAC: 0
Level
Val
Scientific publications
watwat
Message 12403 - Posted: 6 Sep 2009 | 13:15:43 UTC - in response to Message 3334.

Installing on a headless box (no X-windows)

Since required devices are normally created during X startup. I had to add the following to /etc/rc.local:

mknod -m 0666 /dev/nvidiactl c 195 255
mknod -m 0666 /dev/nvidia0 c 195 0

If you have a second card, add:

mknod -m 0666 /dev/nvidia1 c 195 1


Something I saw elsewhere and should probably fix the need to do this is to add user boinc (or BOINC) to the video group. When I look at /dev/nvidia* in Ubuntu 8.10, I see this:
crw-rw---- 1 root video 195, 0 2009-09-05 23:24 nvidia0
crw-rw---- 1 root video 195, 255 2009-09-05 23:24 nvidiactl

The shows that root is the owner and that video is the group that have read and write permissions. If you add boinc to the video group, it will have the group rw permissions. This is the correct way to allow a user access to hardware. If you do 666 to the device, you give access to anyone.

I can't get my computer to use CUDA either despite it recognizing the card. It just won't request GPU tasks at all on any project. I tried 185 and 190 nvidia drivers. The SDK programs work, so I have no idea why boinc isn't using the card.

Ingvar
Send message
Joined: 7 Sep 09
Posts: 5
Credit: 2,308,660
RAC: 0
Level
Ala
Scientific publications
watwatwatwatwat
Message 13541 - Posted: 14 Nov 2009 | 0:01:35 UTC

On the most recent version of Ubuntu there's no need to install the NVIDIA driver. Apparently it's already installed. All you have to do is use BOINC to attach to GPUGRID, and it works.

I just upgraded from Ubuntu 9.04 Intrepid Ibex to 9.10 Karmic Koala. On Intrepid, GPUGRID complained about the driver. I couldn't get the above instructions to work (but I only put limited effort into it). Now, after the upgrade to Karmic, GPUGRID just works, there were no problems.

Ingvar
Send message
Joined: 7 Sep 09
Posts: 5
Credit: 2,308,660
RAC: 0
Level
Ala
Scientific publications
watwatwatwatwat
Message 13556 - Posted: 15 Nov 2009 | 2:43:38 UTC - in response to Message 13541.

On the most recent version of Ubuntu there's no need to install the NVIDIA driver.


Sadly, I was too optimistic. Each time the system is booted, BOINC randomly finds or doesn't find the GPU. Usually it doesn't find it, occasionally it does.

Is there some easy way to get BOINC to make a new attempt to find the GPU? I'm guessing that maybe it can find the GPU more reliably once the bootup process is finished and everything is stable.

Unfortunately, running the CPU benchmarks doesn't make it look for the GPU again. I'd try stopping and restarting the boinc client if I knew how to stop it safely and how to start it as the "boinc" user.

The BOINC version is 6.4.5.

Ingvar
Send message
Joined: 7 Sep 09
Posts: 5
Credit: 2,308,660
RAC: 0
Level
Ala
Scientific publications
watwatwatwatwat
Message 13571 - Posted: 16 Nov 2009 | 0:51:22 UTC - in response to Message 13556.

Sadly, I was too optimistic.

I found a solution. See this post by Skip Da Shu and also my reply.

Profile liveonc
Avatar
Send message
Joined: 1 Jan 10
Posts: 292
Credit: 41,567,650
RAC: 0
Level
Val
Scientific publications
watwatwatwatwatwat
Message 15124 - Posted: 10 Feb 2010 | 18:11:13 UTC
Last modified: 10 Feb 2010 | 18:14:08 UTC

I hope you don't mind that I place a link to my N00B guide to Nvidia Driver & BOINC installation on Ubuntu/Mint here. http://www.gpugrid.net/forum_thread.php?id=1553
____________

Roy Strachan
Send message
Joined: 23 Dec 09
Posts: 2
Credit: 18,539,236
RAC: 0
Level
Pro
Scientific publications
watwatwatwatwatwatwat
Message 16486 - Posted: 22 Apr 2010 | 2:19:05 UTC - in response to Message 13556.
Last modified: 22 Apr 2010 | 2:24:40 UTC

On the most recent version of Ubuntu there's no need to install the NVIDIA driver.


Sadly, I was too optimistic. Each time the system is booted, BOINC randomly finds or doesn't find the GPU. Usually it doesn't find it, occasionally it does.

Is there some easy way to get BOINC to make a new attempt to find the GPU? I'm guessing that maybe it can find the GPU more reliably once the bootup process is finished and everything is stable.

Unfortunately, running the CPU benchmarks doesn't make it look for the GPU again. I'd try stopping and restarting the boinc client if I knew how to stop it safely and how to start it as the "boinc" user.

The BOINC version is 6.4.5.


Something in the startup happens too quickly so when you get control open a terminal and type sudo /etc/init.d/boinc-client restart and all should be well.

Skip Da Shu
Send message
Joined: 13 Jul 09
Posts: 38
Credit: 41,955,165
RAC: 0
Level
Val
Scientific publications
watwatwatwatwatwatwat
Message 17922 - Posted: 11 Jul 2010 | 5:24:31 UTC - in response to Message 16486.

I stuck a "sleep 5" in the startup script.

open terminal
type sudo gedit /etc/init.d/boinc-client
scroll down till you see "start()"
insert the sleep 5 line as in below example:


start()
{
sleep 5
log_begin_msg "Starting $DESC: $NAME"
if is_running; then
log_progress_msg "already running"
else
start-stop-daemon --start --quiet --background --pidfile $PIDFILE \
--make-pidfile --user $BOINC_USER --chuid $BOINC_USER \
--chdir $BOINC_DIR --exec $BOINC_CLIENT -- $BOINC_OPTS
fi

____________
- da shu @ HeliOS,
"A child's exposure to technology should never be predicated on an ability to afford it."

Profile Damaraland
Send message
Joined: 7 Nov 09
Posts: 152
Credit: 16,181,924
RAC: 0
Level
Pro
Scientific publications
watwatwatwatwat
Message 23538 - Posted: 19 Feb 2012 | 11:25:41 UTC - in response to Message 17922.

I had to put an sleep to make it detect my GPU on Ubuntu 10.11 too.

I found this interesting link to explain it
http://boinc.berkeley.edu/dev/forum_thread.php?id=6307

Another thing I find usefull is that in Ubuntu the default interfaz is lightdm so to stop it to install last driver version you have to use "sudo service lightdm stop" and of course to restart it "sudo service lightdm start"

Profile skgiven
Volunteer moderator
Project tester
Volunteer tester
Avatar
Send message
Joined: 23 Apr 09
Posts: 3519
Credit: 938,912,957
RAC: 1,145,106
Level
Glu
Scientific publications
watwatwatwatwatwatwatwatwatwatwatwatwatwat
Message 23632 - Posted: 24 Feb 2012 | 17:51:49 UTC - in response to Message 23538.
Last modified: 22 Dec 2012 | 15:29:35 UTC

Finally I made it work with Ubuntu 11.10-desktop-amd64 with the latest drivers.

After googling a lot what made it work was this (uninstalling the older versions, before installing the last one)

Anyway, this would be my "Quick Guide" to help somebody if he faces the same problemas I had:
1. Download the drivers from the NVIDIA website
2. Press ctrl-alt-F1 to text login screen
3. Uninstall the older drivers: sudo apt-get --purge remove nvidia-*
4. Uninstall the older drivers: sudo apt-get --purge remove xserver-xorg-video-nouveau
5. stop the graphical service: sudo service lightdm stop
6. install the downloaded drivers:
cd xxxxxxxx (the directory you have the drivers)
sudo sh NVIDIA....pkg.run

7. answer yes to all questions from the installer, but be really carefull to read any advice

8. start the graphical service: sudo service lightdm start
9. press "ctrl-alt-F7" to get back to X Windows

The most tricky part: I restarted, before finishing all the above, and the X Windows didn't work at all. Black Screen with no action. Just before throwing the computer trough the window, I unplugged the GTX cards, rebooted, finished all the above and plugged again when finished.

If BOINC don't recognize GPU card put a delay in the start up

64 Bit Considerations
If you are running 64 bit Linux, you might have a problem with projects that issue 32 bit applications rather than 64 bit applications. To allow 32 bit applications to run on 64 bit Linux you must install 32 bit versions of certain shared libraries. The names of the packages containing the 32 bit libraries is different for each distro.

I did this because I run other projects in the same computer

10. sudo apt-get install ia32-libs libstdc++6 libstdc++5 freeglut3

Damaraland, copied from the Ubuntu 11.04 thread. Thanks,

For Ubuntu 12.10 I had to add a line to install linux headers as they are not in the iso:
4.1 sudo apt-get install linux-headers-generic
____________
FAQ's

HOW TO:
- Opt out of Beta Tests
- Ask for Help

Profile Damaraland
Send message
Joined: 7 Nov 09
Posts: 152
Credit: 16,181,924
RAC: 0
Level
Pro
Scientific publications
watwatwatwatwat
Message 23649 - Posted: 25 Feb 2012 | 16:10:37 UTC - in response to Message 23632.

I made another tutorial using GRUB recovery mode, I think is easier and safer.

If you already have Linux installed do this points of the tutorial:

Blacklist video drivers
Recovery mode as root
Installation of NVIDIA drivers

mynis
Send message
Joined: 31 May 12
Posts: 8
Credit: 3,489,690
RAC: 0
Level
Ala
Scientific publications
wat
Message 26162 - Posted: 4 Jul 2012 | 18:37:54 UTC
Last modified: 4 Jul 2012 | 18:40:03 UTC

It might be worth noting here that the newest nvidia drivers for linux (302.17 as of this posting) seem to have issues running CUDA 4.2 projects. I am currently running the 295.59 driver from the debian testing repos and it is chugging along nicely with a GTX 670. For other distros it might be necessary to download an older driver directly from the nvidia site.

Post to thread

Message boards : Frequently Asked Questions (FAQ) : HOW TO - Install NVIDIA drivers on Linux 64 bit (generic)