PDA

View Full Version : How ton install nvidia drivers for real!!!!



scotthotz
2014-03-10, 00:29
After days of pulling my hair out re installing kali 3 times i want to share this solution: UPDATE PLS READ FURTHER DOWN FOR EASIER TO FOLLOW INSTRUCTIONS:

1 aptitude -r install linux-headers-$(uname -r)
2 aptitude install nvidia-kernel-dkm
3 aptitude install nvidia-xconfig
4 nvidia-xconfig

reboot
Finally aptitude install nvidia-cuda-toolkit nvidia-opencl-icd



Yes this really works easy simple fast

thepoor
2014-03-10, 13:04
"You, sir. Just made my go bald, I followed your instructions and now my system just winking at me after reboot."

Updated: 03/13/14. followed the updated instructions and got it to work.

Thank you, sir. I'll send you a browser's cookie.

scotthotz
2014-03-11, 17:18
You, sir. Just made my go bald, I followed your instructions and now my system just winking at me after reboot.

maybe i should have stated that i used this solution after a fresh install of kali no updates no up grades just install kali then install nvidia drivers immediately after!

scotthotz
2014-03-11, 17:25
If you are using Linux and have NVIDIA graphics card then most likely you are using open source NVIDIA driver nouveau.

It works quite well, but if you want to use 3D acceleration feature or want to use GPU based applications then you need to install NVIDIA proprietary driver. Here is how to do it.

First Install linux headers as those will be required to build nvidia modules. Issue following command at terminal

$ aptitude -r install linux-headers-$(uname -r)
Now install required nvidia components. Following command will install and build nvidia modules, and also disable nouveau module.

$ aptitude install nvidia-kernel-dkms
Now we should create new Xorg server configuration file or modify existing to tell it to load nvidia module. nvidia-xconfig package make this task quite easy, install and execute it.

$ aptitude install nvidia-xconfig
$ nvidia-xconfig
Now reboot and check if system is using nvidia graphics driver. On start of xsession nvidia splash screen should be displayed. You can also confirm it by issuing following commands

First check if system is using glx module.

$ glxinfo | grep -i "direct rendering"
It should output “direct rendering: Yes”

If you do not have glxinfo then first install mesa-utils package then again issue above command and check output

$ aptitude install mesa-utils
Check if nvidia module loaded.

$ lsmod | grep nvidia
If it produces output like ‘nvidia 11239499 45′ or something similar (numbers could be different at your system) then nvidia module is loaded.

Just to be sure nouveau module NOT loaded, issue following command

$ lsmod | grep nouveau
It should NOT produce any output. If it produces output then something is wrong.

If you are planning to use NVIDIA Graphics Driver just for better disply and 3D rendering then it is almost finished. But if you want to run applications that uses NVIDIA CUDA for processing (if your graphics card supports CUDA) then you will also need to install CUDA drivers as below

$ aptitude install nvidia-cuda-toolkit nvidia-opencl-icd
Now you should be able to use applications designed to utilize GPU.

Posted in Debian, Kali Linux, Linux / Tagged cuda, Debian, gpu, kali linux, nvidia, Wheezy / Leave a comment
Boot KALI Linux in console mode (command line) as it was in BackTrack
Posted on July 4, 2013
A good thing i like in BackTrack was it boot in console mode. It is quite helpful if we have to run few console commands instead of using full GUI.

But Kali linux directly boot into graphical mode. To make it boot into command line mode we need to remove auto start of xdm service (or kdm or gdm based on your desktop manager) from current runlevel.

To do it first we need to know current runlevel. Issue following command

$ who -r
Remember your current runlevel from output of previous command. Mine is 2.

We also need to know service name of display manager we are running, check it with following command (replace 2 with your run level)

$ chkconfig --list | grep '2:on'
It will list all services set to autostart for run level 2. Look here for entry similar to gdm or kdm or xdm etc. I am running gdm3.

Ok, now we have identified which service (gdm3 in my case) we have to turn off at which run level (mine is 2).

Now issue following command to stop gdm3 service for run level 2.

$ chkconfig --level 2 gdm3 off
Now on next boot it will boot into command line login. After login use startx command to start xsession.

Failsafe: If something went wrong or later you decided to boot again into graphical mode, revert it back with following

$ chkconfig --level 2 gdm3 on
Note: I do not remember if chkconfig is pre-installed with Kali or i installed it manually. In case it say ‘chconfig command not found’ then you can install it with following command

apt-get install chkconfig
That’s all. Happy pentesting with Kali linux :)

scotthotz
2014-03-11, 23:22
Fixing black screen with a cursor problem:

Simply press CTRL + ALT + F1 and login.

Type the following

nvidia-xconfig
reboot

You should now be able to log in using the gdm GU

thepoor
2014-03-12, 11:14
Fixing black screen with a cursor problem:

Simply press CTRL + ALT + F1 and login.

Type the following

nvidia-xconfig
reboot

You should now be able to log in using the gdm GU


Oops, you're half a minute too late.

blackMORE
2014-03-13, 02:56
If you are planning to use NVIDIA Graphics Driver just for better disply and 3D rendering then it is almost finished. But if you want to run applications that uses NVIDIA CUDA for processing (if your graphics card supports CUDA) then you will also need to install CUDA drivers as below
Thanks scotthotz for following up on this guide. You probably should edit your 1st post and all info there instead of in a separate post to make it easier to follow.

I'm not sure how you've tested it, but this guide is correct upto the point of installing NVIDIA Driver and CUDA Toolkit. Following you guide, if you try

pyrit list_cores you get just CPU's listed there. Which means only cudahashcat will be able to use GPU but not other programs that doesn't have native GPU processing built in.
You need to remove pyrit

apt-get remove pyrit
p.s don't worry about the kali-linux-full line.
Download pyrit and cpyrit from http://pyrit.googlecode.com and install them manually. Then again, it seems this new pyrit puts its binaries in wrong folder than you'd expect.
/usr/local/bin/pyrit instead if /usr/bin/pyrit.

Solution: Softlink them or add path to profile

Softlinking:

ln -s /usr/local/bin/pyrit /usr/bin/pyrit
or Add path:

if you want only to specific user edit ~/.bash_profile or ~/.bashrc and put there

export PATH=$PATH:/usr/local/bin

if you want for all users edit /etc/profile and scroll down until you see something like

PATH="/bin:/usr/bin:/sbin:/usr/sbin" export PATH
Append to the end /usr/local/bin. it will be

PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin"

Once these all done, then following is what you get


root@kali:~# pyrit list_cores
Pyrit 0.4.0 (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

The following cores seem available...
#1: 'CUDA-Device #1 'GeForce 210''
#2: 'CPU-Core (SSE2)'
#3: 'CPU-Core (SSE2)'
#4: 'CPU-Core (SSE2)'

and benchmark follows with my GeForce 210 card:


root@kali:~# pyrit benchmark
Pyrit 0.4.0 (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Running benchmark (2744.1 PMKs/s)... -

Computed 2744.11 PMKs/s total.
#1: 'CUDA-Device #1 'GeForce 210'': 853.1 PMKs/s (RTT 3.0)
#2: 'CPU-Core (SSE2)': 648.1 PMKs/s (RTT 2.8)
#3: 'CPU-Core (SSE2)': 647.6 PMKs/s (RTT 2.9)
#4: 'CPU-Core (SSE2)': 658.5 PMKs/s (RTT 3.0)
root@kali:~#


and the best part of this new nvidia driver, you don't need to mess with grub.cfg file as per official docu. I hope someone updates official docu it urges users to use

sed 's/quiet/quiet nouveau.modeset=0/g' -i /etc/default/grub
command that will keep adding unnecessary parameters(older NVIDIA driver's needed it, new one doesn't require that line) to grub.cfg for no reason(the more you run, the more it adds). Should really remove that line in official docu. Personally, I rather tell people to manually edit a file than providing an automated solution because that's where things goes really wrong. Happy to corrected in any of my instructions. :rolleyes:

The community covered this whole process few releases back, but I'll try to put together a guide at some point today ... or maybe just update my existing one. Enjoy

pmbeo
2014-03-14, 18:42
thanks its solved at my GeForce218