Need help with PCI Passthrough, Fedora 26

Hi, I’m trying to find some assistance in getting my gpu passthrough setup to run windows in a virtual machine inside fedora 26. Everything I’ve read about my hardware says it all should be compatible but I continue to run into an issue. Prior to making any changes to my configuration; I cannot get any display from my igpu ports. The monitor plugged into my igpu has no signal. If I disconnect my nvidia card from my mobo and reboot “only” using my igpu; everything works fine…
After using pci-stub to prevent fedora from grabbing my nvidia card (with one monitor plugged into the nvidia and one into the igpu) *not sure if it matters but from within bios I also have integrated gpu enabled and set as the default *… the post shows up on my igpu display but the linux kernel is loaded and displayed on my nvidia monitor. After stating GDM has been successfully started; nothing happens. The igpu monitor stays blank showing no signal being input, and the nvidia monitor simply shows gdm started.

[tandrias@localhost ~]$ inxi -F
System:    Host: localhost.localdomain Kernel: 4.12.9-300.fc26.x86_64 x86_64
           bits: 64
           Desktop: Gnome 3.24.3 Distro: Fedora release 26 (Twenty Six)
Machine:   Device: desktop Mobo: HP model: 82F1 v: 1.01 UEFI: AMI v: F.10 date: 03/30/2017
CPU:       Quad core Intel Core i5-7400 (-MCP-) cache: 6144 KB
           clock speeds: max: 3500 MHz 1: 1129 MHz 2: 896 MHz 3: 945 MHz
           4: 1525 MHz
Graphics:  Card: NVIDIA GP106 [GeForce GTX 1060 3GB]
           Display Server: wayland (X.org 119.3 ) driver: nouveau
           Resolution: [email protected]
           OpenGL: renderer: Gallium 0.4 on NV136 version: 4.2 Mesa 17.1.7
Audio:     Card-1 NVIDIA GP106 High Def. Audio Controller
           driver: snd_hda_intel
           Card-2 Intel Sunrise Point-H HD Audio driver: snd_hda_intel
           Sound: ALSA v: k4.12.9-300.fc26.x86_64
Network:   Card-1: Intel Device 24fb driver: iwlwifi
           IF: wlp3s0 state: up speed: N/A duplex: N/A mac: b0:35:9f:04:12:bc
           Card-2: Realtek RTL8111/8168/8411 PCIE Gigabit Ethernet Controller
           driver: r8169
           IF: enp4s0 state: down mac: 10:05:01:43:f0:6e
Drives:    HDD Total Size: 2250.4GB (0.7% used)
           ID-1: /dev/sda model: WDC_WD10EZEX size: 1000.2GB
           ID-2: /dev/sdb model: WDC_WD2500AAJS size: 250.0GB
           ID-3: /dev/sdc model: ST9500325AS size: 500.1GB
           ID-4: USB /dev/sdd model: FreeAgent size: 500.1GB
Partition: ID-1: / size: 49G used: 6.2G (14%) fs: ext4 dev: /dev/dm-0
           ID-2: /boot size: 976M used: 143M (16%) fs: ext4 dev: /dev/sdb2
           ID-3: /home size: 171G used: 535M (1%) fs: ext4 dev: /dev/dm-2
           ID-4: swap-1 size: 8.40GB used: 0.00GB (0%)
           fs: swap dev: /dev/dm-1
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 43.0C mobo: 27.8C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 288 Uptime: 32 min Memory: 2103.1/7986.2MB
           Client: Shell (bash) inxi: 2.3.31

Any assistance would be greatly appreciated. Am happy to provide any sysinfo .
Thank you

Still a bit new on PCI passthrough myself, but I had to manually change the Device in my xorg.conf that was being used by my Screen. Granted, I’m using two dedicated graphics cards rather than a graphics card and igpu, but if you need to do something like this:

  1. Wait for somebody to confirm that this is true for embedded GPUs as well, or do some research for yourself.
  2. ALWAYS save a backup of xorg.conf. (I usually just make a copy of it at xorg.conf.old) If your screen doesn’t display anything, use an alternate teletype to undo anything (CTRL + ALT + F1-6). To get back to the GUI afterwards if/when you restart X, use CTRL + ALT + F7.
  3. Edit /etc/X11/xorg.conf And make sure that your igpu (in my case was a second graphics card) is the Device presented to the Screen. In my case, I basically just had to edit the “Card0” to “Card1”, so I’m not 100% sure this would apply to an igpu.
  4. Restart X, or reboot. Otherwise your changes won’t take effect.

Extra) Because of how my motherboard looks at the PCI slots, my passthrough GPU is seen first (I could swap them if I want, but I like it this way). To make sure that the kernel does not try to load the graphics driver for my passthrough GPU, I had to blacklist the module so that vfio-pci could load first. I’m not going to explain how to do that unless that is needed for you, as you should be aware of any implications in blacklisting a module before doing so. I just thought I would pass on what I had to do in case you run “lspci -nnk -d ####:####” and vfio-pci is not your kernel driver when everything is said and done. Took me almost a full day to figure out that I had to blacklist the default video module, because my audio was passed through just fine. That said, my passthrough GPU uses “amdgpu” and my host GPU uses “radeon”, so I didn’t have any issues with my other card by blacklisting my passthrough GPU.

TL;DR: You should check/change your X configuration and restart GDM.

EDIT: Let me know if I need to clarify anything, will gladly assist as needed.

1 Like