Usb headset not present in virt-manager

If none of the more specific forums is the right place to ask

Usb headset not present in virt-manager

Postby MagicPoulp » 2020-09-08 05:52

Hi,

Thanks in advance for the help.

I run debian buster, with the latest backported kernel 5.7. I want to add a usb entity for a usb-based audio headset inside virt-manager. It is a graphical tool to start kvm images, in which I use a Windows VM. When I configure to add a usb entity, I see only my keyboard and my mouse. The headset is not detected.

The headset's model:
https://www.deltaco.eu/en/products/ljud ... or/GAM-074
and the pdf says 50mm in the drivers heading:
https://www.deltaco.se/sites/cdn/Inform ... AM-074.pdf

I have installed the meta package firmware-linux from buster non-free.

What can I do?

I attached the complete dmesg output after booting. I do not see anything concerning the usb headset.
Last edited by MagicPoulp on 2020-09-11 11:21, edited 1 time in total.
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: Usb headset not present in virt-manager

Postby MagicPoulp » 2020-09-08 12:35

The spice menu says I can redirect an USB. But the headset one does not show up in the list, only my mouse and keyboard show up. My VM is now configured with 3 USB redirectors
https://people.freedesktop.org/~teuf/spice-doc/html/


Here her particular problems:
- dmesg does not find any special device during startup. THis seems an isolated problem. If you insert any usb device, how to debug that it does not trigger a detection?
- virt-manager when listing connected usb devices does not find the headset

After tweaking, probably the kernel and firmwares, I freezes if I add my mouse as device, but the default mouse works.

I am using redhat VIRTIO drivers
and for client window I use spice-guest-tools

Maybe there a lack of sync with the kernel. But the usb is not detected if I boot again in the 4.19 kernel. All firmwares where installed on stable.

It seems to me there is no detector and I have somewhat to register it manually.
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: Usb headset not present in virt-manager

Postby CwF » 2020-09-08 12:51

a root terminal lsusb shows nothing?

The firmware is not required on the host

If you are passing to windows, try passing the whole port with vfio, often required.

However, passing numerous things to windows vm's that the host can't use I've never seen it not have some generic listing showing something is plugged in...update usbid's etc.
CwF
 
Posts: 767
Joined: 2018-06-20 15:16

Re: Usb headset not present in virt-manager

Postby MagicPoulp » 2020-09-09 06:50

Thanks for the help. But I don't understand.

The heaset is on usb 3.1, on bus 2. I know that because the socket in use is blue and the speed is 10000M in lsusb -t
sudo lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 002: ID 046d:c069 Logitech, Inc. M-U0007 [Corded Mouse M500]
    Bus 001 Device 003: ID 046d:c333 Logitech, Inc.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

sudo lsusb -t
    /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 10000M
    /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 8: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 12: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 12: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M

I have only used the graphical interface for virt-manager, and I do not understand what you mean with vfio. Maybe there are options if one uses kvm on the command line. I am not there yet.

Yes it is strange that the plugged in headset does not show up in lsusb. But remember that it is a usb headset, which is quite special, and recent.
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: Usb headset not present in virt-manager

Postby CwF » 2020-09-09 19:00

I'm not sure what direction to point. If there is no event on insertion I assume debian is missing something. You may look into usb-modeswitch and see if anything applies. I've always had something show up, even if wrong.

If this is a laptop with just those two root ports, forget I mentioned vfio.

Watch a tail of dmesg during insertion...?
CwF
 
Posts: 767
Joined: 2018-06-20 15:16

Re: Usb headset not present in virt-manager

Postby MagicPoulp » 2020-09-11 05:36

Thanks for the help.

The computer is a desktop one.

The 2 commands below show nothing upon inserting the usb socket.
The same happens if I run first sudo modprobe snd-usb-audio and see that the module is successfully loaded (lsmod | grep ^snd_usb) (I also loaded it at boot time using the file /etc/modules)

sudo dmesg -w
sudo tail -f /var/log/{messages,kernel,dmesg,syslog}

I am currently exploring the kvm and virt-manager documentation. And I also try to understand the snd-usb-audio klernel module.

Intuitively, if I can formward the usb then maybe windows can detect the type it has.

I also use a very old version of the enlightenment desktop. Often device managers are part of it.

A good first step would be top produce sound in the headset only inside debian in isolation.

https://www.linuxquestions.org/question ... 175542418/

But no new card shows up. But at the link above guys say it should be detected as a sound card. Well it also has a microphone so it is strange, but let us focus on audio only.
cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0x92c30000 irq 142

edit: I am now exploring how to configure the kernel module snd-usb-audio now that it is loaded at boot time
snd-hda-audio is loaded too

I tried the below as suggested by dugan at the link above. It cahgnes nothing and the alsamixer command cannot be run any more. So I removed it.
/etc/modprobe.d/alsa.conf
Code:
options snd slots=snd-usb-audio,snd-hda-intel


I will explore more teh kvm options now...
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: Usb headset not present in virt-manager

Postby MagicPoulp » 2020-09-11 09:17

Concerning usb_modeswitch, it seems to me very advanced.

See in particular the introduction here:
https://www.draisberghof.de/usb_modeswitch/

I would need to eavesdrop what is done on Windows. But it does not say how.


After reading the intro below of usb_modeswtich, it seems that the process of setting up drivers on Windows is complex and would require lots of effort to "eavesdrop" and then replicate on linux.
https://www.draisberghof.de/usb_modeswitch/

So I am prioritizing the solution with kvm otions to just forward the usb bus and then let windows do the driver detection.

I have found this.
https://serverfault.com/questions/66742 ... th-libvirt

I made acopy of my fvm image, and I can now edit the xml:
virsh -c qemu:///system list --all
virsh -c qemu:///system edit win10


I cannot add this in <devices>: (bus 2 or 02)
<hub type='usb'>
<address type='usb' bus='2' port='1'/>
</hub>
when saving I get this error:
error: XML error: Missing USB bus 2

It looks likes this:
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='spice' autoport='yes'>
    <listen type='address'/>
    <image compression='off'/>
    </graphics>
    <sound model='ich9'>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' 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='0x01' function='0x0'/>
    </video>
    <redirdev bus='usb' type='spicevmc'>
    <address type='usb' bus='0' port='3'/>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
    <address type='usb' bus='0' port='2'/>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
    <address type='usb' bus='0' port='4'/>
    </redirdev>
    <memballoon model='virtio'>
    <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </memballoon>
    <hub type='usb'>
    <address type='usb' bus='1' port='1'/>
    </hub>
    </devices>
    </domain>





If I add the mouse, I get the following added in the XML. But I can't use it anymore it freezes. It worked before I started anything with the headset. I use the default mouse.


<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x046d'/>
<product id='0xc069'/>
</source>
<address type='usb' bus='0' port='5'/>
</hostdev>








---
I tried various combinations of this with device or port. I can press i to iǵnore the validation but then it fails.

<hub type='usb'>
<address type='usb' bus='2' device='1'/>
</hub>

Failed. Try again? [y,n,i,f,?]:
error: XML error: USB bus 1 requested but no controller with that index is present
Failed. Try again? [y,n,f,?]:
error: XML error: USB bus 2 requested but no controller with that index is present
Failed. Try again? [y,n,i,f,?]:
error: XML error: USB bus 2 requested but no controller with that index is present
Failed. Try again? [y,n,f,?]:




---

update. I could define a new controller, but to simplify, I tried to connect the headset to the bus 0.
I know the mouse was on port 4, I removed teh socket for the mouse and put the headset socket at the same place, assuming it wil remain on port 4.

I rebooted, and now I get this. SO the port 4 is not detected.

lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 10000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ Port 5: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 12: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 12: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M

But int the virtsh edit I could add the following:
<hub type='usb'>
<address type='usb' bus='0' port='4'/>
</hub>
no validation error

And I changed the virt-manager usb connector to use USB 2 instead of 3, graphically.

In Windows, in the control panel / device manager, it shows different things if I change the VM from usb 3 to usb 2, in usb 2 I ahve:
4 times Intel(R) ICH9 Family USB2 Enhanced Host Controller - 293A
4 times USB-rotnav (hub)
And if I add the xml above, the headset Windows is not auto detected but I get a new element after starting windows:
NEC USB Hub

opening it I get lots of stuff that I do not understand.

Device USB\VID_0409&PID_55AA\314159-0000:00:1d.7-4 was started.

Driver Name: usb.inf
Class Guid: {36fc9e60-c465-11cf-8056-444553540000}
Service: usbhub
Lower Filters:
Upper Filters:
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: Usb headset not present in virt-manager

Postby MagicPoulp » 2020-09-11 12:09

update, the support said: the usb is not for the sound but to control colors, and that the sound must use the analog sockets.
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: Usb headset not present in virt-manager

Postby CwF » 2020-09-11 14:08

So you need the lights?
So I am prioritizing the solution with kvm otions to just forward the usb bus and then let windows do the driver detection.

Yes. Allow me to be categorical - soft -pass with the gui you know -- or learn vfio. There is nothing useful in between those two methods.

vfio would pass the whole usb chain, so you need to have all devices segregated. Physically all devices for debian on one usb controller, all for windows on the other. I can't tell if that is possible from the posted topology.

If you can separate the usb devices suitably, then vfio is viable, maybe...This might be new to you and a tad complex. enable iommu, load vfio modules, declare vfio devices, reboot, use vmm to add device...

Does the motherboard have an internal usb header you're not using? That would be helpful. If you would like to use additional usb devices in windows then vfio passing this entire usb header would be the way to go.
CwF
 
Posts: 767
Joined: 2018-06-20 15:16


Return to General Questions

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable