PDA

View Full Version : [HOW TO] Install Nvidia Drivers on Kali 2.0 x86



Kalibruz
2015-10-04, 01:18
I have Kali 2.0 on my HP Mini 311-1000NR(x86) dual booted with Ubuntu 14.04LTS on my OEM HDD. My 311 has the awesome NVIDIA ION (LE) GPU/chipset in it. While installation of the drivers is fairly easy with Ubuntu, it's a bit more technical with Kali. Though, both of the systems are Debian based; there are some similarites thankfully. I am posting what I found in @ColForbin's (https://forums.kali.org/member.php?36-ColForbin) Thread: Install Nvidia 340.76 Driver in Kali Linux 2.0 (https://forums.kali.org/showthread.php?26526-Install-Nvidia-340-76-Driver-in-Kali-Linux-2-0). There are some slight modifications that I am making to this How-To to suit the x86 platforms and the current NVIDIA driver released that supports my machine's GPU. Let's Begin!!!

Anything wrapped in code must be typed (or copy & pasted) in the terminal.
Additionally, each new line in code is a separate command. Meaning, type or copy & paste each code line individually.
Hit the Enter button after each line.


Install the kernel headers, and dkms



apt-get update
apt-get dist-upgrade
apt-get install -y linux-headers-$(uname -r) dkms


Download Nvidia driver installation, and change its permissions to executable
Here, you can modify the command just as I did to suit your needs. Change the driver # according to what you need.
Make sure everything is keyed in exactly the way it's labeled. Terminal is case sensitive.


wget http://us.download.nvidia.com/XFree86/Linux-x86/XXX.XX/NVIDIA-Linux-x86-XXX.XX.run
chmod +x NVIDIA-Linux-x86-XXX.XX.run
For my needs it was:

wget http://us.download.nvidia.com/XFree86/Linux-x86/340.93/NVIDIA-Linux-x86-340.93.run
chmod +x NVIDIA-Linux-x86-340.93.run


Prevent nouveau from loading


sed 's/quiet/quiet nouveau.modeset=0/g' -i /etc/default/grub
update-grub
reboot

Once rebooted, switch to a virtual console (ctrl+alt+f1 for instance) and stop the gdm3/lightdm service


service gdm3 stop
or

service lightdm stop


Run the nvidia driver installation


./NVIDIA-Linux-x86-XXX.XX.run
For my machine it was

./NVIDIA-Linux-x86-340.93.run


During the installation, choose yes to register the kernel module with DKMS.
Say 'Yes' to everything when prompted
NVIDIA Installer will prompt you if you want it to automatically run the nvidia-xconfig command. Choose 'Yes'


reboot
If you have done these (http://docs.kali.org/general-use/install-nvidia-drivers-on-kali-linux) steps and get an error from the NVIDIA installer informing you that it cannot complete the installation, follow the steps listed below:

This has been excerpted from askubuntu.com (http://askubuntu.com/questions/206283/how-can-i-uninstall-a-nvidia-driver-completely)

First completely remove the driver.

Search what packages from nvidia you have installed.

dpkg -l | grep -i nvidia
If you see that there are NVIDIA drivers installed, use the following command to remove all of them

apt-get remove --purge nvidia-*
The asterisk in the end means (Purge everything that begins with the name nvidia-)

After you have completed the removal of the existing NVIDIA drivers, you may proceed with starting at the beginning of this How-To to install the NVIDIA driver that you need. Please reply if errors come up when using this guide so that I may correct it accordingly.