Onboard Audio Passthru to Debian VM (yes, another post)

Aussiebob66

Member
Aug 3, 2021
2
0
6
58
Hi All,

I am trying to get my onboard HD audio passthru to a Debian 11 VM. I have the passthru working (my PCI devices are all in different groups) however, I am getting no sound.

I am thinking that the default Line Out is overriding the the passthru onboard lineout as I will try and descibe below.

I am also thinking I might have to Blacklist the audio, and I have been struggling with this for a few days (and probably getting confused from the reading). Some say to blacklist it, you put in to grub (not sure if they mean Proxmox Grub ro VM Grub), or Proxmox's conf file for the VM.

I hope I can get some pointers.. As the passthru seems to be working (as in being passed through and the Digital Output is selectable).

1) Without the PCI Passtrough added on the VM (Hardware->ADD->PCI Device) I get the following :
Code:
sudo lshw -C sound
Returns nothing

aplay --list-devices
**** List of PLAYBACK Hardware Devices ****
card 0: Dummy [Dummy], device 0: Dummy PCM [Dummy PCM]
  Subdevices: 7/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7

In the Debian desktop, under Settings->Sound, it shows the following:

Sound-no-pci.jpg


2) With the PCI Passthru added on the VM:

Sound-Add-PCI.jpg

Code:
aplay --list-devices
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
 
sudo lshw -C sound
*-multimedia
    description: Audio device
    product: 8 Series/C220 Series Chipset High Definition Audio Controller
    vendor: Intel Corporation
    physical id: 10
    bus info: pci@0000:00:10.0
    version: 05
    width: 64 bits
    clock: 33MHz
    capabilities: pm msi pciexpress bus_master cap_list
    configuration: driver=snd_hda_intel latency=0
    resources: irq:34 memory:fc650000-fc653fff

However, as I am thinking, although the following screenshot shows the Digital Component is now selectable as an output, the LINE OUT - Built-In Audio is still the "Dummy" one shown in Point 1 and not the actual On-board LINE OUT which is why Im not getting any audio.

Setttings-Sound_Pci.jpg


I feel I am so close to getting it to work.

Thanks for any assistance, ideas, etc.
Rob
 
Did you do on your PVE host...?:
1.) find out the driver used by your soundcard via lspci -v
2.) blacklist the driver via echo "blacklist YourDriverNameHere" >> /etc/modprobe.d/blacklist.conf
3.) rebuild initramfs: update-initramfs -u
4.) reboot
 
Did you do on your PVE host...?:
1.) find out the driver used by your soundcard via lspci -v
2.) blacklist the driver via echo "blacklist YourDriverNameHere" >> /etc/modprobe.d/blacklist.conf
3.) rebuild initramfs: update-initramfs -u
4.) reboot
Thanks for your reply... This is the bit that I think Ive confused myself on.

When you say PVE Host, is this referring to the top level host that is running all the VM's and not referring to the particular Debian VM I want the sound from?

Running lspci -v from the very top level host, I get the following:
Code:
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
      Subsystem: Gigabyte Technology Co., Ltd 8 Series/C220 Series Chipset High Definition Audio Controller
      Flags: bus master, fast devsel, latency 0, IRQ 40, IOMMU group 7
      Memory at f7f10000 (64-bit, non-prefetchable) [size=16K]
      Capabilities: [50] Power Management version 2
      Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
      Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
      Capabilities: [100] Virtual Channel
      Kernel driver in use: vfio-pci
      Kernel modules: snd_hda_intel

Running lspci -v from the actual Linux Host I get the following:
Code:
00:10.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
      Subsystem: Gigabyte Technology Co., Ltd 8 Series/C220 Series Chipset High Definition Audio Controller
      Physical Slot: 16
      Flags: bus master, fast devsel, latency 0, IRQ 34
      Memory at fc650000 (64-bit, non-prefetchable) [size=16K]
      Capabilities: <access denied>
      Kernel driver in use: snd_hda_intel
      Kernel modules: snd_hda_intel

So, I ran the following on the top level host:
echo "blacklist snd_hda_intel" >> /etc/modprobe.d/blacklist.conf
update-initramfs -u

And, I got sound out of the VM...

Thank you so much for your assistance.... That was the missing link.

Rob
 
When you say PVE Host, is this referring to the top level host that is running all the VM's and not referring to the particular Debian VM I want the sound from?
Yes. That's the "host". Your VMs and LXCs are "guests".
The idea is to blacklist the kernel module on the host so PVE won't try to initialize and use it as this might cause problems when you actually only want to pass it through into a VM where it would be unavailable for the host anyway once the VM is started. As PCI(e) devices often behave badly when not properly reseted.

And required step 3 with the update-initramfs -u is still missing in the PCI Passthrough article...I fall into that trap once too ;)
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!