Apr 14, 2012

[Tutorial] Installing Nvidia Drivers In BackTrack.

Well, I was asked to make this tutorial by my good reader here "StealthyByR00t". Though I am late [(my apologies for that, as I got back my Nvidia card 2 days ago only)] in making this tutorial, I am not sure if you have already found another way and solved it, but still here it goes.

My card is Nvidia Geforce 8400 GS.
My Operating System: BackTrack 5 R2, 32bit Gnome.

[ For ubuntu you can just enable the driver easily from Hardware Drivers. It maybe possbile for BackTrack too, but I havent tried it as Hardware Drivers is not present by default in Backtrack .]

So, You need to download the driver for linux from here.

On the "Manual Driver Search", select your required specifications and versions. Here is my required info:


Start Search, Agree and Download etc etc.

Now the real stuff begins. The downloaded file is an executable script of format ".run". Try running it via gui... Nothing will happen.

Try from terminal it will say X-server must not be active.

Logout and try from tty1,2,3,4 etc, it will most probably give another error about noveau drivers. It will try to blacklist the drivers and will say to restart the machine. Restart and try again from tty, it will fail.

(Incase you don't know what tty is, it is the black terminal screen you get when you press ctrl+alt+f1 or f2 or f3... f6.)

Now, do this for the real installation part:

You need to blaclist some stuffs first. If you are familiar with nano or vim just add these following lines on the end of blacklist.conf file via terminal, else you can use gedit to do it. This file is located in /etc/modeprobe.d/.

blacklist noveau
blacklist vga16fb
blacklist rivafb
blacklist nvidiafb
blacklist rivatv



Save and exit. Run the following command to update your initramfs:

update-initramfs -u

It will do the necessary job, after it is finished restart once. Login to your root account as usual but do not type "startx".

Ubuntu 12.04 users: Type service lightdm stop in tty1

Now, cd to the Folder where the downloaded file is located, and just run it. In my case it was:

./NVIDIA-Linux-x86-295.40.run 

IN your case it will depend on the file name. Just accept the terms and conditions and accept everything it say, after the installation is completed, reboot once.

If everything went all right, then you should have the required drivers installed. Go to system-->Preferences-->Monitors, in my case it asked me a question:

It appears that your graphics driver does not support the necessary extensions to use this tool.  Do you want to use your graphics driver vendor's tool instead?

If I selected "yes" then it would show me Nvidia's control panel, else default one.





I hope this helps someone.

StealthyByR00t, my apologies again, bro!

NOTE: This Should Work In All Ubuntu Derivatives, also in other linux distributions too (Though I can't guarantee for all other distros.)


20 comments:

  1. Awesome, thanks dude

    ReplyDelete
  2. Hi DeathKnight,

    Many thanks for remembering me and my request. I manage to instal nvidia drivers on my system but now another problem show up.
    If I try to switch users and logout from X Widows session I am getting black screen after that.
    I already try to change dozens nvidia drivers always with fresh installation without any luck. With nouveau drivers everything is fine, but with nvidia ......
    Browsing various forums and web didn't result in any solution. Seems to me that this problem still persist in most of the users with nvidia drivers installed.
    Caps Lock, Num Lk and rest of the keys are working. I am able to guess and enter reboot without seeing the screen to restart system.
    All drivers are downloaded from official nvidia download site. System is fresh and without any updates, modifications or something similar. Nvidia drivers and CUDA tollkit are working fine. Another try was to use custom BT 5 R2 (http://www.crack-wifi.com/forum/topi...idia-cuda.html) with prepared configuration for CUDA, but result was the same.
    Please let me know if you need more info.

    If you have time please have a look what can be wrong.

    All the Best.
    stealthbyroot

    ReplyDelete
  3. Hi DeathKnight,

    Many thanks for you effort to make this tutorial. Nice job.

    But now I have different problem.

    If I want to switch users and logout from X Widows session I am getting black screen after that.
    I already try to change dozens nvidia drivers always with fresh installation without any luck. With nouveau drivers everything is fine, but with nvidia ……
    Browsing various forums and web didn’t result in any solution. Seems to me that this problem still persist in most of the users with nvidia drivers installed.
    Caps Lock, Num Lk and rest of the keys are working. I am able to guess and enter reboot without seeing the screen to restart system.
    All drivers are downloaded from official nvidia download site. System is fresh and without any updates, modifications or something similar. Nvidia drivers and CUDA tollkit are working fine. Another try was to use custom BT 5 R2 (http://www.crack-wifi.com/forum/topi…idia-cuda.html) with prepared configuration for CUDA, but result was the same.

    Please check what can be wrong or how to fix this issue when you have time.

    One more time, Thanks
    StealthByROOT

    ReplyDelete
  4. Dude thank you so f'n much. I have tried every single option or effort on the web with no luck. This nailed it first try. Thank you for taking the time to put that together. Seriously Thank You.

    ReplyDelete
  5. Thank you, this really saved my install. Keep up the awesome work!

    ReplyDelete
  6. FINALLY a guy how know what is talking about.

    THANKS man, im your new follower.


    SirPollo

    ReplyDelete
    Replies
    1. hehe. just playing with stuffs and sharing it. :)
      Thanks.

      Delete
  7. u rock man! tyvm :*

    ReplyDelete
  8. c.christianx@hotmail.itDecember 10, 2012 at 7:09 PM

    This tutorial gives you all the informations which are necessary to install or replace nvidia drivers.
    I notice there is not any kind of "holes" or bad steps and the goal is 100% reached, all is explained in his entirety. I think this is a good work.

    I previously followed some guides but i had problems like:
    -youtube had something like a blue pellicle over videos (but not thumbnails)
    -logout using graphic way caused black screen
    Now I'm fine!

    Your hints, DeathKing, made me smiling :D
    Bye!

    ReplyDelete
    Replies
    1. Thank you for your feedbacks.
      Happy that this article has helped many people. :)

      Delete
  9. A small (hopefully useful) update.

    On the 5th and the 8th of March 2013 NVIDIA released new Linux x86 and x86-64 drivers (310.40 certified).

    Got a Quadro FX3600 for Notebook board working on a 64bit Backtrack 5r3 and xorg config was a mess…. tried all the suggestions/workaround found on the net with no luck….

    Finally, in these new drivers, NVIDIA added a new xorg config utility that resolve the notorious problems.
    It’s an automatic tool and you’ll be prompted to launch it after the driver install.

    So, simply download the right driver for your system (x86 or x86-64) from NVIDIA website saving it on root folder.

    Then log out from X.

    At the prompt (you must be logged as root) type

    sh NVIDIA-Linux-x86-xxx.xx.run
    or
    sh NVIDIA-Linux-x86_64-xxx.xx.run for 64bit Linux
    (or even “sh NV” and press TAB to make it faster)

    and the install routine will smoothly do the rest

    Enjoy!

    Stefania Castelli

    ReplyDelete
    Replies
    1. Hi I am trying to install Nvidia drivers with no luck. When I type sh NVIDIA-Linux-x86_64-310.40.run it gives me that it can't run.
      But let me describe the steps
      1. sudo service lightdm stop
      2. Ctl+Alt+F1
      login
      cd /home
      cd/mike
      sh NVIDIA-Linux-x86_64-xxx.xx.run

      Can you tell what the problem could be?

      Delete
    2. Hi, it seems the file isnt executable.
      try this:

      cd /home/mike
      chmod 755 NVIDIA-Linux..........
      ./NVIDIA-Linux...................

      And are you sure that the file is at /home/mike? Make sure of it too. :)

      Delete
    3. Well I can't figure out what is the problem. mike is my personal file which is in home folder.
      I also tried
      chmod 755 NVIDIA-Linux-x86_64-310.40.run
      but it says can't open that file and there is not such as file

      I don't know much about linux and maybe I do something wrong.
      Can please anyone write a tutorial step by step from the beginning ( including the whole stuff about nouveau ) for new users of Linux like me?
      That would help a lot of people I suppose.

      Delete
    4. thanks for the info.
      Since it says there is no such file, you are not in the right folder. :)
      find the right folder, maybe the "Downloads" folder? and cd to it.

      since you have alreadyd downloaded the file, just get to the right directory by.
      Please find out how to cd to the directory. :)
      and after that: chmod 755 nvidia....
      ./nvidia.....

      Delete
    5. I am totally sure that the file is in the right folder because after I
      cd /home
      cd mike
      and type chmod 755 NV (I press tab and finds it)
      sudo ./NV...

      Gives me ERRROR : Temporary directory /tmp is not executable - use the --tmpdir option to specify a different one.

      Did I made something wrong?

      Delete
  10. This comment has been removed by a blog administrator.

    ReplyDelete
  11. Hi.. awesome brthr... you did a fantastic job.... really i can learn linux as soon as i expect by ppl like you.... love yu all a lot brthr... thank you so much....

    ReplyDelete