Pci-stub not claiming radeon card, only the audio device, radeon driver claiming graphics instead

no cigar

You are updating your boot loader after you make changes.....correct?

I use grub and after making the configuration changes ran the command...for me the UEFI configuration doesn't work.

grub2-mkconfig -o /etc/grub2.cfg

Then when I rebooted the machine I ran

cat /proc/cmdline

To make sure the command was executed, then ran

find /sys/kernel/iommu_groups/ -type l

And got a output that looked kinda' like this...

/sys/kernel/iommu_groups/0/devices/0000:00:00.0
/sys/kernel/iommu_groups/1/devices/0000:00:01.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.1
/sys/kernel/iommu_groups/2/devices/0000:00:02.0
/sys/kernel/iommu_groups/3/devices/0000:00:16.0
/sys/kernel/iommu_groups/4/devices/0000:00:1a.0
/sys/kernel/iommu_groups/5/devices/0000:00:1b.0
/sys/kernel/iommu_groups/6/devices/0000:00:1c.0
/sys/kernel/iommu_groups/7/devices/0000:00:1c.5
/sys/kernel/iommu_groups/8/devices/0000:00:1c.6
/sys/kernel/iommu_groups/9/devices/0000:00:1c.7
/sys/kernel/iommu_groups/9/devices/0000:05:00.0
/sys/kernel/iommu_groups/10/devices/0000:00:1d.0
/sys/kernel/iommu_groups/11/devices/0000:00:1f.0
/sys/kernel/iommu_groups/11/devices/0000:00:1f.2
/sys/kernel/iommu_groups/11/devices/0000:00:1f.3
/sys/kernel/iommu_groups/12/devices/0000:02:00.0
/sys/kernel/iommu_groups/12/devices/0000:02:00.1
/sys/kernel/iommu_groups/13/devices/0000:03:00.0
/sys/kernel/iommu_groups/14/devices/0000:04:00.0

I did all of this before trying to add pci-stub.ids=

So after I knew it all was working I added the pci-stub.ids= line and ran the grub make command again

grub2-mkconfig -o /etc/grub2.cfg

rebooted again and the monitor connected to the card being passed through went dark loosing signal from the host and stayed that way until I created the VM and installed win7.

I'm sure none of this will help you but sometimes looking at the steps others used might help.

yup, all clear on those

curious, are you using radeon cards? xen or qemu-kvm? kernel version? any information you could give me about your setup would be appreciated

From what I can tell from your dmesg output, pci-stub is trying to claim the card at 4.35 after radeon had already claimed it at 4.09.

Here: http://vfio.blogspot.ro/ Alex prevents that by adding rd.driver.pre=vfio-pci to grub kernel parameters. I think this is a dracut specific command, but there should be an equivalent on ubuntu.

There's a thread here about known good configurations (including banger's own setup): https://forum.teksyndicate.com/t/pci-passthrough-known-working-hardware/84152/4

1 Like

Kernel version is 4.x ( I take every system upgrade Fedora pushes out), I have 3 Radeon R9 270x cards (currently 2 to host and one to guest, (I run 4 monitors) but that will change to the other way around, using two in crossfire for the guest, at least I'm going to give it a try) using qemu-kvm, the 8 core cpu is providing 6 of the cores to the guest, I also have 32g of ram which the guest is getting 16 of that but will probably change to 24g in the future, I also pass through using pci-stub a Intel gigabit NIC, then other assorted usb devices are passed to the guest using virt-manager. (and yes I'm running a 1050w seasonic ps)

My end goal is to create a KVM as close to running windows on bare metal as I can, like you I bought specific hardware with the intent of building a killer KVM, I have been able to run any game I have tried with no problems other than the above mentioned sound choppiness that I can cure with a USB sound card, I've been able to run Adobe products with no issues other than slow disk writes that I need to work on, but so far I'm sold and will never go back to anything but a configuration like I'm running now.

I think @Ksajal found your problem..... :)

cant see anything like it, figure it would probably be easier to just go
ahead and install dracut on ubuntu, providing it doesnt cause issues

i think he has

are you passing the virtual machine a physical disk or a disk image? if physical, is it an SSD or a HDD?

I give the KVM a entire 1tb HD, I built a lot of test KVMs first using the default 20g then when I got the pass through to work built a couple more giving them their own HD, I finally settled on just giving the guest a entire 1tb drive because once it was golden I wanted to make a KVM that I didn't have to worry about running out of drive space and had enough room to install anything I might want......I'm not through testing, but the setup I have running now is very stable and allows me to do pretty much whatever I could on a bare metal windows install.

Another thread here on the Tek that you might find enlightening is this.....

https://forum.teksyndicate.com/t/gpu-passthrough-with-kvm-have-your-cake-and-eat-it-too/82250

This thread is where several of us post our current progress in PCI pass through and general KVM question and answers.


well, looks like im not installing dracut on ubuntu

Yeah I started out on Ubuntu, then tried Ubuntu Gnome, then went to openSuse, then finally settled on Fedora, I would have liked to stay on Suse because I liked the interface but in the end Fedora is just fine and everything works as expected.

i have a love hate relationship with fedora though. whenever i dont have it, i want it, and whenever i have it, i want rid of it.

Initramfs-tools does the same thing as dracut, it enables you to customize the initramfs. You could use that to make sure that pci-stub (or vfio) is loaded before the drivers.

1 Like

i cant actually see anything similar in function to that particular piece of dracut functionality

maybe i just need to look harder and read more

its right there in the manpage

nice

Good luck....