Nvidia graphic card detected ; modprobe nvidia failed but nvidia driver perfectly installed. what's wrong?

Hello.

I’m trying to passthrough my nvidia GTX 1060 from ubuntu 20.10 host to xen with ubuntu 20.10 guest os which run on a GPT + EFI partition. Below you can see how is configured everything (default vga display adapter / nvidia 1060 driver and the monitor). The problem that I have is that even if the 1060 is detected inside the vm,the monitor attached to it is not detected.

root@zioma-HVM-domU:/home/zioma# lspci -k

00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)

`Subsystem: Red Hat, Inc. Qemu virtual machine`  

00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
Subsystem: Red Hat, Inc. Qemu virtual machine
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
Subsystem: Red Hat, Inc. Qemu virtual machine
Kernel driver in use: ata_piix
Kernel modules: pata_acpi
00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
Subsystem: Red Hat, Inc. QEMU Virtual Machine
Kernel driver in use: uhci_hcd
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
Subsystem: Red Hat, Inc. Qemu virtual machine
Kernel modules: i2c_piix4
00:02.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)
Subsystem: XenSource, Inc. Xen Platform Device
Kernel driver in use: xen-platform-pci
00:04.0 VGA compatible controller: Device 1234:1111 (rev 02)
Subsystem: Red Hat, Inc. Device 1100
Kernel driver in use: bochs-drm
Kernel modules: bochs_drm
00:06.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB] (rev a1)
Subsystem: ZOTAC International (MCO) Ltd. GP106 [GeForce GTX 1060 3GB]
Kernel modules: nvidiafb, nouveau , nvidia_drm, nvidia
00:07.0 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)
Subsystem: ZOTAC International (MCO) Ltd. GP106 High Definition Audio Controller
Kernel driver in use: snd_hda_intel

`Kernel modules: snd_hda_intel`

root@zioma-HVM-domU:/home/zioma# ls -l /sys/class/drm/

lrwxrwxrwx 1 root root 0 nov 1 23:14 card0 -> ../../devices/pci0000:00/0000:00:04.0/drm/card0
lrwxrwxrwx 1 root root 0 nov 1 23:14 card0-Virtual-1 -> ../../devices/pci0000:00/0000:00:04.0/drm/card0/card0-Virtual-1
lrwxrwxrwx 1 root root 0 nov 1 23:14 ttm -> ../../devices/virtual/drm/ttm
-r--r--r-- 1 root root 4096 nov 1 23:14 version

root@zioma-HVM-domU:/home/zioma# xrandr

Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
Virtual-1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768 60.00*+
1920x1080 60.00
1600x1200 60.00
1680x1050 59.95 59.88
1400x1050 59.98 59.95
1600x900 60.00
1280x1024 60.02
1440x900 59.89 59.90
1280x960 60.00
1366x768 59.79 60.00
1360x768 60.02
1280x800 59.81 59.91
1280x768 59.87 59.99
1280x720 60.00
800x600 60.32 56.25
848x480 60.00
640x480 59.94

As you can see my NVIDIA GP106 have not driver in use for it,Instead of the NVIDIA High Definition Audio Controller of the card. So the only graphic card in use is:

00:04.0 VGA compatible controller: Device 1234:1111 (rev 02)
Subsystem: Red Hat, Inc. Device 1100
Kernel driver in use: bochs-drm
Kernel modules: bochs_drm

And in the /sys/class/drm, I have only:

rwxrwxrwx 1 root root 0 nov 1 23:14 card0 ->
…/…/devices/pci0000:00/0000:00:04.0/drm/card0

So the first thing I tried has been to load the nvidia driver manually, beacuse I have not one driver attached to it:

root@zioma-HVM-domU:/home/zioma# modprobe nvidia

modprobe: ERROR: could not insert ‘nvidia’: No such device

root@zioma-HVM-domU:/home/zioma# lsmod
Module Size Used by
snd_hda_intel 53248 0
snd_intel_dspcfg 24576 1 snd_hda_intel
snd_hda_codec 143360 1 snd_hda_intel
nls_iso8859_1 16384 1
snd_hda_core 94208 2 snd_hda_intel,snd_hda_codec
snd_hwdep 20480 1 snd_hda_codec
snd_pcm 118784 3 snd_hda_intel,snd_hda_codec,snd_hda_core
intel_rapl_msr 20480 0
intel_rapl_common 28672 1 intel_rapl_msr
snd_seq_midi 20480 0
snd_seq_midi_event 16384 1 snd_seq_midi
bochs_drm 16384 1
snd_rawmidi 36864 1 snd_seq_midi
crct10dif_pclmul 16384 1
drm_vram_helper 24576 1 bochs_drm
ghash_clmulni_intel 16384 0
drm_ttm_helper 16384 1 drm_vram_helper
aesni_intel 372736 0
snd_seq 73728 2 snd_seq_midi,snd_seq_midi_event
ttm 102400 2 drm_vram_helper,drm_ttm_helper
crypto_simd 16384 1 aesni_intel
cryptd 24576 2 crypto_simd,ghash_clmulni_intel
drm_kms_helper 225280 4 drm_vram_helper,bochs_drm
snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi
glue_helper 16384 1 aesni_intel
cec 53248 1 drm_kms_helper
snd_timer 40960 2 snd_seq,snd_pcm
rapl 20480 0
rc_core 53248 1 cec
fb_sys_fops 16384 1 drm_kms_helper
snd 94208 8 snd_seq,snd_seq_device,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_pcm,snd_rawmidi
xen_kbdfront 16384 1
input_leds 16384 0
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
joydev 28672 0
soundcore 16384 1 snd
sysimgblt 16384 1 drm_kms_helper
serio_raw 20480 0
efi_pstore 16384 0
mac_hid 16384 0
sch_fq_codel 20480 5
parport_pc 45056 0
ppdev 24576 0
lp 20480 0
parport 65536 3 parport_pc,lp,ppdev
drm 565248 7 drm_kms_helper,drm_vram_helper,bochs_drm,drm_ttm_helper,ttm
ip_tables 32768 0
x_tables 45056 1 ip_tables
autofs4 45056 2
hid_generic 16384 0
usbhid 57344 0
hid 135168 2 usbhid,hid_generic
floppy 86016 0
crc32_pclmul 16384 0
psmouse 159744 0
i2c_piix4 28672 0
pata_acpi 16384 0

root@zioma-HVM-domU:/home/zioma# lsmod | grep nvidia

root@zioma-HVM-domU:/home/zioma# cat /etc/modprobe.d/blacklist-
nouveau.conf
blacklist nouveau
options nouveau modeset=0

root@zioma-HVM-domU:/home/zioma# ubuntu-drivers devices

== /sys/devices/pci0000:00/0000:00:06.0 ==
modalias : pci:v000010DEd00001C02sv000019DAsd00002438bc03sc00i00
vendor : NVIDIA Corporation
model : GP106 [GeForce GTX 1060 3GB]
driver : nvidia-driver-450 - distro non-free
driver : nvidia-driver-435 - distro non-free
driver : nvidia-driver-455 - distro non-free recommended
driver : nvidia-driver-418-server - distro non-free
driver : nvidia-driver-390 - distro non-free
driver : nvidia-driver-450-server - distro non-free
driver : nvidia-driver-440-server - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin

root@zioma-HVM-domU:/home/zioma# apt install nvidia-driver-455

Lettura elenco dei pacchetti… Fatto
Generazione albero delle dipendenze
Lettura informazioni sullo stato… Fatto
nvidia-driver-455 è già alla versione più recente (455.28-0ubuntu1).
0 aggiornati, 0 installati, 0 da rimuovere e 0 non aggiornati.

I’m confused by the fact that I have installed the nvidia driver as u can see,but the module is not loaded and I didn’t blacklist it. Instead I have blacklisted the nouveau driver. This is what I found looking inside the dmesg

1.722380] nvidia: loading out-of-tree module taints kernel.
[ 1.722385] nvidia: module license ‘NVIDIA’ taints kernel.
[ 1.722385] Disabling lock debugging due to kernel taint
[ 1.747431] nvidia-nvlink: Nvlink Core is being initialized, major device number 237
[ 1.748229] xen: --> pirq=17 -> irq=40 (gsi=40)
[ 1.748537] nvidia 0000:00:06.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
[ 1.748547] NVRM: The NVIDIA GPU 0000:00:06.0
NVRM: (PCI ID: 10de:1c02) installed in this system has
NVRM: fallen off the bus and is not responding to commands.
[ 1.749089] nvidia: probe of 0000:00:06.0 failed with error -1
[ 1.749096] NVRM: The NVIDIA probe routine failed for 1 device(s).
[ 1.749097] NVRM: None of the NVIDIA devices were initialized.
[ 1.751019] audit: type=1400 audit(1604351188.896:2): apparmor=“STATUS” operation=“profile_load” profile=“unconfined” name="/usr/sbin/cups-browsed" pid=437 comm=“apparmor_parser”
[ 1.751021] audit: type=1400 audit(1604351188.896:3): apparmor=“STATUS” operation=“profile_load” profile=“unconfined” name="/usr/bin/man" pid=438 comm=“apparmor_parser”
[ 1.751023] audit: type=1400 audit(1604351188.896:4): apparmor=“STATUS” operation=“profile_load” profile=“unconfined” name=“man_filter” pid=438 comm=“apparmor_parser”
[ 1.751025] audit: type=1400 audit(1604351188.896:5): apparmor=“STATUS” operation=“profile_load” profile=“unconfined” name=“man_groff” pid=438 comm=“apparmor_parser”
[ 1.754292] audit: type=1400 audit(1604351188.900:6): apparmor=“STATUS” operation=“profile_load” profile=“unconfined” name=“nvidia_modprobe” pid=436 comm=“apparmor_parser”
[ 1.754294] audit: type=1400 audit(1604351188.900:7): apparmor=“STATUS” operation=“profile_load” profile=“unconfined” name=“nvidia_modprobe//kmod” pid=436 comm=“apparmor_parser”
[ 1.763930] nvidia-nvlink: Unregistered the Nvlink Core, major device number 237

So,what you sugged to me to do ?