Jump to content

Update PCI-e Bus for ElGato 4k60 Pro


DEOVI
Go to solution Solved by DEOVI,

Recommended Posts

Hey there everyone,

 

I've recently managed to create a Windows 10 VM for streaming and I managed to do a passthrough of an ElGato 4K60 Pro Mk.2 using vfio-pci binding and alongside a Nvidia 970. At start I was getting an image issue since I was getting an odd green screen and I began to look into using ElGato's 4K Capture Utility to see if I got the same image that I was getting on OBS and I did...

782965331_Screenshot2023-01-26101931.thumb.png.417fc0d66e92898389927acd2116af01.png

 

I started looking into the setting I noticed that if I changed the EDID mode to 'Display' the error would be fixed.

1615473462_Screenshot2023-01-26101952.thumb.png.472e91dc151dd0b244082955f31af077.png

2106442722_Screenshot2023-01-26102050.thumb.png.aad78d85212b556e537120a0a30788b7.png

Now, here's what I found so far and where I'm asking help. After looking into the matter, I realized that if you go to higher resolutions, the capture card will not work correctly. That EDID mode pretty much states the resolution of the capture, and the 'internal' capture is 4K. When it goes that high, it doesn't work giving the green bars from the image above. I tested this by trying to capture a high-resolution display and it gave the same issue.

 

I looked up this error, and lucky enough I think I found the problem. It seems that the VM that was created is not passing in the Capture card with the correct PCI-e Bus. I checked the motherboard specs, and it says that that all PCI-e slot is a Gen 3, it shouldn't be a problem (Asus ROG STRIX B550-F GAMING second PCI-e slot). 

Here's the discrepancy I'm trying to resolve. The ElGato Documentation states that the card should sit on a Gen2x4 connection. But mine is registered as Gen2x1.

 

Is there a way I can change the specs on how the card should be passed through and force it to be the correct PCI GEN?

 

obs64_POd1UILskl.png.5c9bb7d4d135d49a237022a5148ef20e.png

Elgato 4K60 Pro MK.2 - Green or distorted video – Elgato

 

VM

1380995784_VMCapture.png.10d57a759d1aeb6bfe31137e0c91e571.png

 

 

Edited by DEOVI
Link to comment
  • 2 months later...

Hi, I want my Elgato 4k60 Pro passthrough in a win 11 VM. But I have several in my VFIO list

04:00.0 Multimedia controller: YUAN High-Tech Development Co., Ltd. Device 0371

05:00.0 Multimedia controller: YUAN High-Tech Development Co., Ltd. Device 0371

06:00.0 Multimedia controller: YUAN High-Tech Development Co., Ltd. Device 0371

07:00.0 Multimedia controller: YUAN High-Tech Development Co., Ltd. Device 0371

entries.

 

Do you have all passthrough or just one. Thanks

Link to comment
1 hour ago, Crosbe said:

Hi, I want my Elgato 4k60 Pro passthrough in a win 11 VM. But I have several in my VFIO list

04:00.0 Multimedia controller: YUAN High-Tech Development Co., Ltd. Device 0371

05:00.0 Multimedia controller: YUAN High-Tech Development Co., Ltd. Device 0371

06:00.0 Multimedia controller: YUAN High-Tech Development Co., Ltd. Device 0371

07:00.0 Multimedia controller: YUAN High-Tech Development Co., Ltd. Device 0371

entries.

 

Do you have all passthrough or just one. Thanks


I only have this


[12ab:0710] 0a:00.0 Multimedia controller: YUAN High-Tech Development Co., Ltd. Device 0710

 

I passed it through using PCIe ACS Override under "Both", under the Advanced VM Manger settings.

 

 

Link to comment

What motherboard do you have now? I have the same attitude, nevertheless I have the 4 pcie entries. But I'll just try to use the same 0a:00.0 entry. Thank you for your quick response.

 

I have the Asus ROG STRIX X570-F GAMING motherboard.

 

I tried with "both" but the VM and the Unraid Server crashed when I passthrough the capture card.  I don't think that works with the Mk1.

 

i have tested the multi-function and the downstream in Advanced Vm Manager settings, now i can see the Card in Obs and Elgato Software, but i have no signal, wenn i reboot the vm unraid server crashed and reboot.

 

I

Edited by Crosbe
Link to comment
10 hours ago, Crosbe said:

What motherboard do you have now? I have the same attitude, nevertheless I have the 4 pcie entries. But I'll just try to use the same 0a:00.0 entry. Thank you for your quick response.

 

I have the Asus ROG STRIX X570-F GAMING motherboard.

 

I tried with "both" but the VM and the Unraid Server crashed when I passthrough the capture card.  I don't think that works with the Mk1.

 

i have tested the multi-function and the downstream in Advanced Vm Manager settings, now i can see the Card in Obs and Elgato Software, but i have no signal, wenn i reboot the vm unraid server crashed and reboot.

 

I

 

I'm using an Asus PRIME X470-PRO. I was using another board at the time of the righting of this post (mentioned in original post). I understand that not all motherboards use the entirety of the PCIe Bus when many devices are used. My guess is that the "Strix" line doesn't support PCIe as well as the board I just mentioned. I noticed this when I tried to add a third card to the last slot and I started to get the same PCIe Bux limitation on the last card. I suppose it's a good reason to go with a ThreadRipper. 

In my case, I managed to pass a 2070 Super and a capture card to the VM, but that's it. I can't pass in a USB hub so for the webcams I'm using Unraid's USB device selector prior to booting the VM.

Link to comment

Yes, you're probably right, I didn't even think of that. I installed 2 graphics cards for 2 vms. I can test whether it runs with only one graphics card. Too bad could have been so perfect. But you never stop learning thanks for the tip.

 

As far as ThreadRipper is concerned, I thought about it, but the price put me off at the time.

Link to comment

So, I bought the MK2. And now everything is going as I imagined.

My config, SAS controller, Network card, Graphic card, capture card.

 

Can you tell me how to view the properties? To see if the PCI info is displayed correctly.

Edited by Crosbe
Link to comment
1 hour ago, Crosbe said:

So, I bought the MK2. And now everything is going as I imagined.

My config, SAS controller, Network card, Graphic card, capture card.

 

Can you tell me how to view the properties? To see if the PCI info is displayed correctly.

 

That's good news! So the Mk2 fixed the multiple device issue?

 

You can find the link in the original post, what it says is
 

Quote

Check PCIe lane Speed

How to check which PCIe speed 4K60 Pro MK.2 is using in software.

 

1) Download and install OBS Studio. 

 

2) Open OBS Studio

 

3) In the sources box, click the + button or right-click 

 

4) Select Video Capture Device and give the source a name

 

5) From the dropdown menu, select Elgato Game Capture 4K60 Pro MK.2

 

6) In the properties area, click on Configure. The 4K60 Pro MK.2 driver panel will open. 

 

7) Look for the PCI Info and ensure it reads as Gen 2 x4

 

Link to comment
On 1/26/2023 at 4:57 PM, DEOVI said:

Is there a way I can change the specs on how the card should be passed through and force it to be the correct PCI GEN?

This should do the trick for q35 machine type;

you have 2 options:

a) specify global speed and width values for all pcie-root-ports:

at the bottom of the xml you write:

  </devices>
  <qemu:commandline>
    <qemu:arg value='-global'/>
    <qemu:arg value='pcie-root-port.x-speed=8'/>
    <qemu:arg value='-global'/>
    <qemu:arg value='pcie-root-port.x-width=16'/>
  </qemu:commandline>
</domain>

This will give you a x16 "physical" slot at x8 speed (Gen 3).

b) specify speed and width values for a specific pcie-root-port

1) Identify the pcie-root-port in which the passed thorugh device is plugged in, for example:

...
...
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x8'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
    </controller>
...
...
      <hostdev mode='subsystem' type='pci' managed='yes'>
        <driver name='vfio'/>
        <source>
          <address domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
        </source>
        <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </hostdev>
...
...

Passed through device with source address 0a:00.0 is attached in the guest at address 01:00.0, meaning that it's a ttached to pcie-root-port with index='1'.

2) Set an alias for the identified pcie-root-port; the alias must start with ua- then add specific qemu custom args at the bottom of the xml; the code becomes (for latest versions of libvirt):

...
...
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x8'/>
      <alias name='ua-mydev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
    </controller>
...
...
      <hostdev mode='subsystem' type='pci' managed='yes'>
        <driver name='vfio'/>
        <source>
          <address domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
        </source>
        <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </hostdev>
...
...
  </devices>
  <qemu:override>
    <qemu:device alias='ua-mydev0'>
      <qemu:frontend>
        <qemu:property name='x-speed' type='unsigned' value='8'/>
        <qemu:property name='x-width' type='unsigned' value='16'/>
      </qemu:frontend>
    </qemu:device>
  </qemu:override>
</domain>

--

In your case to have Gen 2 x4 I think values could be:

x-speed: 5 (5GT/s, Gen2)

x-width: 4 (x4 "physical" slot)

 

-----

However, from the latest source code of qemu, it defaults to pcie gen 4 x32 lanes:
 

    DEFINE_PROP_PCIE_LINK_SPEED("x-speed", PCIESlot,
                                speed, PCIE_LINK_SPEED_16),
    DEFINE_PROP_PCIE_LINK_WIDTH("x-width", PCIESlot,
                                width, PCIE_LINK_WIDTH_32),

 

In fact in my case, without adding the extra lines, my 6900 xt gpu is detected in a windows 11 vm as pcie 4.0 even if my motherboard supports only pcie 3.0....This is only cosmetic.

-----

This to say that changes should not be required, since the emulated hardware is superior (it's the latest) compared to the pcie speed/width you want to set.

Edited by ghost82
Link to comment
1 hour ago, DEOVI said:

 

That's good news! So the Mk2 fixed the multiple device issue?

 

You can find the link in the original post, what it says is
 

 

Yes, the multiple entry is gone. Now I only have one.  11:00.0 Multimedia controller: YUAN High-Tech Development Co., Ltd. Device 0710

 

I think it's because of the card, as far as I've read, the MK1 has 2 chips installed and the MK2 only has one for streaming. I don't think that can be forwarded correctly via passthrough. Or you have to adjust the VM to the card properly. Assign slot and enter multifunction "on". but I don't know enough about it

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...