Is it normal this gets spammed?
Feb 06 18:57:29 Y4M1-II kernel: nvidia-nvlink: Unregistered Nvlink Core, major device number 507
Feb 06 18:57:29 Y4M1-II kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 507
Feb 06 18:57:29 Y4M1-II kernel: NVRM: GPU 0000:0f:00.0 is already bound to vfio-pci.
Feb 06 18:57:29 Y4M1-II kernel: NVRM: The NVIDIA probe routine was not called for 1 device(s).
Feb 06 18:57:29 Y4M1-II kernel: NVRM: This can occur when another driver was loaded and
NVRM: obtained ownership of the NVIDIA device(s).
Feb 06 18:57:29 Y4M1-II kernel: NVRM: Try unloading the conflicting kernel module (and/or
NVRM: reconfigure your kernel without the conflicting
NVRM: driver(s)), then try loading the NVIDIA kernel module
NVRM: again.
Feb 06 18:57:29 Y4M1-II kernel: NVRM: No NVIDIA devices probed.
Feb 06 18:57:29 Y4M1-II kernel: nvidia-nvlink: Unregistered Nvlink Core, major device number 507
Feb 06 18:57:29 Y4M1-II kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 507
Feb 06 18:57:29 Y4M1-II kernel: NVRM: GPU 0000:0f:00.0 is already bound to vfio-pci.
Feb 06 18:57:29 Y4M1-II kernel: NVRM: The NVIDIA probe routine was not called for 1 device(s).
Feb 06 18:57:29 Y4M1-II kernel: NVRM: This can occur when another driver was loaded and
NVRM: obtained ownership of the NVIDIA device(s).
Feb 06 18:57:29 Y4M1-II kernel: NVRM: Try unloading the conflicting kernel module (and/or
NVRM: reconfigure your kernel without the conflicting
NVRM: driver(s)), then try loading the NVIDIA kernel module
NVRM: again.
Feb 06 18:57:29 Y4M1-II kernel: NVRM: No NVIDIA devices probed.
Feb 06 18:57:29 Y4M1-II kernel: nvidia-nvlink: Unregistered Nvlink Core, major device number 507
Feb 06 18:57:29 Y4M1-II kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 507
Also, I can’t seem to probe the driver with nvidia-smi
0f:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD107 [GeForce RTX 4060] [10de:2882] (rev a1)
Subsystem: Gigabyte Technology Co., Ltd AD107 [GeForce RTX 4060] [1458:4116]
Kernel driver in use: vfio-pci
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
0f:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:22be] (rev a1)
Subsystem: Gigabyte Technology Co., Ltd Device [1458:4116]
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
> 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.
> cat /usr/local/bin/nvidia-reattach.sh
#! /usr/bin/bash
virsh nodedev-reattach pci_0000_0f_00_1
virsh nodedev-reattach pci_0000_0f_00_0
echo 0000:0f:00.0 > /sys/bus/pci/drivers/vfio-pci/unbind
echo 0000:0f:00.1 > /sys/bus/pci/drivers/vfio-pci/unbind
modprobe nvidia_drm modeset=off
modprobe nvidia_modeset
modprobe nvidia_uvm
modprobe nvidia
echo 0000:0f:00.1 > /sys/bus/pci/drivers/snd_hda_intel/bind
Detaching seems to work as expected:
> cat /usr/local/bin/nvidia-detach.sh
#! /usr/bin/bash
virsh nodedev-detach pci_0000_0f_00_1
virsh nodedev-detach pci_0000_0f_00_0
0f:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD107 [GeForce RTX 4060] [10de:2882] (rev a1)
Subsystem: Gigabyte Technology Co., Ltd AD107 [GeForce RTX 4060] [1458:4116]
Kernel driver in use: vfio-pci
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
0f:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:22be] (rev a1)
Subsystem: Gigabyte Technology Co., Ltd Device [1458:4116]
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel