Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

[server] Play vm guest audio through host with GPU passthrough

$
0
0
Hi this is my first post so please lower your expectations

I've been using Ubuntu since 14.04 and have a pretty marginal understanding of what I'm doing. However I did get GPU passthrough to work quite nicely with a windows VM which was good up until I started running multiple desktops off one host.

Currently I'm using 16.10 kernel ver 4.8.0-22-generic for my KVM host and have it booting off a USB stick and passing the GPUs to guests for desktop duty. The motherboard is an ASUS X79 Sabertooth with the last bios.

Right now I am using a USB sound card to get sound in the VM desktops but this limits playback to one VM at a time (and no front panel audio either which isn't very GF friendly). Earlier today I tried passing through the realtek integrated audio to a guest but it has serious buzzing sounds and is not suitable for desktop use (audio seems like a crap shoot with vt-d). Since this solution didn't work I thought it would be convenient to give the VM an emulated sound card and play the output from that through the host instead.

I started by installing alsa-base on the host and it can play definitely play sounds through the speakers so that much is working. I added an ICH9 sound card to a VM using virt-manager and started it up, the card loaded drivers and appears to be working in the VM but no sound is playing through the host. I'm guessing there are some permissions issues with alsa because I don't actually login to the host on boot or start any kind of x session. I use a mic for team speak so I'd like to keep that functional too if that isn't making it incredibly complicated.

here's a dump of my sound device on the host using
Code:

lspci -nnk
Code:

00:1b.0 Audio device [0403]: Intel Corporation C600/X79 series chipset High Definition Audio Controller [8086:1d20] (rev 06)
        Subsystem: ASUSTeK Computer Inc. C600/X79 series chipset High Definition Audio Controller [1043:8436]
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

and
Code:

aplay -L
Code:

null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default:CARD=PCH
    HDA Intel PCH, ALC892 Analog
    Default Audio Device
sysdefault:CARD=PCH
    HDA Intel PCH, ALC892 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Digital
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Direct sample mixing device
dmix:CARD=PCH,DEV=1
    HDA Intel PCH, ALC892 Digital
    Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=1
    HDA Intel PCH, ALC892 Digital
    Direct sample snooping device
hw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC892 Digital
    Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC892 Digital
    Hardware device with all software conversions


and
Code:

aplay -l
Code:

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

I've tried ICH6 ICH9 and ES1370 so far with no luck which is leading me to believe it is a problem with the audio service on the host. Testing with a Linux guest had the same results (sound looks like it is playing in vm just not going to host).

Also, I don't have a monitor with HDMI sound so I can't use the GPU's sound driver in the guests in case anyone is wondering why In have made this so complicated.

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>