Table of Contents
Step 6: Confirming your installation
At this point you should be able to login to your system in Graphical User Mode (GUI). In case you can’t, follow the troubleshooting section at the bottom of this article. As always, we need to check if everything went as expected.
Step 6.a: Check GLX Module
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
Step 6.b: Check NVIDIA Driver Module
Check if NVIDIA module loaded.
lsmod | grep nvidia
If it produces output like nvidia 9442880 28
or something similar (numbers could be different at your system) then NVIDIA module is loaded.
Step 6.c: Check for Open source NVIDIA Driver nouveau module
Just to be sure Open source NVIDIA Driver nouveau module NOT loaded, issue following command
lsmod | grep nouveau
It should NOT produce any output. If it produces output then something is wrong.
Step 6.d: Confirm if open source NVIDIA Driver nouveau was blacklisted
I like this new NVIDIA Driver. It blacklists Open source NVIDIA Driver nouveau by default. That means less work for us to do. You can confirm it by checking files in the following directory:
cat /etc/modprobe.d/nvidia.conf cat /etc/modprobe.d/nvidia-blacklists-nouveau.conf cat /etc/modprobe.d/nvidia-kernel-common.conf
Troubleshooting
You might get a black screen after installing NVIDIA Driver. Following are your options to fix it:
Troubleshooting Step A: 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 GDM3 GUI.
Troubleshooting Step B: Delete xorg.conf file
Press CTRL + ALT + F1
and login. Type the following
rm /etc/X11/xorg.conf reboot
After reboot, you should be able to log in using the GDM3 GUI.
Troubleshooting Step C: remove NVIDIA Driver
Press CTRL + ALT + F1
and login. Type the following
apt-get remove nvidia-kernel-dkms reboot
After reboot, you should be able to log in using the GDM3 GUI.
Conclusion
This concludes my general instructions on how to install proprietary NVIDIA driver on Kali Linux – NVIDIA Accelerated Linux Graphics Driver. NVIDIA Optimus users should be able to follow the same instructions, however, as I said before, feel free to share your side of story on how your installation went and correct my guide if required. I am open for discussion and will try to reply back to your comments the earliest possible. For those curious minds, try installing nvidia-settings
and see how that goes. NVIDIA Settings will remove NVIDIA Driver but I did manage to make it work with some tinkering. I will try to write another guide on that (NVIDIA Settings presents you with a GUI X Config Window and you can see GPU Temperature and more info)… The proprietary “NVIDIA Accelerated Linux Graphics Driver” provides optimized hardware acceleration of OpenGL applications via a direct-rendering X server, in shoty your NVIDIA Driver give you better display and 3D rendering then you’re all done. You can now play 3D Games. Let me know if you want any specific Linux supported games on Kali and I can write up an article on that. But if you want to run applications that uses NVIDIA Kernel Module CUDA, Pyrit and Cpyrit for GPU processing then you will also need to install CUDA drivers, replace offical Pyrit and install Cpyrit. Find out if your Graphics Card supports CUDA in the following page from NVIDIA
Mine does,
- GeForce 210.
Next guide will show you how to Install NVIDIA Kernel Module CUDA and Pyrit in Kali Linux – CUDA, pyrit and cpyrit. Thanks for reading. If this guide helped you to install NVIDIA Driver, please share this article and follow us in Facebook/Twitter.
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.