Install Nvidia Driver In Kali Linux

Step 1: Install the Kali Linux on hard drive. After the installation process complete restart the computer. Setp 2: Now you will see the Kali Linux Grub Bootloader with a blue screen. From the GRUB loader select Kali Linux and press E. Navigate cursor to row where starting with Linux then on the end of the []. Use the parameter related to the brand or chipset of your video card. Pe.: use nouveau or nvidia for nvidia based cards (proprietary driver, just nv in some linux distributions, nouveau driver is the default in Mint) ), use radeon for amd/ati cards, i915 for intel based motherboards,,,, These are the most common examples.

After spending few days on how-tos and debugging the black screen issue on boot after insalling the nvidia drivers, I was finally able to find a solution to all my problems.The main reason I'm writing this post is to let you know that the tutorial found on Kali's official website is broken as of date 11 April 2018.According to he mentioned in their website you might be able to successfully install the packages - ocl-icd-libopencl1, nvidia-driver, nvidia-cuda-toolkitbut you might encounter issues during the reboot. You might get a black screen and won't be able to login via the GUI.

So lets get started-

First of all let me tell you the specifications of my system-

CPU - Intel® Core™ i5-8250U CPU @ 1.60GHz × 8

GPU #1- Intel® UHD Graphics 620

GPU #2- Nvidia GeForce MX150

Before we begin, a couple of notes:

USE AT YOUR OWN RISK

This tutorial is for official NVIDIA Driver

Tutorial found on official Kali website is BROKEN! It never works for optimus/hybrid Graphics enabled laptop

Step 1: Verify you have hybrid graphics

Step 2: Disable nouveau

Step 3: System will reboot and nouveau should be disabled. Verify if nouveau is disabled:

If shows nothing,means nouveau successfully disabled.

Step 4: Install nvidia driver from kali repo:

You can also download latest .run file from Nvidia's website. Execute and procceed with installation. Whether its from Kali's repo or Nvidia's website, procedure is same.Code to install the .run file:

Install

Step 5: Now we have to find bus id of our nvidia card:

it should show something like this:

This is our Bus ID.

Step 6: Now we generate /etc/X11/xorg.conf file with this bus ID according to Nvidia's guide:

Replace the string inside ** ** with your Bus ID and save it to /etc/X11/xorg.conf

Step 7: Now we have to create some scripts according to our display manager.Since im using default Kali linux which is GDM,i created two files:/usr/share/gdm/greeter/autostart/optimus.desktop/etc/xdg/autostart/optimus.desktopwith the following content:

Step 8: Now reboot and you should be using Nvidia Driver. Verify if everything is ok:install mesa-utils if not previously installed.

Step 9: Now you can install the cuda toolkits and drivers. The package nvidia-cuda-toolkit has been deprecated. You can install hashcat-nvidia package as an alternative.

Step 10: Now that our system should be ready to go, we need to verify the drivers have been loaded correctly. We can quickly verify this by running the nvidia-smi tool.

FIXING SCREEN TEARING ISSUE:After you successfully boot up with Nvidia Driver, you most probably would be experiencing screen tearing issue eg: glitches while playing videos in VLC, Youtube videos on Chrome/Firefox etc. Luckily, we can fix this by enabling PRIME Sync.

1. Verify if PRIME is disabled

it should output something like this:

First one is our connected display.So PRIME sync is disabled.

2. Edit /etc/default/grub and append nvidia-drm.modeset=1 in GRUB_CMDLINE_LINUX_DEFAULT after quiet.Like the following:

3. Save the changes and update grub using the command:

4. Reboot your system.

5. Verify if PRIME is enabled:

Now it should output:

If it still shows 0 for you,then there is probably something wrong with your system config/kernel. Since this is still an experimental feature from Nvidia,you are out of luck.

IF YOU STUCK IN BOOT SCREEN

Revert what we have done so far:

Press CTRL+ALT+F2 or CTRL+ALT+F3, login with your password.

Remove those display manager files we created earlier (for GDM):

Now reboot. You should be able get back to your old system.

If any issues exist please post it in Kali's forum.

My sincere thanks to TiGER511 who did all the hard-work.

I'll soon update this repo on how to switch between your Intel Graphics and Nvidia Graphic card.

After spending few days on how-tos and debugging the black screen issue on boot after insalling the nvidia drivers, I was finally able to find a solution to all my problems.The main reason I'm writing this post is to let you know that the tutorial found on Kali's official website is broken as of date 11 April 2018.According to he mentioned in their website you might be able to successfully install the packages - ocl-icd-libopencl1, nvidia-driver, nvidia-cuda-toolkitbut you might encounter issues during the reboot. You might get a black screen and won't be able to login via the GUI.

So lets get started-

First of all let me tell you the specifications of my system-

CPU - Intel® Core™ i5-8250U CPU @ 1.60GHz × 8

GPU #1- Intel® UHD Graphics 620

GPU #2- Nvidia GeForce MX150

Before we begin, a couple of notes:

USE AT YOUR OWN RISK

This tutorial is for official NVIDIA Driver

Tutorial found on official Kali website is BROKEN! It never works for optimus/hybrid Graphics enabled laptop

Step 1: Verify you have hybrid graphics

Step 2: Disable nouveau

Step 3: System will reboot and nouveau should be disabled. Verify if nouveau is disabled:

Install Nvidia Driver In Kali Linux

If shows nothing,means nouveau successfully disabled.

Step 4: Install nvidia driver from kali repo:

You can also download latest .run file from Nvidia's website. Execute and procceed with installation. Whether its from Kali's repo or Nvidia's website, procedure is same.Code to install the .run file:

Step 5: Now we have to find bus id of our nvidia card:

it should show something like this:

This is our Bus ID.

Step 6: Now we generate /etc/X11/xorg.conf file with this bus ID according to Nvidia's guide:

Replace the string inside ** ** with your Bus ID and save it to /etc/X11/xorg.conf

Step 7: Now we have to create some scripts according to our display manager.Since im using default Kali linux which is GDM,i created two files:/usr/share/gdm/greeter/autostart/optimus.desktop/etc/xdg/autostart/optimus.desktopwith the following content:

Step 8: Now reboot and you should be using Nvidia Driver. Verify if everything is ok:install mesa-utils if not previously installed.

Install Nvidia Driver Kali Linux 2

Step 9: Now you can install the cuda toolkits and drivers. The package nvidia-cuda-toolkit has been deprecated. You can install hashcat-nvidia package as an alternative.

Step 10: Now that our system should be ready to go, we need to verify the drivers have been loaded correctly. We can quickly verify this by running the nvidia-smi tool.

FIXING SCREEN TEARING ISSUE:After you successfully boot up with Nvidia Driver, you most probably would be experiencing screen tearing issue eg: glitches while playing videos in VLC, Youtube videos on Chrome/Firefox etc. Luckily, we can fix this by enabling PRIME Sync.

1. Verify if PRIME is disabled

it should output something like this:

Blacklist Nouveau Nvidia

First one is our connected display.So PRIME sync is disabled.

2. Edit /etc/default/grub and append nvidia-drm.modeset=1 in GRUB_CMDLINE_LINUX_DEFAULT after quiet.Like the following:

3. Save the changes and update grub using the command:

4. Reboot your system.

5. Verify if PRIME is enabled:

Now it should output:

If it still shows 0 for you,then there is probably something wrong with your system config/kernel. Since this is still an experimental feature from Nvidia,you are out of luck.

IF YOU STUCK IN BOOT SCREEN

Revert what we have done so far:

Press CTRL+ALT+F2 or CTRL+ALT+F3, login with your password.

Remove those display manager files we created earlier (for GDM):

Install Nvidia Driver In Linux Mint

Now reboot. You should be able get back to your old system.

If any issues exist please post it in Kali's forum.

My sincere thanks to TiGER511 who did all the hard-work.

Cant Install Nvidia Drivers 2018

I'll soon update this repo on how to switch between your Intel Graphics and Nvidia Graphic card.