VFIO passthrough wrong monitor?

I am using QEMU/KVM on virt-manager. I am total noob at this so I would really appreciate if someone could help me out. My only issue is that I am not getting a GPU output to my guest monitor (ASUS ROG PG279Q) which is connected via DP; the screen lights up for a second and then goes to sleep mode. But if I plug in my host monitor into my GPU via DP (which is connected to the MoBo with HDMI already) , it boots up to UEFI shell. Is this issue related to my monitor or am I missing something?

  • System: Manjaro

  • CPU: Intel i7-6700k

  • MOBO: MSI z270 Gaming Pro Carbon

  • HOST GPU: IGFX

  • GUEST GPU: Nvidia GTX 1080 (PCI slot 1, DP)

IOMMU group:

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) 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP104 [GeForce GTX 1080] [10de:1b80] (rev a1) 01:00.1 Audio device [0403]: NVIDIA Corporation GP104 High Definition Audio Controller [10de:10f0] (rev a1)

lspci -nnk:

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP104 [GeForce GTX 1080] [10de:1b80] (rev a1) Subsystem: Micro-Star International Co., Ltd. [MSI] GP104 [GeForce GTX 1080] [1462:3362] Kernel driver in use: vfio-pci Kernel modules: nouveau 01:00.1 Audio device [0403]: NVIDIA Corporation GP104 High Definition Audio Controller [10de:10f0] (rev a1) Subsystem: Micro-Star International Co., Ltd. [MSI] GP104 High Definition Audio Controller [1462:3362] Kernel driver in use: vfio-pci Kernel modules: snd_hda_intel

dmesg VFIO:

[ 1.332863] VFIO - User Level meta-driver version: 0.3 [ 1.335623] vfio_pci: add [8086:1901[ffffffff:ffffffff]] class 0x000000/00000000 [ 1.335648] vfio-pci 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none [ 1.352404] vfio_pci: add [10de:1b80[ffffffff:ffffffff]] class 0x000000/00000000 [ 1.369095] vfio_pci: add [10de:10f0[ffffffff:ffffffff]] class 0x000000/00000000 [ 2.829538] vfio-pci 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none [ 102.025755] vfio-pci 0000:01:00.0: enabling device (0000 -> 0003) [ 102.026127] vfio-pci 0000:01:00.0: vfio_ecap_init: hiding ecap 0x19@0x900 [ 965.935755] vfio-pci 0000:01:00.0: vfio_ecap_init: hiding ecap 0x19@0x900

Any help is appreciated and if you need any info please let me know.
I’ve looked everywhere and I think I have a unique case?..At least I think so

I also have my XML but it is on a pastebin and I cant post links, let me know if I need to just post it here.

TL:DR SOLUTION: Things I did just in case someone has the same issue:

  1. Launched VM and navigated using the wrong monitor.
  2. Install Geforce Experience and updated my drivers.
  3. Used this guide https://passthroughpo.st/apply-error-43-workaround/ for error 43 and if nvidia drivers wouldn’t install.
  4. Reboot VM.

Hello there and welcome to lvl1techs!

Here are some useful links I’ve gathered. I too fell in the gpu-passthrough rabbithole.
I’m sure this is familiar but I’ve gotta link it anyway: Archwiki PCI_passthrough
More info: single-gpu passthrough
Even more info: Single-gpu-passthrough
lvl1techs megathread regarding vfio

Could you explain a little more about your situation? From what I gather you are trying to run windows from linux via virt-manager? Are you able to boot into windows without the passthrough?

Yes, I’m trying to run windows through virt-manager. I think I got the passthrough to work but it just won’t display on the desired guest monitor. I haven’t tried to boot into windows without the passthrough. I’m going to upload a video to show more about my situation soon.

Here is a video showing whats happening.

I have tried to just unplug the DP connecting to my host monitor completely and even then the guest monitor does not display anything at all.

Right, waatched the vid, and as you guessed, the system is defaulting to using the “host” monitor as the primary display when both are plugged in, even if you switch the cables aroud?

I would ask if you could use just the “guest” monitor for the host (plugged direct to motherboard) and the “host” screen in the GPU for the guest, to see if each will run single monitor mode? as a trial

I’ll give it a go right now

1 Like

Cool, if the screens work the “wrong” way around, I would presume there is some problem with a connector or cable, and try to play with the combination of cables or ports until it works?

If the “guest” screen still does not work connected to the motherboard, I’d confirm the monitor definitely works? I haven’t come across a monitor that didn’t even just dumb down if advanced features weren’t enabled, But I can;t rule it out. Also maybe check any OSD / settings on guest, in case some crazy profile is set, or timeout, or super low brightness by accident. Or even some bit of fluff / dirt in a socket :man_shrugging:

Anyway, I gotta hit the hay, it’s 02:07 and I got work tomorrow.

No problem, thanks for replying/helping. I’ll update the thread when I finish with testing

1 Like

After testing:

I’ll refer to the monitors as monitor 1 and monitor 2, monitor 1 being the guest monitor (the one on the left in video) and monitor 2 (right monitor) being the the host pc.

I did what you said and made monitor 1 the host pc to see where the VM would launch and it booted into monitor 2.

Next test I used monitor 1 again as host, and monitor 1 was the only thing connected to the GPU; monitor 2 was not connected by any means. Launching VM and checking monitor 1 for display port output yielded no results.

I swapped the display ports and did the same test – yielding same results as above.

For some reason, my GPU only likes monitor 2; monitor 1 is just not being seen by the GPU?
Monitor 1 works completely fine and is not broken whatsoever. As I have dual boot windows in another hard drive and play games in that windows installation.

As far as I know GPU will select which ever monitor they are comfortable with. With my GTX 560 it at first took dvi port that has HDMI adapter connected to HDMI switch, but at some point switched to a monitor directly connected to HDMI so nothing is in between. RTX 2070 on the other hand always like direct HDMI over DP to HDMI adapter that goes to a switch.
Try using HDMI cable to monitor 1 if you have the option.

Edit: I have a few issues with monitors and adapters. For 1 DP to adapter can’t do 21:9 resolution or even detect monitor is capable of it. My other monitor has really loose HDMI connection that some times GPU fail to see it’s even connected.

I have the older version of ASUS ROG PG279Q as my main monitor (PG278Q) - It’s a bit finicky. It would not work without the nvidia-drivers in linux. so YMMV

You need to get troubleshoot why the uefi shell pops up when you boot your vm. It should boot straight into windows if everything is configured ok. Have you made sure to read and complete these steps in the archwiki: (Setting_up_an_OVMF-based_guest_VM)

Also be aware of this from the archwiki:
"It is possible you will be dropped into the UEFI menu instead of starting the installation upon powering your VM for the first time. Sometimes the correct ISO file was not automatically detected and you will need to manually specify the drive to boot. By typing exit and navigating to “boot manager” you will enter a menu that allows you to choose between devices. "

I got it working following those steps. I booted first into windows without the passthrough to install it and make sure all is ok for booting. then I attached the gpu to the VM and booted again and installed nvidia drivers + fixed error code 43

Good luck! :slight_smile:

2 Likes

Thanks, I’ll try this in the morning. I’ll be sure to update if it works.

Tried this, unfortunately it didn’t work aswell. Thank for trying to help.

Quick question, so would I need to update my nvidia drivers within my host pc during passthrough or just in my guest pc?

Only guest pc. Read my earlier comment - You need to select your boot media when the uefi shell boots up.

::EDIT:: When you are able to boot into windows - your guest monitor (asus rog) should just start working.

Have you been able to boot into the vm windows w/o the passthru? Have you installed the vm windows? It seems you are halfway there as you are able to see the uefi shell.

Hey, just came back to confirm it was the indeed the drivers at fault! Updated my GPU drivers within the guest pc and sure enough the monitor loaded when rebooted. Thank you, and to everyone that had helped me.

Things I did just in case someone has the same issue:

  1. Launched VM and navigated using the wrong monitor.
  2. Install Geforce Experience and updated my drivers.
  3. Used this guide https://passthroughpo.st/apply-error-43-workaround/ for error 43 and if nvidia drivers wouldn’t install.
  4. Reboot VM.

Only problem now is my main keyboard and mouse won’t pass through but I guess I’ll be finishing up my VFIO setup one step at a time :star_struck: