Ubuntu 18.04, GeForce GTX 1060 Mobile:NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver

@generix helped me get the drivers working on this system in this thread.

Since the past week or so (around the time the 510 driver was released?], the graphics card isn’t working. No changes from my side, although the kernel and drivers have been auto-updating in the background:

$ 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’ve tried the same recommended install steps for the following driver versions: 440, 455, 470 and 510:

$sudo apt purge nvidia*
$sudo apt purge libnvidia*
$sudo apt install nvidia-driver-<version>
$sudo prime-select nvidia
$sudo update-initramfs -u

Also checking:

$ grep nvidia /etc/modprobe.d/* /lib/modprobe.d/*
/etc/modprobe.d/blacklist-framebuffer.conf:blacklist nvidiafb
/lib/modprobe.d/nvidia-kms.conf:# This file was generated by nvidia-prime
/lib/modprobe.d/nvidia-kms.conf:options nvidia-drm modeset=1

Also tried switching to older kernels, same result. Currently:

$ uname -r
$$ lspci -nnk | grep -iA2 vga 
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 630 (Mobile) [8086:3e9b]
	Subsystem: Dell Device [1028:0825]
	Kernel driver in use: i915
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile] [10de:1c20] (rev a1)
	Subsystem: Dell GP106M [GeForce GTX 1060 Mobile] [1028:0825]
	Kernel modules: nvidiafb, nouveau

Any help in getting this working again would be appreciated!
nvidia-bug-report.log.gz (669.6 KB)

You switched your system compiler to gcc 6.5 but the kernel was compiled with 7.5 so the driver doesn’t compile. Please set gcc and cc back to gcc 7.5

Thanks for the quick reply!

Using update-alternatives, I switched gcc to 7.5. Purged all previous version, installed 510, but now there’s a different message:

$ nvidia-smi
No devices were found
$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

Any suggestions?

nvidia-bug-report.log.gz (709.3 KB)

The driver now compiles and loads but the gpu doesn’t initialize

[ 11.013294] NVRM: GPU 0000:01:00.0: RmInitAdapter failed! (0x31:0xffff:2478)
[ 11.013358] NVRM: GPU 0000:01:00.0: rm_init_adapter failed, device minor number 0

The gpu is likely broken, please double-check by installing Windows. If the device manager gives you a Code 43, it’s dead.

Done. I have Windows on dual-boot, device manager confirms Code 43.

Any suggestions as to what’s the next best course of action would be appreciated!

Then you’ll have to contact Dell to check for warranty/repair options.