Help requested for AMD Ryzen 5 Pro 4650g Passthrough


DrMucki

Recommended Posts

Just now, limital said:

well, i kinda gave up on getting it running in my VM. All the things i tried ended up in failure so i will just wait until someone who has more knowledge about it gets it done.

 

Once my APU arrives, I'll be trying with Proxmox which also uses KVM, just like Unraid. I am hopeful I can get it to work there, and if so, I'll definitely port it over to Unraid. Might take a couple weeks though.

Link to comment

I got iGPU passthrough (with audio over HDMI as well, did not test display port yet) working in a Proxmox Windows 10 VM! Seems to be limited to ~30hz refresh rate but I am investigating if AMD driver updates will fix the issue.

I will test on Unraid in the coming days once I am happy with the Proxmox install. But briefly, what was key was passing the VBIOS file (latest version works fine, see file Renoir-017.010.000.028.000000.ROM from previous post), AND using a q35 machine (not default i440fx) with SeaBIOS (NOT OVMF). I will try to get it working on Unraid soon and make a guide, but will also make a guide for Proxmox for those who use PVE.

 

Cheers!

Link to comment

UPDATE: got it working very well on Unraid! Very easy to setup once I knew what to look for and the little 'tricks' to be careful for. Just playing around with it a bit further to ensure it's stable, but I will be very happy to share a guide shortly! Do you think I should make a post of its own for that?

 

EDIT: Well, it was working before this happened and persisted after a reboot. No idea what changed unless Windows tried to pull drivers in the background which messed things up?

IMG_4710.jpeg

Edited by CodingMicrobe
Link to comment

I'm very interested to see how this turns out. I'm in the process of planning a build myself and torn on either going with an R3 5300g (when it comes out, which should be soon™, hoping it comes out early Q2/21) or something like an R3 3100 and tossing in an old RX 550X.

 

Your results do look promising though, and I'm glad to hear that you were able to get it to somewhat work at least temporarily. I did a search before running into this thread and there were posts going back indicating that for the 2200g and 2400g GPU passthrough wouldn't work but they never really elaborated and gave up.

Link to comment
4 hours ago, CodingMicrobe said:

UPDATE: got it working very well on Unraid! Very easy to setup once I knew what to look for and the little 'tricks' to be careful for. Just playing around with it a bit further to ensure it's stable, but I will be very happy to share a guide shortly! Do you think I should make a post of its own for that?

 

EDIT: Well, it was working before this happened and persisted after a reboot. No idea what changed unless Windows tried to pull drivers in the background which messed things up?

 

sounds great!hope your guide。i can use vnc login win10,but when i add the Renoir on second ,it get stuck at the login scripts,then it will blue screen.

Edited by elovsa
Link to comment

I have narrowed it down to AMD drivers which are automatically installed by Windows Update. I can "Pause Updates for 7 days" in W10, but that's like putting a bandage on a bleeding wound, doesn't do much long-term.

 

I am looking into why this may be occurring, however also came across these posts on Reddit where people point out that it may be a driver version issue, since AMD may be detecting VMs and not allowing us to run the driver properly.

 

For what it's worth, the mouse usually works fine and I can move it around and see it on my display, everything 'behind' the mouse (the entire W10 UI) is that garbled pixelated mess though.

 

 

Link to comment

If the culprit seems to be the W10 drivers, has anyone tried doing GPU passthrough to say a Linux VM (say Ubuntu 20.04, or Mint 20) and gotten that working?

 

With W10 I don't think you can pause or shun updates permanently unless you're running Edu or Enterprise right? Home and Pro are forced to update if you want it to or not?

Link to comment
16 minutes ago, 450Rawr said:

If the culprit seems to be the W10 drivers, has anyone tried doing GPU passthrough to say a Linux VM (say Ubuntu 20.04, or Mint 20) and gotten that working?

 

With W10 I don't think you can pause or shun updates permanently unless you're running Edu or Enterprise right? Home and Pro are forced to update if you want it to or not?

 

I have tried with Ubuntu 20.04.2 and 20.10, but couldn't get either to work, even after enabling the amdgpu.exp_hw_support=1 flag in the kernel & updating krub accordingly... Similar issue with Manjaro XFCE 20.2.1. I have not tried Linux Mint.

Link to comment
11 minutes ago, CodingMicrobe said:

 

I have tried with Ubuntu 20.04.2 and 20.10, but couldn't get either to work, even after enabling the amdgpu.exp_hw_support=1 flag in the kernel & updating krub accordingly... Similar issue with Manjaro XFCE 20.2.1. I have not tried Linux Mint.

Well if Ubuntu doesn't work I have a feeling that Mint won't either since it's based off Ubuntu (or Debian if you use LMDE).

So it sounds like the best bet here is with a W10 VM.

 

I really do hope that this works out because I'm itching to get my hands on a 5300G to keep my next build clean and minimalist.

 

Just throwing out an idea here, I'm not sure if this has been checked or not or is a standard thing that everyone already does and doesn't need to be said but is SVM enabled or does it affect anything here? I recall that you need to enable this in order to get Hyper-V to work properly and I believe that Unraid uses Xen.

Link to comment
On 3/17/2021 at 10:52 PM, CodingMicrobe said:

I got iGPU passthrough (with audio over HDMI as well, did not test display port yet) working in a Proxmox Windows 10 VM! Seems to be limited to ~30hz refresh rate but I am investigating if AMD driver updates will fix the issue.

I will test on Unraid in the coming days once I am happy with the Proxmox install. But briefly, what was key was passing the VBIOS file (latest version works fine, see file Renoir-017.010.000.028.000000.ROM from previous post), AND using a q35 machine (not default i440fx) with SeaBIOS (NOT OVMF). I will try to get it working on Unraid soon and make a guide, but will also make a guide for Proxmox for those who use PVE.

 

Cheers!

 

i hope you get it to work on unraid win10 vm... i was really looking forward to using the igpu within my vm :(

Link to comment

Hello guys

thanks to the vbios i got it running in in unraid 6.9.1. system itself is headless (it's only a mini pc with the 4560G and 32 GB Ram)

but i have to test it further. and i did a lot of changes in unraid itself for the VM and acpi override...

 

i will install steam and try to play a little around with parsec.

 

 

Link to comment
2 hours ago, Olli said:

Hello guys

thanks to the vbios i got it running in in unraid 6.9.1. system itself is headless (it's only a mini pc with the 4560G and 32 GB Ram)

but i have to test it further. and i did a lot of changes in unraid itself for the VM and acpi override...

 

i will install steam and try to play a little around with parsec.

 

 

Hi,

 could you please share your XML and what changes were required in Unraid, beyond ACS override, efifb, VFIO. Also does the VM still work with AMD drivers installed?

the issues we were having was with display output, since once you connect via  RDP/parsec windows may use the generic drivers and not AMD. 
worth testing with a monitor if possible. 

Edited by CodingMicrobe
Link to comment
1 hour ago, FredFlintstone said:

Hi

 

which Vbios file did work for you. Could you please tell share your xml file. I'm still struggling to get my Windows 10 Vm running. The gpu is shown but I do get the 43 Error.

Tx Fred

 

Hello,

for me worked the first version of the vbios, which was posted here.

Link to comment
Just now, Olli said:

Hello,

for me worked the first version of the vbios, which was posted here.

Interesting because I have tried that version I posted several times and no success once drivers are installed. Can you text with a monitor? I feel like you are in the same situation we are in, but the issue is masked by the fact you’re running it headless. 

Link to comment

you mean i should connect a monitor to my unraid server? that won't work, since it's headless and the apu is my only GPU... that approach will cause for sure errors

i can only use rdp / parsec. But i need there more time to let it run smoothly...

 

Link to comment
Just now, Olli said:

you mean i should connect a monitor to my unraid server? that won't work, since it's headless and the apu is my only GPU... that approach will cause for sure errors

i can only use rdp / parsec. But i need there more time to let it run smoothly...

 

Yeah. That’s what I had working (with monitor connected to my system with only APU graphics, no other GPU), even in a VM, until I installed AMD drivers then it broke partially. 
good luck with testing Parsec, just keep in mind you may not get true graphics acceleration. 

Link to comment
27 minutes ago, CodingMicrobe said:

Hi,

 could you please share your XML and what changes were required in Unraid, beyond ACS override, efifb, VFIO. Also does the VM still work with AMD drivers installed?

the issues we were having was with display output, since once you connect via  RDP/parsec windows may use the generic drivers and not AMD. 
worth testing with a monitor if possible. 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm'>
  <name>Windows 10</name>
  <uuid>1ee770b8-eedd-e81b-3313-3b88a2e5076f</uuid>
  <description>Test</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>21495808</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>8</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='6'/>
    <vcpupin vcpu='2' cpuset='1'/>
    <vcpupin vcpu='3' cpuset='7'/>
    <vcpupin vcpu='4' cpuset='2'/>
    <vcpupin vcpu='5' cpuset='8'/>
    <vcpupin vcpu='6' cpuset='4'/>
    <vcpupin vcpu='7' cpuset='10'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-5.1'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='4' threads='2'/>
    <cache mode='passthrough'/>
    <feature policy='require' name='topoext'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Windows 10/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/Windows.iso'/>
      <target dev='hda' bus='sata'/>
      <readonly/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/virtio-win-0.1.190-1.iso'/>
      <target dev='hdb' bus='sata'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='qemu-xhci' ports='15'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='2' port='0x11'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    </controller>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0x12'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
    </controller>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x13'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    </controller>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x14'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:24:bf:05'/>
      <source bridge='br0'/>
      <model type='virtio-net'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='3'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='de'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
      </source>
      <rom file='/mnt/cache/isos/vbios/RenoirVBIOS.rom'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x05' slot='0x00' function='0x6'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x0bda'/>
        <product id='0x0129'/>
      </source>
      <address type='usb' bus='0' port='1'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x8087'/>
        <product id='0x0029'/>
      </source>
      <address type='usb' bus='0' port='2'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
</domain>

This my XML for the VM... 

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.