View previous topic :: View next topic |
Author |
Message |
Shadow_Fury Tux's lil' helper
Joined: 20 Apr 2021 Posts: 138 Location: 11.435765792823453, 143.05926743686274
|
Posted: Sun Jan 16, 2022 8:26 pm Post subject: no sound from QEMU/KVM virtual machine |
|
|
title says it all.
i've recently installed virt-manager and used it to create a QEMU kvm. all is well so far. the issue is, i can't get audio out of the VM
any help is appreciated |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Sun Jan 16, 2022 8:49 pm Post subject: |
|
|
Plz make sure qemu is built with both "alsa pulseaudio" and your user is is member of audio video and libvirt groups
Which guest? _________________
|
|
Back to top |
|
|
Shadow_Fury Tux's lil' helper
Joined: 20 Apr 2021 Posts: 138 Location: 11.435765792823453, 143.05926743686274
|
Posted: Sun Jan 16, 2022 9:35 pm Post subject: |
|
|
currently re-compiling qemu. and the guest is manjaro |
|
Back to top |
|
|
Shadow_Fury Tux's lil' helper
Joined: 20 Apr 2021 Posts: 138 Location: 11.435765792823453, 143.05926743686274
|
Posted: Mon Jan 17, 2022 11:56 am Post subject: |
|
|
nope, still nothing |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3137
|
Posted: Mon Jan 17, 2022 3:21 pm Post subject: |
|
|
Do you even have an audio device inside your VM?
I don't think it's included by default. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21633
|
Posted: Mon Jan 17, 2022 4:24 pm Post subject: |
|
|
If you need help, please provide information we can use to help you. At present, we don't know:- What version of any of these components you are using
- How you configured the virtual hardware
- Where to obtain exact copies of any of the things not in Portage. I could go find a Manjaro guest, but would it be the same one you're using? I have no way to know.
- Whether you have working sound on the host from, for example, vlc.
- Whether qemu is properly set up to drive the host speakers when it detects sound on the guest's speakers
- How you are playing audio in the guest
- Whether the guest has virtual speakers into which it can play
- Whether the guest is playing into these speakers, versus to some dummy device. If the guest is not driving its virtual speakers, then there is nothing for Qemu to play through the real sound device.
|
|
Back to top |
|
|
Shadow_Fury Tux's lil' helper
Joined: 20 Apr 2021 Posts: 138 Location: 11.435765792823453, 143.05926743686274
|
Posted: Tue Jan 18, 2022 6:39 pm Post subject: |
|
|
Right, here is my long list of everything I know about the system
- What version of any of these components you are using
eix indicates the following versions:
Code: |
qemu: 6.2.0-r3
libvirt: 7.10.0-r2
virt-manager: 3.2.0
|
How you configured the virtual hardware
I did not configure any hardware myself, other than giving it 4 cpu cores and 8 gb of ram, but I will list what I believe to be the important details that virt-manager set automatically.
Code: |
Virtual audio hardware: intel HDA(ich9)
Display Spice: {Type: SPICE server; Listen Type: Address; Address: Localhost Only; port: Automatic (5900)}
Serial 1: {Device Type: pty; Source Path: /dev/pts/5}
Channel Device qemu-ga: {Device Type: unix; Source Path: /var/lib/libvirt/qemu/channel/target/domain-1-manjaro/org.qemu.auest_agent.0; Target type: virtio; Target Name: org.qemu.guest_agent.0} [note: state listed as connected when machine is running]
Channel Spice: {Device Type: spicevmc; Target Type: virtio; Target name: com.redhat.spice.0} [note: state listed as disconnected when machine is running]
|
Where to obtain exact copies of any of the things not in Portage. I could go find a Manjaro guest, but would it be the same one you're using? I have no way to know.
the manjaro guest was created from the manjaro-kde-21.1.0-minimal-210817-linux52 ISO, which was downloaded from the official torrent. after that, i ran the installer, then updated all packages using pacman. i also installed the spice-gtk and spice-vdagent packages on the guest.
Whether you have working sound on the host from, for example, vlc.
I can't say from VLC, but i have had no sound issues on the host, be it from steam games (both native and proton), browsers playing videos or, KDE plasma system tolls, like the pop when changing audio levels.
Whether qemu is properly set up to drive the host speakers when it detects sound on the guest's speakers
not sure how to verify this
How you are playing audio in the guest
i have tried playing audio from both the browser, and by changing the audio level in manjaro plasma's settings, which both result in a visual reaction from plasma's built in audio visualizer ( the one present in the volume menu options), meaning the guest sound sink is receiving audio
Whether the guest has virtual speakers into which it can play
that i don't know, the only thing that shows up in the devices tab is a line out (and a microphone), though lspci (on guest) does indicate the presence of an intel HDA(ic9) device. (verified by arecord -l, listing an intel HDA device as the only capture device)
Whether the guest is playing into these speakers, versus to some dummy device. If the guest is not driving its virtual speakers, then there is nothing for Qemu to play through the real sound device.
this i, again, don't know how to verify.
|
|
Back to top |
|
|
mrbassie l33t
Joined: 31 May 2013 Posts: 772 Location: over here
|
Posted: Fri Jan 21, 2022 11:32 am Post subject: |
|
|
Shadow_Fury wrote: |
I did not configure any hardware myself, other than giving it 4 cpu cores and 8 gb of ram, but I will list what I believe to be the important details that virt-manager set automatically.
|
I don't know much about qemu so I can't help, but if you post the output of Code: | virsh dumpxml <virtual machine name> | it may be helpful to someone who can. |
|
Back to top |
|
|
Shadow_Fury Tux's lil' helper
Joined: 20 Apr 2021 Posts: 138 Location: 11.435765792823453, 143.05926743686274
|
Posted: Sat Jan 22, 2022 2:48 am Post subject: |
|
|
mrbassie wrote: | Shadow_Fury wrote: |
I did not configure any hardware myself, other than giving it 4 cpu cores and 8 gb of ram, but I will list what I believe to be the important details that virt-manager set automatically.
|
I don't know much about qemu so I can't help, but if you post the output of Code: | virsh dumpxml <virtual machine name> | it may be helpful to someone who can. |
here is the output of "virsh dumpxml manjaro":
Code: |
<domain type='kvm'>
<name>manjaro</name>
<uuid>af164583-f74e-407e-a604-c057fcfddb09</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://manjaro.org/manjaro/rolling"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>8388608</currentMemory>
<vcpu placement='static'>4</vcpu>
<os>
<type arch='x86_64' machine='pc-q35-6.2'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<vmport state='off'/>
</features>
<cpu mode='host-model' check='partial'/>
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<pm>
<suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/>
</pm>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/manjaro.qcow2'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</disk>
<controller type='usb' index='0' model='qemu-xhci' ports='15'>
<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>
<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='pci' index='6' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='6' port='0x15'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
</controller>
<controller type='pci' index='7' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='7' port='0x16'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
</controller>
<controller type='pci' index='8' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='8' port='0x17'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
</controller>
<controller type='pci' index='9' model='pcie-to-pci-bridge'>
<model name='pcie-pci-bridge'/>
<address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</controller>
<interface type='network'>
<mac address='52:54:00:03:d4:78'/>
<source network='default'/>
<model type='virtio'/>
<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>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
<address type='virtio-serial' controller='0' bus='0' port='2'/>
</channel>
<input type='tablet' bus='usb'>
<address type='usb' bus='0' port='1'/>
</input>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='spice' autoport='yes'>
<listen type='address'/>
<image compression='off'/>
<gl enable='no'/>
</graphics>
<sound model='ich9'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
</sound>
<audio id='1' type='spice'/>
<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>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='2'/>
</redirdev>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='3'/>
</redirdev>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</memballoon>
<rng model='virtio'>
<backend model='random'>/dev/urandom</backend>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</rng>
</devices>
</domain>
|
|
|
Back to top |
|
|
|