Passthrough is not working with Nvidia GTX 1080 Ti!

I’ve tried just about every single guide out there… I’ve been trying for hours to get vfio to use the GTX 1080 ti but every time I type “lspci -v” I get the following results:

01:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: Gigabyte Technology Co., Ltd Device 374c
	Flags: bus master, fast devsel, latency 0, IRQ 155
	Memory at ee000000 (32-bit, non-prefetchable) [size=16M]
	Memory at d0000000 (64-bit, prefetchable) [size=256M]
	Memory at e0000000 (64-bit, prefetchable) [size=32M]
	I/O ports at e000 [size=128]
	Expansion ROM at ef000000 [disabled] [size=512K]
	Capabilities: <access denied>
	Kernel driver in use: nouveau
	Kernel modules: nouveau

01:00.1 Audio device: NVIDIA Corporation GP102 HDMI Audio Controller (rev a1)
	Subsystem: Gigabyte Technology Co., Ltd Device 374c
	Flags: bus master, fast devsel, latency 0, IRQ 17
	Memory at ef080000 (32-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

It should be that vfio is using the both of those devices and the system should be using integrated graphics. I don’t know how to proceed from here… Initially I tried to get this working on Ubuntu 18.04 then I installed Fedora workstation 31 and it’s still not working.

How can I get vfio to use the 1080 ti?

A few things:

  • Is vfio-pci loaded into the initrd?

  • Have you specified the PCIe IDs as arguments to vfio-pci?

  • Lastly, try blacklisting the conflicting drivers. Specifically, blacklist nouveau.

Yes, I have done all this already and when I blacklist nouveau I am not able to login to desktop at all (blackscreens) I don’t really understand why… My processor has build in graphics and my motherboard settings already has VT-d + onboard /integrated graphics enabled.

I also tried using this script to do the installation for me github: passthrough_helper_fedora

Black screens following blacklisting nouveau sounds like no driver is grabbing the device, meaning no video output. Historically, I’ve seen the audio device grabbed by vfio-pci without needing to blacklist snd_hda_intel, but not seeing that leads me to believe there’s a configuration problem. Can you ssh into the system after blacklisting nouveau and confirm whether vfio-pci is bound to the video device?

Can you provide the output of cat /proc/cmdline?

Is there any relevant dmesg output? Specifically, we’re looking for the line:

DMAR: Intel(R) Virtualization Technology for Directed I/O

(or the AMD equivalent) to show intel_iommu=on actually took, and any mention of vfio.

1 Like

Here are the details of that command:
BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.3.7-301.fc31.x86_64 root=/dev/mapper/fedora_localhost–live-root ro resume=/dev/mapper/fedora_localhost–live-swap rd.lvm.lv=fedora_localhost-live/root rd.lvm.lv=fedora_localhost-live/swap rhgb quiet intel_iommu=on iommu=pt rd.driver.pre=vfio-pci

When I type lspci -f i see that vfio-pci is using NVIDIA Corporation GP102 HDMI Audio Controller but it’s not using NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1) (prog-if 00 [VGA controller]) some online guides suggested inserting

vfio
vfio_iommu_type1
vfio_pci ids=10de:1b81,10de:10f0
vfio_virqfd
vhost-net

into ```
etc/initramfs-tools/modules

but when I navigate to /etc/initramfs-tools/modules I get an error “the directory does not exist”

You could add them to a file

/etc/modprobe.d/vfio.conf

If it does not exist, save it, so it does now, then regenerate the initrd

dracut --force --regenerate-all

[edit: removed _pci from filename]

okay, first, make sure you’ve got this:

/etc/modprobe.d/vfio.conf

softdep nvidia pre: vfio vfio-pci
softdep nouveau pre: vfio vfio-pci
softdep nvidia* pre: vfio vfio-pci
softdep nvidia_drm pre: vfio vfio-pci
options vfio-pci ids=10de:1b81,10de:10f0

You need to softdep vfio.

All these other tricks don’t seem to work quite as well as softdep

It looks like you’re using Fedora. /etc/initramfs-tools is Debian-specific, so don’t worry about it.

Seeing that vfio-pci has control of your audio controller is good! The configuration is mostly correct (see the above comments. I’m not familar with how Fedora handles initrd generation). nouveau typically takes precedence over vfio_pci during boot, so blacklisting it leaves the video controller for vfio_pci to take.

Were you able to ssh into the host to see if vfio-pci has bound to the video controller? If that’s the case, you’ll just need to configure X11/Wayland to render on the iGPU.

1 Like

Perhaps recommending a guide:

Or the site (cert expired dec 2019? I can’t be the only visitor?)

but the origional VFIO guy’s 5 part guide is worth reading too, even if a quarter of the stuff is outdated?

1 Like

So I added those softdep commands and saved the file but it appears my entire operating system is bricked now. When I turn my pc on all I see is a never ending aorus logo (that is when I try to boot fedora)

It seems I can still get into the os with fedora rescue though hmppph. Very odd… I don’t know what’s happening

Yeah, my blog is pretty much dead, actually.

Okay, let’s start from the beginning.

I’ll need full pc specs, output of iommu.sh*, and full lspci -knn output.

iommu.sh:

#!/bin/bash
shopt -s nullglob
for d in /sys/kernel/iommu_groups/*/devices/*; do 
    n=${d#*/iommu_groups/*}; n=${n%%/*}
    printf 'IOMMU Group %s ' "$n"
    lspci -nns "${d##*/}"
done;

And make sure @jx455 is using 2 cards; efifb is a bugger, especially if you can’t get a working rom to pass back through later. RIP my weekend.

1 Like
IOMMU Group 0 00:00.0 Host bridge [0600]: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers [8086:3ec2] (rev 07)
IOMMU Group 10 00:1b.4 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #21 [8086:a2eb] (rev f0)
IOMMU Group 11 00:1c.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #1 [8086:a290] (rev f0)
IOMMU Group 12 00:1c.4 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #5 [8086:a294] (rev f0)
IOMMU Group 13 00:1c.6 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #7 [8086:a296] (rev f0)
IOMMU Group 14 00:1d.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #9 [8086:a298] (rev f0)
IOMMU Group 15 00:1f.0 ISA bridge [0601]: Intel Corporation Z370 Chipset LPC/eSPI Controller [8086:a2c9]
IOMMU Group 15 00:1f.2 Memory controller [0580]: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller [8086:a2a1]
IOMMU Group 15 00:1f.3 Audio device [0403]: Intel Corporation 200 Series PCH HD Audio [8086:a2f0]
IOMMU Group 15 00:1f.4 SMBus [0c05]: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller [8086:a2a3]
IOMMU Group 16 00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I219-V [8086:15b8]
IOMMU Group 17 05:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 [144d:a808]
IOMMU Group 18 07:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM2142 USB 3.1 Host Controller [1b21:2142]
IOMMU Group 19 08:00.0 Network controller [0280]: Intel Corporation Wireless 3165 [8086:3165] (rev 81)
IOMMU Group 1 00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 07)
IOMMU Group 1 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] [10de:1b06] (rev a1)
IOMMU Group 1 01:00.1 Audio device [0403]: NVIDIA Corporation GP102 HDMI Audio Controller [10de:10ef] (rev a1)
IOMMU Group 2 00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 630 (Desktop) [8086:3e92]
IOMMU Group 3 00:08.0 System peripheral [0880]: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model [8086:1911]
IOMMU Group 4 00:14.0 USB controller [0c03]: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller [8086:a2af]
IOMMU Group 5 00:16.0 Communication controller [0780]: Intel Corporation 200 Series PCH CSME HECI #1 [8086:a2ba]
IOMMU Group 6 00:17.0 SATA controller [0106]: Intel Corporation 200 Series PCH SATA controller [AHCI mode] [8086:a282]
IOMMU Group 7 00:1b.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #17 [8086:a2e7] (rev f0)
IOMMU Group 8 00:1b.2 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #19 [8086:a2e9] (rev f0)
IOMMU Group 9 00:1b.3 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #20 [8086:a2ea] (rev f0)

^ iommu.sh output

00:00.0 Host bridge [0600]: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers [8086:3ec2] (rev 07)
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:5000]
	Kernel driver in use: skl_uncore
	Kernel modules: ie31200_edac
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 07)
	Kernel driver in use: pcieport
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 630 (Desktop) [8086:3e92]
	DeviceName:  Onboard IGD
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:d000]
	Kernel driver in use: i915
	Kernel modules: i915
00:08.0 System peripheral [0880]: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model [8086:1911]
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:5000]
00:14.0 USB controller [0c03]: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller [8086:a2af]
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:5007]
	Kernel driver in use: xhci_hcd
00:16.0 Communication controller [0780]: Intel Corporation 200 Series PCH CSME HECI #1 [8086:a2ba]
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:1c3a]
	Kernel driver in use: mei_me
	Kernel modules: mei_me
00:17.0 SATA controller [0106]: Intel Corporation 200 Series PCH SATA controller [AHCI mode] [8086:a282]
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:b005]
	Kernel driver in use: ahci
00:1b.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #17 [8086:a2e7] (rev f0)
	Kernel driver in use: pcieport
00:1b.2 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #19 [8086:a2e9] (rev f0)
	Kernel driver in use: pcieport
00:1b.3 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #20 [8086:a2ea] (rev f0)
	Kernel driver in use: pcieport
00:1b.4 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #21 [8086:a2eb] (rev f0)
	Kernel driver in use: pcieport
00:1c.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #1 [8086:a290] (rev f0)
	Kernel driver in use: pcieport
00:1c.4 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #5 [8086:a294] (rev f0)
	Kernel driver in use: pcieport
00:1c.6 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #7 [8086:a296] (rev f0)
	Kernel driver in use: pcieport
00:1d.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #9 [8086:a298] (rev f0)
	Kernel driver in use: pcieport
00:1f.0 ISA bridge [0601]: Intel Corporation Z370 Chipset LPC/eSPI Controller [8086:a2c9]
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:5001]
00:1f.2 Memory controller [0580]: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller [8086:a2a1]
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:5001]
00:1f.3 Audio device [0403]: Intel Corporation 200 Series PCH HD Audio [8086:a2f0]
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:a036]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
00:1f.4 SMBus [0c05]: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller [8086:a2a3]
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:5001]
	Kernel driver in use: i801_smbus
	Kernel modules: i2c_i801
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I219-V [8086:15b8]
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:e000]
	Kernel driver in use: e1000e
	Kernel modules: e1000e
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] [10de:1b06] (rev a1)
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:374c]
	Kernel driver in use: nouveau
	Kernel modules: nouveau
01:00.1 Audio device [0403]: NVIDIA Corporation GP102 HDMI Audio Controller [10de:10ef] (rev a1)
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:374c]
	Kernel driver in use: vfio-pci
	Kernel modules: snd_hda_intel
05:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 [144d:a808]
	Subsystem: Samsung Electronics Co Ltd Device [144d:a801]
	Kernel driver in use: nvme
	Kernel modules: nvme
07:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM2142 USB 3.1 Host Controller [1b21:2142]
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:5007]
	Kernel driver in use: xhci_hcd
08:00.0 Network controller [0280]: Intel Corporation Wireless 3165 [8086:3165] (rev 81)
	Subsystem: Intel Corporation Dual Band Wireless AC 3165 [8086:4010]
	Kernel driver in use: iwlwifi
	Kernel modules: iwlwifi

@SgtAwesomesauce sure there you go.

PC:
Intel core i7 8700k 4.8 OC
Asus z370 gaming aorus wifi
G.Skill Ripjaws 3600 mhz 16 GB ram
GTX 1080 Ti GPU

Alright, first thing’s first:

You only have one DGPU, so you need to have your displays plugged into your motherboard and your boot gpu set to the igpu on your bios.

I thought Aorus was gigabyte.


Your IOMMU groups are valid, so that’s good.

Let’s make boot verbose for debugging purposes. Go into /etc/default/grub and edit the commandline_default entry and remove rhgb and quiet


Now, lastly, we’ll need to go into /etc/dracut.conf and find add_drivers+= and add the following in there:

vfio vfio_pci vfio_iommu_type1 vfio_virqfd

Once this is done, regenerate your initrd with dracut and rebuild your grub config.

Reboot and let me know if things don’t work properly.

1 Like

Hey that fixed it! The problem was my hdmi was plugged into the gpu and that was causing the os to freeze. I plugged directly into my MBA and now I can see that vfio is using the gpu. Sorry for the rookie mistake and appreciate the help. Lol

2 Likes

What was happening was the bios would initialize the GPU, then grub would boot the kernel. The kernel would then bind the vfio module to the GPU, which puts it in a powered-off state. The OS wasn’t frozen, you just weren’t seeing the display manager show up because the GPU wasn’t being recognized as a GPU.


No shame in this sort of thing. This is a more advanced project and almost nobody gets it right the first time around. I’ve made probably 5-10 threads about problems with passthrough on this forum.

Let me know if you’ve got any other questions or problems, I’m happy to help.

1 Like