You are not logged in.
Hello everyone,
I'm encountering a frustrating issue with my Arch Linux setup where my NVIDIA RTX 4060 Max-Q GPU is not being recognized within my virtual machine, even though I've successfully bound it to the vfio-pci driver.
I'm aiming to pass through the GPU for enhanced VM performance but am hitting a roadblock.
This setup is done on a Lenovo loq16APH18 Laptop.
I have followed the guide in the arch wiki found here:
https://wiki.archlinux.org/title/PCI_pa … al_machine
System Information:
OS: Arch Linux x86_64
Host: 82XU LOQ 16APH8
Kernel: 6.13.7-arch1-1
Shell: bash 5.2.37
Resolution: 1920x1200
CPU: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (16) @ 5.137GHz
GPU: AMD ATI 06:00.0 Phoenix1
GPU: NVIDIA GeForce RTX 4060 Max-Q / Mobile
Memory: 31270MiB
Problem Description:
I've configured my system to pass through my NVIDIA GPU to a virtual machine. The GPU is successfully bound to vfio-pci as shown by lspci -nnk, but when I attempt to install NVIDIA drivers within the VM, the GPU is not detected.
I have also installed the virtio drivers in the vm. Sometimes it does recognize it but it then does not install the drivers.
lspci -nnk output:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] [10de:28e0] (rev a1)
Subsystem: Lenovo Device [17aa:3c93]
Kernel driver in use: vfio-pci
Kernel modules: nouveau
01:00.1 Audio device [0403]: NVIDIA Corporation AD107 High Definition Audio Controller [10de:22be] (rev a1)
Subsystem: Lenovo Device [17aa:3c93]
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel
VM XML paste
https://pastebin.com/Bk6pFmJb
Troubleshooting Steps Taken:
Verified that IOMMU is enabled and functioning correctly.
Confirmed that the GPU and its audio device are in separate IOMMU groups.
Bound the GPU to vfio-pci using kernel parameters.
Checked BIOS/UEFI settings for virtualization and IOMMU options.
Thanks in advance!
Offline
when I attempt to install NVIDIA drivers within the VM, the GPU is not detected
Does it show up as PCI device in the guest OS at all?
What is the guest OS? Windows 11? Have you tried a different guest system (eg. some linux iso for lspci)?
Offline
I have ran a pci scan in my win11 guest OS and in a arch vm, both with the gpu passed through in the vm settings:
win11 dxdiag paste:
https://pastebin.com/D6vqsF4H
lspci in vm:
https://i.imgur.com/msw8Nso.png
I don't know if the redhat pci device is the gpu but other than that i don't see the gpu anywhere else.
Offline
Please don't post pictures of text, post the text
So the device doesn't show up in the client ("lspci -nn" would print vendor and product IDs, you're looking for VID 10de)
Did you simply forget to attach the device in the guest OS config?
https://wiki.archlinux.org/title/PCI_pa … al_machine
Offline
So after screwing around a bit in virt manager i noticed something.
When the VM is started the PCI devices dissapear from the list.
So i just tried to add the PCI device to the VM while it was running and miraculously it worked.
I am currently looking it attaching a monitor make a difference.
Offline