KVM help - PCI unbind

Okay so I am trying to bind my GPU to a Windows 7 guest using the Unbind method, so I managed to unbind it and it out right crashed Fedora so I tried it again and I got a few errors.

1 Segmentation Fault
2 Using echo "1002 6738" > /sys/bus/pci/drivers/pci-stub/new_id just does nothing
3 using echo 0000:01:00.0 > /sys/bus/pci/devices/0000:01:00.0/driver/unbind returns no such file or directory.

This is my lspci -n readout 

00:00.0 0600: 8086:0100 (rev 09)
00:01.0 0604: 8086:0101 (rev 09)
00:02.0 0300: 8086:0102 (rev 09)
00:14.0 0c03: 8086:1e31 (rev 04)
00:16.0 0780: 8086:1e3a (rev 04)
00:19.0 0200: 8086:1503 (rev 04)
00:1a.0 0c03: 8086:1e2d (rev 04)
00:1b.0 0403: 8086:1e20 (rev 04)
00:1d.0 0c03: 8086:1e26 (rev 04)
00:1f.0 0601: 8086:1e44 (rev 04)
00:1f.2 0106: 8086:1e02 (rev 04)
00:1f.3 0c05: 8086:1e22 (rev 04)
01:00.0 0300: 1002:6738 <-- My AMD 6870 which I am trying to unbind
01:00.1 0403: 1002:aa88

The lspci readout for my GPU

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Barts XT [Radeon HD 6870]


So is there a script or something someone can create for me to make this work with my GPU, using my stub id? or can anyone offer any advice towards how to get this working, I managed to unbind it once, which when I switched my DVI connection over to my IGPU was just a fedora logo all white.

Any advice?


reset your machine with the gpu not bound/disabled. When linux touches that video card, the windows drivers will never load properly. You have to ensure the video card is not touched but linux during bootup in order to pass it through properly.


So I have to edit the grub config to ignore my GPU?

I have seen this done but only on Arch linux not in Fedora 20.

yeah, when I did this I had to modify the boot line to get linux to ignore the video card. after that it worked perfectly


Okay thank you very much.

What distro was this on, I was tempted to switch to CentOS over Fedora just for stability, would use Debian but it doesn't seem to link running on my hardware, just get a black blinking line.

Easiest method is to set the primary adapter in BIOS.

You can't unbind a working adapter.

You also can't be using binary blobs.

CentOS isn't that much more "stable" than Fedora, with Fedora at least you'll get a more recent kvm version. I'd go for a more recent kvm version.

In Debian you have to change the boot options, in Fedora you don't. If you're going to use kvm in Debian, don't use virt-manager or Boxes, use command line, same goes for lxc. In Fedora or other modern distros that have full functionality, it's better to use either Boxes in Gnome, or virt-manager in everything else for both kvm/qemu and lxc.