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

atidriverskernelradeon

im trying to bind my spare radeon card to pci-stub on kubuntu 15.04, ive got this for my boot options

dmesg | grep pci-stub

[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.19.0-15-generic root=/dev/mapper/kubuntu–vg-root ro quiet splash pci-stub.ids=1002:6779,1002:aa98 vt.handoff=7

but later on in the output i get this

[ 4.349476] pci-stub: add 1002:6779 sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000

[ 4.349485] pci-stub: add 1002:AA98 sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000

[ 4.349504] pci-stub 0000:02:00.1: claimed by stub

i grepped for radeon in my dmesg output, and indeed its only claiming the sound output device and radeons taking the graphics device, anyone know what the hell is going on?

lspci | Radeon

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X]

01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti XT HDMI Audio [Radeon HD 7970 Series]

02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM]

02:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Caicos HDMI Audio [Radeon HD 6400 Series]

lspci -n | grep 02:00.

02:00.0 0300: 1002:6779

02:00.1 0403: 1002:aa98

Best Answer

This is happening because the radeon module is taking control of the device before pci-stub, so you need to reverse the load order.

Blacklist the radeon module:

$ echo blacklist radeon | sudo tee -a /etc/modprobe.d/blacklist.conf

And add the module to initramfs:

$ echo radeon | sudo tee -a /etc/initramfs-tools/modules
$ sudo update-initramfs -u

After, reboot. Problem solved!

Related Question