Jump to content

RX 580 passthrough and HDMI audio


Recommended Posts

Hi everyone!

 

I am currently trying to have two VMs with GPUs passed through running simultaneously. While the first one runs without problems, the second one is giving me headaches regarding HDMI audio which is what this post is about:

  1. Windows 10 / ASUS Dual GeForce RTX 2080 OC [works flawlessly]
  2. Windows 10 / Sapphire Nitro+ RX 580 8G [weird audio passthrough issue]

 

Problem description:

The passthrough of the RX 580 itself works fine. The audio part of the RX 580 is passed through as well and recognized by Windows. However, the sound icon in the Windows system tray shows the "red X symbol". In the sound settings (when accessed through a right click on the audio system tray icon), the volume appears to be adjustable using the usual slider. However, when set to any value but 0, it directly snaps back to 0.

The audio device is similarly not recognized in VMs with other operating systems. Therefore I believe it has to be configuration issue. Alas, I have tried everything I found online in threads of similar problems but nothing has worked.

These symptoms were never described anywhere else so I am quite at a loss. Any hints, suggestions, and pointers (or simply solutions 😅) are highly appreciated!

 

What has been tried:

  • Added multifunction='on' and set both devices as different function instead of different devices in XML, as suggested in this thread (the resulting XML part from my config file can be found below)
  • Adjusting the ACS override from "Downstream" to "Multi-Function" or "Both", will add source if I find it again
  • Exclude and include pci-ids of the GPU and audio device in "vfio-pci.ids=..." in syslinux configuration
  • Extract vBIOS using GPU-Z and pass it to the VM via rom file='...' parameter
  • Changed platform to newest version, i.e. "pc-i440fx-4.2"
  • Enabled MSI with MSI utility for the audio device (was only active for the GPU), but since audio does not work in other OSes it was a long shot anyway
  • Installation of newest AMD driver with factory reset option (which of course rendered the whole VM unusable, but also a long shot out of desperation what else to try)

 

Current config: (I copied just the in my opinion important parts in, in order to render this post not unnecessarily long, happy to provide more if needed)

VM XML

<os>
  <type arch='x86_64' machine='pc-i440fx-4.2'>hvm</type>
  <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
  <nvram>/etc/libvirt/qemu/nvram/...</nvram>
</os>
...
<hostdev mode='subsystem' type='pci' managed='yes'>
  <driver name='vfio'/>
  <source>
    <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
  </source>
  <rom file='/mnt/user/vbios/rx580-ellesmere-nitro.rom'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
  <driver name='vfio'/>
  <source>
    <address domain='0x0000' bus='0x04' slot='0x00' function='0x1'/>
  </source>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1' multifunction='on'/>
</hostdev>

 

IOMMU groups of RX580

IOMMU group 17:	[1002:67df] 04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev e7)
IOMMU group 18:	[1002:aaf0] 04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]

 

Syslinux

kernel /bzimage
append vfio-pci.ids=[...,]1002:67df,1002:aaf0[,...] pcie_acs_override=downstream,multifunction initrd=/bzroot

 

Link to comment

OK, so for everyone who stumbles over the same mistake, for me the solution was to change not only to the most current version of the platform, but also to deviate from the Windows template as use the Q35 chipset emulation (specifically "pc-q35-4.2" worked). Now The HDMI sound works as expected in both, Windows and macOS.

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...