Kali Linux gets stuck at boot after install NVIDIA drivers

Hi all
And thanks for replies

My Linux 5.6.0-kali1-amd64 gets stuck at boot after following the instructions to install NVIDIA drivers from Kali Official Site (sorry can’t post url because new user limit)

This is how it looks:

I try to boot in Recovery Mode and get this:

I know Load Kernel Modules is FAILED, but i cant view logs because then i press Enter it gets stuck, just like in this thread:

In Advanced Boot Options of GRUB i found Linux 5.5.0-kali2-amd64 version
Seems like it boots, but NVIDIA driver is not loaded:

~$ nvidia-settings
ERROR: NVIDIA driver is not loaded
ERROR: Unable to load info from any available system
~$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. 
Make sure that the latest NVIDIA driver is installed and running.

I Googled the whole day and try many solutions, like:
Disable Secure Boot
Reinstall Drivers
Disable Nouveau

But still no luck

Please help me anybody, i’m stuck with this
I’m ready to follow instructions that helps figure out what is going wrong

Is this a notebook or a desktop? In any case, please delete /etc/X11/xorg.conf in case there is one.
Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post. You will have to rename the file ending to something else since the forum software doesn’t accept .gz files (nifty!).

1 Like

Hello generix
Thanks for the help

It is a desktop, here is specs (i deleted some unnecessary info):

hwinfo --short
cpu:                                                            
                       Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
monitor:
                       DELL U2211H
                       DELL U2913WM
graphics card:
                       nVidia GP107 [GeForce GTX 1050 Ti]
bridge:
                       Intel 7 Series/C216 Chipset Family PCI Express Root Port 1
                       Intel Z77 Express Chipset LPC Controller
                       Intel Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port
                       Intel 7 Series/C210 Series Chipset Family PCI Express Root Port 8
                       Intel 7 Series/C216 Chipset Family PCI Express Root Port 4
                       Intel Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller
                       Intel 7 Series/C210 Series Chipset Family PCI Express Root Port 7
                       Intel 82801 PCI Bridge
                       ASMedia ASM1083/1085 PCIe to PCI Bridge

i checked the path you provided and only found folder called xorg.conf.d and its empty, no conf file at all

Here is bug-report:
nvidia-bug-report (1).log (355.5 KB)

Please run inside an empty directory
sudo apt remove nvidia*
sudo apt install nvidia-driver
and note which version gets installed. For the 5.6 kernel, it should be 440.82

1 Like

I hope i got it correctly, i just changed directory to test folder in terminal by cd command, then run remove/install commands. After that situation is the same.

Here a few lines from terminal log:

Setting up nvidia-driver (440.82-2) ...

So version is 440.82-2

Also i noticed this lines:

Loading new nvidia-current-440.82 DKMS files...
Building for 5.5.0-kali2-amd64 5.6.0-kali1-amd64
Module build for kernel 5.5.0-kali2-amd64 was skipped since the
kernel headers for this kernel does not seem to be installed.
Module build for kernel 5.6.0-kali1-amd64 was skipped since the
kernel headers for this kernel does not seem to be installed.

and this:

nvidia-persistenced.service is a disabled or a static unit not running, not star
ting it.

Here is a full log:
remove&install_nvidia_bash_log.log (38.3 KB)

Seems like i need to install kernel headers and try again, but how to do it correctly?

And by the way, if i install driver from 5.5.0 kernel session (don’t know how to say it right, it just one way it boots now) it install driver both for 5.5.0 and 5.6.0 kernels, right?

you can use
dkms status
to check for which kernels the driver is installed and
sudo dkms install nvidia/440.82 --all
to build and install the driver for all kernels which have the headers installed
installing headers for the currently running kernel:
sudo apt install kernel-headers-$(uname -r)

1 Like

Thanks for useful info
Here is what it says:

~$ dkms status
nvidia-current, 440.82: added

~$ sudo dkms install nvidia/440.82 --all

~$ dkms status
nvidia-current, 440.82: added

~$ sudo apt install kernel-headers-$(uname -r)    
Reading package lists... 0%                         
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package kernel-headers-5.5.0-kali2-amd64
E: Couldn't find any package by glob 'kernel-headers-5.5.0-kali2-amd64'

Looks like you have to add the source repos for Kali 2 to be able to install kernel headers:
https://computingforgeeks.com/how-to-install-linux-kernel-headers-on-kali-linux-2-0-kali-sana/

1 Like

Looks like something is work now

This is what i do:

Sorry, but i found what kali-sana repos is deprecated, read it here:
https://unix.stackexchange.com/questions/399840/kali-rolling-vs-kali-sana-repository

I followed this article:

section Method 2 – Manual Method

After doing this:

apt update -y && apt upgrade -y && apt dist-upgrade

and then trying to boot into 5.6.0-kali2-amd64
i facing same old errors

but now it continue to boot

i run nvidia-settings it says some error but opens NVIDIA X Server Settings:

$ nvidia-settings
(nvidia-settings:10778): GLib-GObject-CRITICAL **: 18:46:18.568: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

$ nvidia-smi
Wed Jun  3 18:34:13 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.82       Driver Version: 440.82       CUDA Version: N/A      |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 105...  Off  | 00000000:01:00.0  On |                  N/A |
|  0%   49C    P0    N/A /  95W |    448MiB /  4036MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0       733      G   /usr/lib/xorg/Xorg                           135MiB |
|    0      1039      G   /usr/bin/gnome-shell                         160MiB |
|    0      1589      G   ...AAAAAAAAAAAACAAAAAAAAAA= --shared-files   149MiB |
+-----------------------------------------------------------------------------+

but then i run hashcat benchmark, it says No devices found\left:

$ hashcat benchmark
hashcat (v5.1.0) starting...

* Device #1: Not a native Intel OpenCL runtime. Expect massive speed loss.
             You can use --force to override, but do not report related errors.
No devices found/left.

Do i need download kernel headers manually and install it or it unnecessary now?
How to get hashcat working with NVIDIA gpu?

The driver is working so the headers are already installed. Hashcat is using OpenCL, you can check the available/capable devices with
clinfo
You might have to install the nvidia opencl part using
sudo apt install nvidia-opencl-icd

1 Like

Thank you, generix
Your are a lifesaver)

Installed nvidia-opencl-icd and looks like it finally works now:

$ hashcat clinfo
hashcat (v5.1.0) starting...

* Device 1: WARNING! Kernel exec timeout is not disabled.
             This may cause "CL_OUT_OF_RESOURCES" or related errors.
             To disable the timeout, see: https://hashcat.net/q/timeoutpatch
* Device 2: Not a native Intel OpenCL runtime. Expect massive speed loss.
             You can use --force to override, but do not report related errors.
OpenCL Platform #1: NVIDIA Corporation
======================================
* Device 1: GeForce GTX 1050 Ti, 1009/4036 MB allocatable, 6MCU

OpenCL Platform #2: The pocl project
====================================
* Device 2: pthread-Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz, skipped.

Don’t know do i need disable timeout or not, but that’s a details…

Run WPA/2 benchmark for example:

Speed.1.........:   120.6 kH/s (50.75ms) @ Accel:256 Loops:64 Thr:256 Vec:1

Looks like the result is normal for this GPU