Jump to content

So I have been attempting to pass through one of my 760's to use in a VM in Arch GNU/Linux using the guide found in this reddit post. Everything has gone smoothly so far except for the fact that when I run:

lspci -nnk

I get this:

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK104 [GeForce GTX 760] [10de:1187] (rev a1)
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:360b]
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia
01:00.1 Audio device [0403]: NVIDIA Corporation GK104 HDMI Audio Controller [10de:0e0a] (rev a1)
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:360b]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK104 [GeForce GTX 760] [10de:1187] (rev a1)
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:360b]
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia
02:00.1 Audio device [0403]: NVIDIA Corporation GK104 HDMI Audio Controller [10de:0e0a] (rev a1)
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:360b]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

The issue is that both GPU's have the same PCI ID (10de:1187, 10de:0e0a). This is stopping me from binding only the second card to pci-stub so the nvidia driver wont use it, and I can then pass it through to a VM. When I try binding the two given id's to pci-stub it stops nvidia from using both cards, and when I run "startx" it errors. I also compiled the linux-vfio kernel and I am currently using that.

Does anyone know a way to get the GPU's to have different PCI ID's? Any help would be appreciated, thanks in advance.

PC Specs: CPU: Intel Core i7 3930K OC @ 4.4 GHz | CPU Cooler: Corsair H105 | Motherboard: ASUS Sabertooth X79 | GPU: 2x SLI Gigabyte GTX 760 | RAM: Mushkin Redline 2x4GB 1866 | Case: Cooler Master HAF X | PSU: SeaSonic X Series 750W | Storage: A-Data XPG 120GB  & WD Blue 1TB | OS: Arch GNU/Linux || PC Part Picker & 3D Mark Score

Link to comment
https://linustechtips.com/topic/548592-both-gpus-have-same-pci-id/
Share on other sites

Link to post
Share on other sites

In looking at the comments at the top of the pci-stub source code, you will need to unbind the cards after you use the pci-stub.ids= boot parameter:

(code removed due to CloudFlare blocking the content... Click here, lines 9-16, to see what I am referring to)

 

In other words, 

echo -n 0000:02:00.0 > /sys/bus/pci/drivers/pci-stub/unbind
echo -n 0000:02:00.1 > /sys/bus/pci/drivers/pci-stub/unbind

then load the nvidia and snd_intel_hda module, which should now be able to use the "first" card (01:00.0 and .1):

modprobe nvidia
modprobe snd_intel_hda

 

The comments also gave a hint on how to tell other drivers to stop using a device, so instead of using pci-stub, see if this works:

echo -n 0000:02:00.0 > /sys/bus/pci/drivers/nvidia/unbind
echo -n 0000:02:00.1 > /sys/bus/pci/drivers/snd_hda_intel/unbind

This tells the nvidia and HDMI drivers to stop hogging the "second" card, thus freeing it for other use

CPU AMD 7800X3D | Cooling Noctua NH-D15 chromax.black | Motherboard ASUS PRIME X870-P WIFI | RAM Corsair Vengeance RGB 6GHz CL30 32GB | GPU EVGA GeForce RTX 3070 FTW3 Ultra Gaming |

Case Fractal Design Define R5 | Storage Samsung 980 PRO 500GB, Samsung 970 EVO+ "v2" 2TB | PSU Corsair RM850x 2021 | Display ASUS VP247QG + Samsung SyncMaster T220 | OS CachyOS

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×