Ainsley Posted January 15, 2022 Share Posted January 15, 2022 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. Quote Link to comment
ghost82 Posted January 15, 2022 Share Posted January 15, 2022 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> 1 Quote Link to comment
SimonF Posted January 15, 2022 Share Posted January 15, 2022 (edited) Hi @Ainsley How are you mapping the devices in USB Manager. Could you post your diagnostics so I can have a look. Also a screen shot of USB Manager, Edited January 15, 2022 by SimonF Quote Link to comment
Ainsley Posted January 15, 2022 Author Share Posted January 15, 2022 Hi @SimonF & @ghost82 Thanks for getting back to me so quickly. I have atatched diagnostics & screenshot below. Many thanks. tower-diagnostics-20220115-0942.zip Quote Link to comment
SimonF Posted January 15, 2022 Share Posted January 15, 2022 (edited) 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 January 15, 2022 by SimonF Quote Link to comment
SimonF Posted January 15, 2022 Share Posted January 15, 2022 (edited) 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. Edited January 15, 2022 by SimonF Quote Link to comment
Ainsley Posted January 15, 2022 Author Share Posted January 15, 2022 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. tower-diagnostics-20220115-1345.zip tower-syslog-20220115-1346.zip Quote Link to comment
SimonF Posted January 15, 2022 Share Posted January 15, 2022 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. 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. 1 Quote Link to comment
SimonF Posted January 15, 2022 Share Posted January 15, 2022 Just did some more testing on my system I dont this will work either. Sorry I think you will need to use the XML option, but the BUS and DEV numbers will change. I will have to rewrite my key process for this to work, so may take time as it will be a large change. 1 Quote Link to comment
ghost82 Posted January 15, 2022 Share Posted January 15, 2022 25 minutes ago, SimonF said: but the BUS and DEV numbers will change I would give the xml edit a try, works in my case, the device doesn't change the address on reboot/shutdown. 1 Quote Link to comment
Ainsley Posted January 15, 2022 Author Share Posted January 15, 2022 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 > Quote Link to comment
ghost82 Posted January 15, 2022 Share Posted January 15, 2022 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> Quote Link to comment
Ainsley Posted January 15, 2022 Author Share Posted January 15, 2022 Thanks @ghost82 I’ll give that a go! is there anyway to force the same addresses if they do change? Quote Link to comment
ghost82 Posted January 15, 2022 Share Posted January 15, 2022 Just now, Ainsley said: is there anyway to force the same addresses if they do change? I don't know any method. Quote Link to comment
Ainsley Posted January 15, 2022 Author Share Posted January 15, 2022 @ghost82worked like a charm, thank you very much. Quote Link to comment
Recommended Posts
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.