Ubuntu VM USB Issues - operation failed: Multiple USB devices for 46d:c52b, use to specify one


Ainsley

Recommended Posts

Hi,

I'm trying to pass through my Logitech mouse and keyboard using two dongles but it can only pass through one at a time.

I have tried using the USB Plugin manager but have founnd it's not very stable, and have to continue to disconnect and reconnect on boot.

I have also had look here on the forums,but can't seem to get the XML right.

 

    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
      </source>
      <address type='usb' bus='0' port='3'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
      </source>
      <address type='usb' bus='0' port='4'/>
    </hostdev>


 

Here is the USB devices list:

 

Bus 001 Device 001:    ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002:    ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 003:    ID 048d:8297 Integrated Technology Express, Inc. ITE Device(8595)
Bus 001 Device 004:    ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 005:    ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 006:    ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 002 Device 001:    ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002:    ID 0781:5581 SanDisk Corp. Ultra


 

Thanks in advance.

Link to comment
7 minutes ago, Ainsley said:

I have tried using the USB Plugin manager but have founnd it's not very stable

Maybe @SimonF can help with this, I think it's the best way to do what you want.

 

8 minutes ago, Ainsley said:

I have also had look here on the forums,but can't seem to get the XML right

If you want to do it directly in libvirt (xml) you need to add the source addresses of your usb devices since they both have the same vendor/product id: this worked for me but on some systems the addresses will change on reboot, that's why SimonF recommends the plugin.

Based on your data:

    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
        <address bus='1' device='4'/>
      </source>
      <address type='usb' bus='0' port='3'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
        <address bus='1' device='6'/>
      </source>
      <address type='usb' bus='0' port='4'/>
    </hostdev>

 

  • Thanks 1
Link to comment
2 hours ago, Ainsley said:

Thanks for getting back to me so quickly.

Hi,

 

Looks like the diagnostics is after the reboot so cannot see any messages for Mapping USB devices etc. So when you have started VM can you provide syslogs for the rc.usb_manager events or just the whole syslog if that is easier.

 

I think the issue is that the Serial numbers are identical and that is my key. Setting both to port may help but I think I may need to look at a fix for the status.

 

I suggest using the XML option for now if the port processing doesnt work. But as I am now picking up devices mapped outside of USB Manager it may show both connected but one as outside of my plugin.

 

Screen shot after the VM has been started would be useful.

Edited by SimonF
Link to comment
2 hours ago, Ainsley said:

I have atatched diagnostics & screenshot below.

I have found two mice that have the same serial number so can replicate. If you enable hub process in settings and remove the mappings for the ports and add a port mapping for your hub on 1-11 that may also fix your issue in the short term.

 

image.thumb.png.607cc2cb8e8b5d412c79cb8f3d39e572.png

Edited by SimonF
Link to comment

Hi @SimonF

 

Thanks for your support.

 

It seems the mouse works out of the box when booting the VM. But I have to go and manually disconnect the ports and attach them again so that I am able to use the keyboard. I guess it doesn't help with the serials being exactly the same as they are both by Logitech. Somtimes I get a virsh error when trying to attach.

 

Would you be able to provide how I can add a port mapping? Not so sure what you mean there.


I have attached update screenshots, diagnostics and system log.

 

Screenshot 2022-01-15 at 13.40.24.png

Screenshot 2022-01-15 at 13.40.30.png

tower-diagnostics-20220115-1345.zip tower-syslog-20220115-1346.zip

Link to comment
9 minutes ago, Ainsley said:

Would you be able to provide how I can add a port mapping?

If it has the name of the device it is a device mapping as per the edit settings you have attached. If you have the device defined in the XML the plugin will not be able to map hence the maybe virsh error.  but if you hover over it will show the error.

 

Delete the device mapping in the historical settings by the red X for the device. A Device mappings are setup via the terminal icon and port mapping by the usb icon.

 

Goto settings and enable HUB processing. if you haven't already.

 

image.thumb.png.b301b7d5fa5a1f330fbf171c778fd21e.png

 

With hub process you should only need a single port 1-11 defined, So also delete the 1-11.4 port mapping also.

 

Make sure to enable the Auto connect options on the port 1-11 mapping.

 

See if this works.

  • Like 1
Link to comment

Thanks for your replies @ghost82 and @SimonF

 

Im still a little confused about how this XML should look (first comment).

everytime I try to edit it, it doesn’t work.

 

woukd you be able to point me in the right direction on how it should look?

 

sorry about the formatting but it’s above!

 

<hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x046d'/> <product id='0xc52b'/> <address bus='1' device='4'/> </source> <address type='usb' bus='0' port='3'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x046d'/> <product id='0xc52b'/> <address bus='1' device='6'/> </source> <address type='usb' bus='0' port='4'/> </hostdev

>

Link to comment

Replace this:

    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
      </source>
      <address type='usb' bus='0' port='3'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
      </source>
      <address type='usb' bus='0' port='4'/>
    </hostdev>

 

With this:

    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
        <address bus='1' device='4'/>
      </source>
      <address type='usb' bus='0' port='3'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
        <address bus='1' device='6'/>
      </source>
      <address type='usb' bus='0' port='4'/>
    </hostdev>

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.