Issues installing Nvidia drivers

Hello,

I’m having issues when trying to install Nvidia drivers via repository. I was able to do it previously with no issues. However, I just reformatted PC and am having issues this time around despite installing same drivers from same repository with same commands.

Attached is the output of nvidia-bug-report.sh
nvidia-bug-report.log.gz (86.4 KB)

┌──(name㉿host)-[~]
└─$ apt search nvidia-driver
Sorting... Done
Full Text Search... Done

...

nvidia-driver/kali-rolling,now 470.94-1 amd64 [installed]
  NVIDIA metapackage
┌──(name㉿host)-[~]
└─$ 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.

                                                                                                                                                                        
┌──(name㉿host)-[~]
└─$ lspci -s 1:00.0 -v                                                                                                                                              9 ⨯
01:00.0 VGA compatible controller: NVIDIA Corporation GA104M [GeForce RTX 3070 Mobile / Max-Q] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: ASUSTeK Computer Inc. GA104M [GeForce RTX 3070 Mobile / Max-Q]
	Physical Slot: 0
	Flags: fast devsel, IRQ 255, IOMMU group 11
	Memory at fb000000 (32-bit, non-prefetchable) [disabled] [size=16M]
	Memory at fc00000000 (64-bit, prefetchable) [disabled] [size=8G]
	Memory at fe00000000 (64-bit, prefetchable) [disabled] [size=32M]
	I/O ports at e000 [disabled] [size=128]
	Expansion ROM at fc000000 [disabled] [size=512K]
	Capabilities: <access denied>
	Kernel modules: nvidia

is dkms installed? What does dkms status show?
Are the kernel headers installed? Package linux-headers-$(uname -r).

┌──(varys㉿lys)-[~]
└─$ dkms status                       
nvidia-current/470.94: added

It appears that the linux-headers are not installed. Should I opt for the OS-specific package or the generic one?

┌──(varys㉿lys)-[~]
└─$ sudo apt-get install linux-headers-                                                                                                                           100 ⨯
Completing package
linux-headers-5.15.0-kali3-amd64        linux-headers-5.15.0-kali3-common       linux-headers-5.15.0-kali3-rt-amd64     linux-headers-cloud-amd64             
linux-headers-5.15.0-kali3-cloud-amd64  linux-headers-5.15.0-kali3-common-rt    linux-headers-amd64                     linux-headers-rt-amd64

The output of uname doesn’t match up with any package availible in the repository.

┌──(varys㉿lys)-[~]
└─$ uname -r
5.14.0-kali4-amd64

┌──(varys㉿lys)-[~]
└─$ sudo apt-get install linux-headers-                                                                                                                           100 ⨯
Completing package
linux-headers-5.15.0-kali3-amd64        linux-headers-5.15.0-kali3-common       linux-headers-5.15.0-kali3-rt-amd64     linux-headers-cloud-amd64             
linux-headers-5.15.0-kali3-cloud-amd64  linux-headers-5.15.0-kali3-common-rt    linux-headers-amd64    

headers version should match your kernel version.
usually there is a meta package for both, which will provide an update path.
after header install, apt reinstall ... the nvidia driver.
dmks status should then show “installed”, not just “added”.