Kali Linux 1.0.7 kernel 3.14 – Install proprietary NVIDIA driver – NVIDIA Accelerated Linux Graphics Driver
This guide explains how to install proprietary “NVIDIA Accelerated Linux Graphics Driver” or NVIDIA driver on Kali Linux 1.0.7 kernel 3.14 system. The first part where you install NVIDIA Driver is very straight forward (well exactly same as before) but on the second part where you install NVIDIA CUDA driver, you get an error while running pyrit “ERROR: could not insert ‘nvidia_uvm’: Invalid argument”. This two part series guide will help you to install NVIDIA Driver and NVIDIA CUDA on your Kali Linux machines. I am not too sure if this applies to all Ubuntu or Debian variants, but it sure works if you have those errors or trying to do it in Kali Linux.
By default Kali Linux installs pen source NVIDIA driver
nouveau
which works great if you just want a display. Open source drivers can be confirmed by using lsmod | grep nouveau
command. But like I said in my previous guides, it doesn’t give you 3D acceleration features or GPU acceleration based applications (such as CUDA and GPU pass through). That means you MUST 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.
How to Install NVIDIA Kernel Module CUDA and Pyrit in Kali LinuxThis guide replaces the old guides
- Install proprietary NVIDIA driver on Kali Linux – NVIDIA Accelerated Linux Graphics Driver
I had to divide it into two parts:
- Kali Linux 1.0.7 kernel 3.14 – Install proprietary NVIDIA driver – NVIDIA Accelerated Linux Graphics Driver
- Kali Linux 1.0.7 kernel 3.14 – 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 on Kali Linux 1.0.7 kernel 3.14. For normal users, you should just stop here and enjoy your nice smooth NVIDIA graphics. Install some game or enjoy a movie.
For the more advanced users or those who want GPU acceleration, (cudahashcat, GPU pass through etc.) follow the second guide (link above).Since Kali 1.0.7 was introduced along with Kernel 3.14, users been plagued with this annoying error message “ERROR: could not insert ‘nvidia_uvm’: Invalid argument” while running pyrit or simialr GPU based tools. I have since tried multiple times and thanks to use Shinri show came up with the correct advise and solution. This was a bug and there’s way around it, so that’s good news.
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.
Is this guide for me?
I have a freshly installed Kali Linux installation where I updated, upgraded everything following special guide … 20 things to do after Installing Kali Linux.
So except proprietary NVIDIA driver, everything was installed and working. In case those who are not so familiar which guide to follow, ask yourself these questions:
- Do I have a NVIDIA card?
- Is this a freshly installed Kali system?
- When did I installed it?
- Did I upgrade everything like blackMORE advised?
- Is this the correct version of guide to run on my Kali Linux?
blackMORE’s settings
So I’ve installed my Kali Linux v 1.0.7 running Kernel 3.14 on 26/05/2014. I’ve got a NVIDIA GeForce 210 card on this machine running a 64-bit version Kali Linux. How do I know that? You can run the following commands to ensure those:
To find out when you’ve installed your Kali Linux, run the following two commands:
passwd -S sys | tail -1 | awk '{print $3}'
tune2fs -l /dev/sda5 |grep 'Filesystem created'
Which CPU you’re running on? Run the following command:
lscpu
Which graphics card you’re using? Run the following command:
lspci | grep VGA
Here’s mine…
So we’re good? Ok then. let’s roll and install proprietary NVIDIA Graphics Driver that we have to install every release. This is getting quite annoying I must say…
Prerequisites
I’ve installed everything in a brand new Kali Linux 1.0.7 kernel 3.14 installation. Assuming you have the same but this guide will apply to older version that’s been upgraded as well. You need to complete the followings:
- Add Official Kali Linux repository.
- Update, upgrade and dist-upgrade Kali Linux.
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
This is stock standard for most of my guides.
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)
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
While installing you get two popups where you select
OK
First one tell you there’s a conflict (well of course, there’s a conflict, you have nouveau installed now and replacing it with Proprietary NVIDIA Driver). So we press OK on this popup.
The second popup tell you that you dont have a
xorg.conf
file in /etc/X11/
folder. . Yeap, we will fix that soon. Press OK
.Press
OK
on both popups.Step 4: Install xconfig NVIDIA driver application
Now we need a
xorg.conf
file in /etc/X11/
folder. The easiest way to do that is by installing nvidia-xconfig
package.Use the following command:
aptitude install nvidia-xconfig
This will install Xconfig package which then generates a
xorg.conf
file in /etc/X11/
folder.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. On in there wasn’t a per-exisiting xorg.conf file it will just create a brand new one.Now as directed by NVIDIA driver
nvidia-kernel-dkms
, reboot your machine to complete installation.reboot
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 outputaptitude 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 followingnvidia-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 followingrm /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 followingapt-get remove nvidia-kernel-dkms
reboot
After reboot, you should be able to log in using the GDM3 GUI.
Question: Disabling nouveau driver on Grub?
I am not sure if this is required because I can make my config work without doing this step. See step 6.d where NVIDIA driver automagically disabled NOUVEAU drivers using modprobe. Readers, can you comment on this or why most people adds these two lines in their How to’s. I found it pointless…
sed 's/quiet/quiet nouveau.modeset=0/g' -i /etc/default/grub
update-grub
reboot
Some discussion on this seems warranted… Let me know.
Suggestions by readers:
Following suggestion was posted by London. I don’t have a bumblebee enabled card, can you confirm if this worked for you?
p.s. always read comment sections, I know it’s boring but I can only put as much in the actual post.
Conclusion
This concludes my general instructions on how to install proprietary NVIDIA driver – NVIDIA Accelerated Linux Graphics Driver Kali Linux 1.0.7 kernel 3.14
NVIDIA Optimus users should be able to follow the same instructions, however, as I said before, feel free to share your side of stories 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. NVIDIA Settings presents you with a GUI X Config Window and you can see GPU Temperature and more info.For normal users, guide ends here. 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 official Pyrit and install Cpyrit. Find out if your Graphics Card supports CUDA in the following page from NVIDIA
- CUDA GPUs
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.