This guide explains how to install proprietary “NVIDIA Accelerated Linux Graphics Driver” or NVIDIA driver on Kali Linux system. If you are using Kali Linux and have NVIDIA graphics card then most likely you are using open source NVIDIA driver
nouveau
. You can see it by lsmod | grep nouveau
command. nouveau
driver works quite well, but if you want to use 3D acceleration feature or want to use GPU based applications (such as CUDA and GPU pass through) then you need to install proprietary NVIDIA driver. The proprietary “NVIDIA Accelerated Linux Graphics Driver” provides optimized hardware acceleration of OpenGL applications via a direct-rendering X server. It is a binary-only Xorg driver requiring a Linux kernel module for its use. The first step is to fully update your Kali Linux system and make sure you have the kernel headers installed.
This guide replaces the old guide
Where you had to download NVIDIA Driver (CUDA) manually and edit grub.cfg
file to make everything work. Because it will be a long guide, I had to divide it into two parts:
- Install proprietary NVIDIA driver on Kali Linux – NVIDIA Accelerated Linux Graphics Driver
- Install NVIDIA driver kernel Module CUDA and Pyrit on Kali Linux – CUDA, Pyrit and Cpyrit-cuda
You use the first guide to install NVIDIA Driver. If you want GPU acceleration, (cudahashcat, GPU pass through etc.) keep reading and follow the second guide to complete your installation. I’ve included as much details I can, including troubleshooting steps and checks but I would like to hear your part of the story, so leave a comment with your findings and issues.
Table of Contents
The new NVIDIA Driver
The new Linux binary NVIDIA drivers nvidia-kernel-dkms
builds the NVIDIA Xorg binary kernel module needed by NVIDIA driver, using DKMS. Provided that you have the kernel header packages installed, the kernel module will be built for your running kernel and automatically rebuilt for any new kernel headers that are installed. The binary NVIDIA drivers provide optimized hardware acceleration of OpenGL applications via a direct-rendering X Server for graphics cards using NVIDIA chip sets. AGP, PCIe, SLI, TV-out and flat panel displays are also supported. NVIDIA Added support for the following GPU including fixing some issues: (existing GPU’s are already supported).
- GeForce GT 710
- GeForce 825M
- Fixed a regression that prevented NVIDIA-installer from cleaning up directories created as part of the driver installation.
- Added a new X configuration option “InbandStereoSignaling” to enable/disable DisplayPort in-band stereo signaling.
- Fixed a bug that caused PBO downloads of cube map faces to retrieve incorrect data.
- Fixed a bug in NVIDIA-installer that resulted in spurious error messages when opting out of installing the NVIDIA kernel module or source files for the kernel module.
- Added experimental support for ARGB GLX visuals when Xinerama and Composite are enabled at the same time on X.Org xserver 1.15.
See the details about this driver in NVIDIA official website:
Debian Linux usually ports that Official Driver to fit it’s requirements. The NVIDIA driver graphics processing unit (GPU) series/codename of an installed video card can usually be identified using the lspci command. For example:
lspci -nn | grep VGA
My settings
My PC got the following configuration:
I’ve installed everything in a brand new Kali Linux 1.0.6 installation, fully updated and upgraded. Before you do anything, you of course add the Official Kali Linux repository. Once I’ve added the correct Kali Official repositories, I’ve issued the following commands to update, upgrade and dist-upgrade my Kali Linux.
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
If you’ve completed this part, move on to the next instruction.
Step 1: Install Linux headers
Install Linux headers as those will be required to build NVIDIA Driver modules.
aptitude -r install linux-headers-$(uname -r)
Where -r
means install all recommended packages as well.
Step 2: Install NVIDIA Kernel
Next I installed NVIDIA Kernel
apt-get install nvidia-kernel-$(uname -r)
93 comments
nVidia has updated their driver package. It contains everything you need.
In contrast to all the guides on installing the nVidia driver on Kali Linux, you must not install anything nVidia related before running the official nVidia installer.
Here is how I got the driver working.
Make sure your Kali Linux system is up to date:
apt-get clean && apt-get update && apt-get upgrade && apt-get dist-upgrade
Install the kernel headers:
apt-get install -y linux-headers-$(uname -r)
Download the nVidia driver for your graphics card and save it in a location convenient to you (e.g. your home directory).
Blacklist the nouveau driver:
make sure you have a file called “nvidia-installer-disable-nouveau.conf” inside of [/etc/modprobe.d/]. If it’s not there, create it and paste inside…
blacklist nouveau
options nouveau modeset=0
Enter the following commands in a terminal as root:
sed ‘s/quiet/quiet nouveau.modeset=0/g’ -i /etc/default/grub
update-grub
update-initramfs
reboot
If you face the login screen after reboot, do not log in but change to a terminal with ALT+F1.
Log in to the terminal as root.
Kill GDM:
service gdm3 stop
Remove all nVidia related stuff:
apt-get purge nvidia-*
Navigate to the directory you downloaded the nVidia driver to.
Make sure the driver installer (*.run) is executable:
chmod +x NVidia…run
Start the nVidia driver installer and follow the instructions on the screen. Let it configure your X server.
Reboot again. You should now be fine
Hope that helps. At least that’s how I got my system working. The nvidia-kernel-dkms package from the Kali repository, unfortunately, does not support my graphics card (GeForce 8400 GS) any more so I had to install the official nVidia driver (340.93) instead.
hi!
i have a problem. Currently, my laptop have 2 GPUs (integrated intel and nVidia) that is switchable. And i would like to ask whether i can use my nvidia driver and proprietary driver.
lspci
VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (rev a1)
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 58
Model name: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
Stepping: 9
CPU MHz: 1409.484
CPU max MHz: 3200.0000
CPU min MHz: 1200.0000
BogoMIPS: 5188.41
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 3072K
NUMA node0 CPU(s): 0-3
is it still possible to get it done?
My installation on kali 2.0 and nvidia gt 630 was a success, but i’m getting oly 640 x 480 display . even Nvidia-settings is providing me only the above stated resolution.Can you please help me out to get 1080p display.If more information is required about the setup please do ask me.
HI i’ve repeated the steps 6th time, each time i perform a clean format on my hdd. however it still stucks at black screen with cursor blinking…
I have a Nvidia GT 635m on my machine. I’ve been searching everywhere but all the steps they provide still reach the same result.. any suggetion?
hey Blackmore i have followed each and every step as you stated and direct rendering was successful but typing command-
lsmod | grep nvidia
doesn’t produce any output where as command-
lsmod | grep nouveau
produces output
don’t know what’s going wrong.
i am using kali linux(sana) 4.0.0
is this the wrong version?
oh!! and one thing more
typing command-
lspci -nn | grep VGA
only showing intel hd graphics but i have nvidia 820M graphics too..
hoping you will reply soon..thanks in advance.
ADD ON- i am using Insyde F35 bios
so don’t have an option to change GPU from Intel to Nvidia or say i can’t disable Intel GPU from bios :(
Works on kali-rolling too.. Thank you
Hi, I am on the most current KALI linux, did the upgrade and dist-upgrade, and there don’t seem to be kernel headers available for me.
This is what I get when I type
apt-get install linux-headers-$(uname -r)
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package linux-headers-4.3.0-kali1-amd64
E: Couldn’t find any package by glob ‘linux-headers-4.3.0-kali1-amd64’
E: Couldn’t find any package by regex ‘linux-headers-4.3.0-kali1-amd64’
Maybe this OS version is too new?
If I could get the headers working I could probably install because there is a driver out for the GTX-970 which is what I am using, and the built in display drivers work well with it, but I would like the GPU processing capabilities.
Please reply if you can, thanks
Awesome write-up & in detail. Thanks.
error help please
root@kali:~# apt-get install nvidia-kernel-$(uname -r)
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package nvidia-kernel-4.5.0-kali1-686-pae
E: Couldn’t find any package by glob ‘nvidia-kernel-4.5.0-kali1-686-pae’
E: Couldn’t find any package by regex ‘nvidia-kernel-4.5.0-kali1-686-pae’
root@localhost:~# aptitude -r install linux-headers-$(uname -r)
Couldn’t find any package whose name or description matched “linux-headers-3.14-kali1-amd64”
Couldn’t find any package whose name or description matched “linux-headers-3.14-kali1-amd64”
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
apt-get install nvidia-kernel-amd64
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package nvidia-kernel-amd64
Hello juan carlos, and arjun thagunna,
at first, I’d suggest buying a mouse with a scrollwheel. The solution is NOT to install any of those nividia-kernel related packages. It is already described a few post above yours but I repeat it for your convenience:
nVidia has updated their driver package. It contains everything you need.
In contrast to all the guides on installing the nVidia driver on Kali Linux, you must not install anything nVidia related before running the official nVidia installer.
Here is how I got the driver working.
Make sure your Kali Linux system is up to date:
apt-get clean && apt-get update && apt-get upgrade && apt-get dist-upgrade
Install the kernel headers:
apt-get install -y linux-headers-$(uname -r)
If you get errors like alreza jj:
Couldn’t find any package whose name or description matched “linux-headers-3.14-kali1-amd64”
make sure that the correct sources for Kali packages are referenced in /etc/apt/sources.list and that you are connected to the internet.
Download the nVidia driver for your graphics card and save it in a location convenient to you (e.g. your home directory).
Blacklist the nouveau driver:
make sure you have a file called “nvidia-installer-disable-nouveau.conf” inside of [/etc/modprobe.d/]. If it’s not there, create it and paste inside…
blacklist nouveau
options nouveau modeset=0
Enter the following commands in a terminal as root:
sed ‘s/quiet/quiet nouveau.modeset=0/g’ -i /etc/default/grub
update-grub
update-initramfs
reboot
If you face the login screen after reboot, do not log in but change to a terminal with ALT+F1.
Log in to the terminal as root.
Kill GDM:
service gdm3 stop
Remove all nVidia related stuff:
apt-get purge nvidia-*
Navigate to the directory you downloaded the nVidia driver to.
Make sure the driver installer (*.run) is executable:
chmod +x NVidia…run
Start the nVidia driver installer and follow the instructions on the screen. Let it configure your X server.
Reboot again. You should now be fine
Hope that helps. At least that’s how I got my system working. The nvidia-kernel-dkms package from the Kali repository, unfortunately, does not support my graphics card (GeForce 8400 GS) any more so I had to install the official nVidia driver (340.93) instead.
apt-get install nvidia-kernel-$(uname -r)
Couldn’t find any package whose name or description matched “nvidia-kernel-4.9.0-kali2-amd64”
So how to install this step?
Please read the answer right above your comment.