Table of Contents
Step 3: Install NVIDIA Driver Kernel DKMS
We’re almost ready. You can now install new NVIDIA driver nvidia-kernel-dkms
by using the following command:
aptitude install nvidia-kernel-dkms
Including dependencies, this is about 24MB is size, depending on how fast Kali repo is working, you might have to wait few minutes. You will get 2 popups, the first one about rebooting after you’ve installed NVIDIA driver nvidia-kernel-dkms
that it will disable open source NVIDIA driver nouveau
and the second one about xorg.conf
file in /etc/X11/
folder.
Press OK
on both popups.
Step 4: Install xconfig NVIDIA driver application
If you go through the NVIDIA driver README document, you will see you need to create new XORG server configuration file xorg.conf
or modify existing xorg.conf
to tell it to load NVIDIA Driver module. nvidia-xconfig
package make this task quite easier. All you need to do is to install and execute it.
aptitude install nvidia-xconfig
Step 5: Generate Xorg server configuration file
Now that we have installed nvidia-xconfig
package, issue the following command to generate Xorg server configuration file.
nvidia-xconfig
It will rename any existing xorg.conf
file and create a new one. As directed by NVIDIA driver nvidia-kernel-dkms
, reboot your machine to complete installation.
reboot
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.