I have no monitor output, and I must set up gpu passthrough

Jokes aside, I am trying to set up gpu passthrough. I have no monitor output no matter which configuration I am trying to do. Here are the test subjects:

  1. fedora 39 template with nvidia drivers:
    • gpu is passed and detected, no output at all
    • works with nvtop, so I can see how my gpu does nothing
    • xrandr shows Screen 0 and 15 dummy displays. DUMMY0 has the following settings: QB1920x1080 46.10*+. This looks wrong to me, my second monitor runs on 60 or 90 fps, depending on the resolution.
  2. fedora 39 template with nouveau drivers:
    • gpu is passed and detected, outputs blank screen
    • doesn’t work with nvtop: No GPU to monitor
    • xrandr outputs this error: Can't open display :0
  3. fedora 40 standalone from the iso and with nvidia drivers:
    • gpu is passed and detected, no output at all
    • nvtop works
    • xrandr shows Screen 0 and Virtual-1, but display settings app shows only virtual display
  4. fedora 40 standalone from the iso and with nouveau drivers:
    • gpu is passed and detected, no output at all
    • doesn’t work with nvtop: No GPU to monitor
    • xrandr shows only the virtual display

No, I haven’t tried Windows yet. Yes, the same setup works when dGPU is not passed through. Monitor plugged into dGPU’s output is recognized and I have output.

From what I found, this topic seems very similar, and also abandoned.

I am pretty sure that the problem is my current xorg configuration, but I have no idea how to finish it. I wrote the configuration similar to the neowutran’s guide, but I don’t know how to get xorg to start with that configuration. Also, I’m getting the Server is already active for display 0 error when running X -configure. Please help.

P.S. I was able to set up the passthrough previously using conventional distros… somehow… So the hardware must work. My configuration is the issue.

1 Like

Okay, I think I have some progress. Not sure what I changed (maybe just missed that initially), but I actually have proper display output on the fedora 40 standalone with nouveau. It displays the splash screen while the system is loading and goes back to no signal just before the greeter. What might be the reason?

How to read journalctl logs?

1 Like

Found an error in the journalctl:

<date&time> <dGPU device> BAR 3 <memory range?>: can't claim; no compatible bridge window

After that, the virtual video device was set as boot VGA device and both devices had the following messages:

<date&time> <device> vgaarb: bridge control possible
<date&time> <device> vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none

That error is curious, since a little bit later:
First:

<date&time> <dGPU device> [io <range>] has been reserved

And then:

<date&time> <dGPU device> BAR 3 <memory range?>: assigned

<word> - I omit some of the journalctl stuff because I cannot copy from a standalone and I am too lazy to rewrite everything precicely. :frowning:

1 Like

It looks like the system is choosing the virtual VGA device as the boot device because of that error. There should be a way to remove the virtual device completely.

1 Like

Found another piece:

<date&time> <dGPU device> vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=io+mem

It looks like this one is directly before the greeter and may be the reason why output ends.

This line is the same in dmesg

The same happens with the proprietary drivers, but there are no output to the monitor at all :melting_face:

1 Like

After some more trial and error I was able to figure out how it works. For me, the setup works with proprietary nvidia drivers.

  1. After your guest is starting and detecting dGPU, you still need to configure Xorg. To do that, run X :1 -configure as root.
  2. Place generated xorg config into /etc/X11/xorg.conf.d/. You may or may not need to tweak the configuration.
  3. Restart display manager or just reboot.

@Ancient_Book_5182

1 Like