Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Audio and Microphone in KVM with Win10 on Ubuntu 22.04

  1. #1
    Join Date
    Oct 2024
    Beans
    28

    Audio and Microphone in KVM with Win10 on Ubuntu 22.04

    Hi,
    I have Win 10 running in KVM/QEMU correctly on my Ubuntu 22.04, for this I have used Virtio drivers.


    Although the volume is active and can be manipulated in Win10, it does not actually sound in my headphones or my PC and I understand that this happens because it is a virtual machine.


    I have followed these steps to try to activate it, without success:

    https://getlabsdone.com/kvm-windows-...d-lets-fix-it/
    https://gurjeet-tech.blogspot.com/20...ing-audio.html



    The result has been that now in Win10, it says "no device found" in the sound and I cannot even manipulate the volume.






    Could you give me more ideas to continue investigating please?

  2. #2
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Audio and Microphone in KVM with Win10 on Ubuntu 22.04

    Did you pass the USB devices through to the VM for exclusive use? That should be it. virt-manager makes doing this pretty easy. You just need to select the USB devices from a list.

    Now, if either the mic or speakers aren't USB connected, IDK. Sorry. USB passthru has worked well in libvirt for a long time. I've never tried to passthru analog audio.

    And I don't have win10/11.

  3. #3
    Join Date
    May 2018
    Location
    Here and There
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Audio and Microphone in KVM with Win10 on Ubuntu 22.04

    Quote Originally Posted by agonzalesc View Post
    Hi,

    Although the volume is active and can be manipulated in Win10, it does not actually sound in my headphones or my PC and I understand that this happens because it is a virtual machine.


    I have followed these steps to try to activate it, without success:

    https://getlabsdone.com/kvm-windows-...d-lets-fix-it/
    https://gurjeet-tech.blogspot.com/20...ing-audio.html



    The result has been that now in Win10, it says "no device found" in the sound and I cannot even manipulate the volume.






    Could you give me more ideas to continue investigating please?
    Interesting this is my settings for the KVM
    Code:
    <sound model="ich9">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
    </sound>
    That's found in the XML config. I have no issues using that setting. from just speakers to a headphone connected to the laptop.
    No additional steps needed on my end.

    Sorry I missed this post earlier.
    "When you practice gratefulness, there is a sense of respect toward others." >>Dalai Lama

  4. #4
    Join Date
    Oct 2024
    Beans
    28

    Re: Audio and Microphone in KVM with Win10 on Ubuntu 22.04

    Hi @TheFu
    Thanks for your reply.

    Yes! To install win 10 in my KVM I use this guide : https://getlabsdone.com/install-wind...on-ubuntu-kvm/

    I installed virtio drivers and Spice Guest Tools, But that is not heard in my headphones or on the PC speakers

    Regards

  5. #5
    Join Date
    May 2018
    Location
    Here and There
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Audio and Microphone in KVM with Win10 on Ubuntu 22.04

    Can you show me your current settings, please see my screenshots.
    Attached Images Attached Images
    "When you practice gratefulness, there is a sense of respect toward others." >>Dalai Lama

  6. #6
    Join Date
    Oct 2024
    Beans
    28

    Re: Audio and Microphone in KVM with Win10 on Ubuntu 22.04

    Hi @1fallen
    Thanks for your reply.

    I left everything as before and only changed to ICH9 for sound (previously it was AC97), and the volume can be manipulated but nothing can be heard on my speakers.









    As you can see in my attached images, I can manipulate the volume, but that's it, it's silent.

    Thanks

  7. #7
    Join Date
    May 2008
    Beans
    4,509
    Distro
    Ubuntu 24.04 Noble Numbat

    Re: Audio and Microphone in KVM with Win10 on Ubuntu 22.04

    In your xml screenshot, you have <alias name="sound0"/>
    Perhaps remove it and try this setting
    Code:
    <sound model="ich9">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
    </sound>

  8. #8
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Audio and Microphone in KVM with Win10 on Ubuntu 22.04

    Just tested this here. Copied into the Win7 VM a video and double-clicked to start it. VLC started up and it played fine. The default AC97 sound was setup in the VM. No USB involved.

    The host system is Ubuntu 20.04 server with 3.5mm analog stereo audio out plugged into the back of the Asus ROG STRIX B450-F GAMING motherboard with a Ryzen 5600G APU. The APU isn't involved in audio, except over HDMI, which I don't use.

    I didn't setup anything special. It "just worked". This VM is old and has been migrated to new VM hosts at least 3 times. At boot, I hear the "Win7 Chimes" every time. I'd forgotten about that. This VM is only around for 2 programs I still use.

    In the virt-manager settings related to video+sound, there's just
    • Display Spice
    • Sound ac97
    • Channel spice
    • Video QXL


    My NIC was virtio, but then there was a boot issue and the RH virtio drivers weren't available, so I switched back to the Intel PRO/1000, e1000, driver. Win7 didn't include virtio, so the boot recovery was always a hassle. I am using virtio for storage, however. It has probably been 15 yrs since I setup this VM. I know I stopped patching it around 2015, when MSFT changed their EULA to container clauses to which I didn't agree. They really tried to force those changes onto us. I was forced to firewall at my network layer much of MSFT internet addresses. I'd already been blocking their corporate network from accessing my public subnet after a number of hacking attempts (weak attempts, probably a bad actor hacked MSFT and was jumping from their network to the rest of the world).

    Anyway, it just works here. I'm not running Ubuntu 22.04 nor do I have (or will I ever have Win8 or newer). I'm fortunate to be in a place of my life where I don't need and will never need MS-Windows before I die.

  9. #9
    Join Date
    Oct 2024
    Beans
    28

    Re: Audio and Microphone in KVM with Win10 on Ubuntu 22.04

    Hi. Thanks for your reply.


    Before starting Windows, this is my xml.

    Code:
    <sound model="ich9">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
    </sound>


    But after starting Windows, that alias is added and this is the xml. I have deleted it but when I turn it on again, it appears.


    Code:
    <sound model="ich9">
      <alias name="sound0"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
    </sound>

    I followed this tutorial to the letter to install Win10 with Virtio : https://getlabsdone.com/install-wind...on-ubuntu-kvm/


    Thanks.

  10. #10
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Audio and Microphone in KVM with Win10 on Ubuntu 22.04

    I don't think virtio is needed for audio - or involved.

    There isn't 1 virtio. There are 3.
    Storage
    Network
    Graphics

    My libvirt is too old to support GPU virtio, so I still use Spice and spice channels.
    Inside the "defined" XML for the VM are these lines (just adding to the collection):
    Code:
        <sound model='ac97'>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
        </sound>
        <video>
          <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
        </video>
    The VM is running now and as I grabbed those lines. I didn't manually modify the XML. If you do, then you'll need to use the virsh edit command, to ensure the updates are "defined" too. I think that just copies the XML file from /etc/... to /var/ somewhere. I don't keep up with that stuff, since I've never needed know know, even when manually migrating VMs to different hosts, which I've done many times.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •