Advanced search

Message boards : Frequently Asked Questions (FAQ) : GPU FAQ: HOW TO install NVIDIA drivers on Linux 64 bit

AuthorMessage
Profile [B^S] Stefan Ledwina
Forum moderator
Project tester
Volunteer tester
Avatar
Send message
Joined: Jul 16 07
Posts: 464
Credit: 13,414,611
RAC: 0
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: Jul 26 08
    Posts: 44
    Credit: 4,112,015
    RAC: 6,291
    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

      Profile Paladin*
      Avatar
      Send message
      Joined: Sep 18 08
      Posts: 301
      Credit: 35,848,203
      RAC: 0
      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 !!!

        Profile Paladin*
        Avatar
        Send message
        Joined: Sep 18 08
        Posts: 301
        Credit: 35,848,203
        RAC: 0
        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] Stefan Ledwina
          Forum moderator
          Project tester
          Volunteer tester
          Avatar
          Send message
          Joined: Jul 16 07
          Posts: 464
          Credit: 13,414,611
          RAC: 0
          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

            Profile Paladin*
            Avatar
            Send message
            Joined: Sep 18 08
            Posts: 301
            Credit: 35,848,203
            RAC: 0
            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: Jun 18 07
              Posts: 3
              Credit: 7,337,781
              RAC: 0
              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: Sep 28 08
                Posts: 5
                Credit: 7,370,500
                RAC: 5
                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 trigggl [SETI.USA]
                  Avatar
                  Send message
                  Joined: Mar 6 09
                  Posts: 10
                  Credit: 105,839
                  RAC: 1,516
                  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: Sep 7 09
                    Posts: 5
                    Credit: 322,713
                    RAC: 0
                    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: Sep 7 09
                      Posts: 5
                      Credit: 322,713
                      RAC: 0
                      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: Sep 7 09
                        Posts: 5
                        Credit: 322,713
                        RAC: 0
                        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: Jan 1 10
                          Posts: 241
                          Credit: 18,152,229
                          RAC: 94,908
                          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: Dec 23 09
                            Posts: 1
                            Credit: 1,083,492
                            RAC: 292
                            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: Jul 13 09
                              Posts: 31
                              Credit: 38,667,124
                              RAC: 122,223
                              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 @ the BOINC farm, SkipsJunk, Guru Mountain, Crunchers

                                Post to thread

                                Message boards : Frequently Asked Questions (FAQ) : GPU FAQ: HOW TO install NVIDIA drivers on Linux 64 bit