Jump to content
Sign in to follow this  
KoNeko

USB Passthrough not working.

8 posts in this topic Last Reply

Recommended Posts

Posted (edited)

i have a KMV ( a hddmi one with 4 ports that can i can use to use 4 computers/outputs over hdmi i can also connect my kb and mouse to it.

 

it works when i use my normal computer but when i want to passthrough it to the VM it doesnt work.

 

i checked the iommu

00:14.08086:8cb1USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller

USB devices attached to this controller:

Bus 003 Device 007: ID 09eb:0131 IM Networks, Inc.

Bus 003 Device 006: ID 047d:1020 Kensington Expert Mouse Trackball

Bus 003 Device 005: ID 09ea:0130

Bus 003 Device 003: ID 05e3:0610 Genesys Logic, Inc. 4-port hub

Bus 003 Device 011: ID 24ae:1006 RAPOO Rapoo 2.4G Wireless Touchpad Keyboard

Bus 003 Device 002: ID 1b1c:0c03 Corsair H100iGTX Cooler

Bus 003 Device 004: ID 058f:6387 Alcor Micro Corp. Flash Drive

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 004 Device 002: ID 05e3:0612 Genesys Logic, Inc. Hub

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

 

this is from the vfio plugin but i cant pass this one as it also holds my Unraid flash drive.

 

if i put the USB Controller on the vm settings to usb 2.0  keyboard and mouse not working

if i put it on usb 3.0 only mouse is working and no keyboard

 

i have a seperate KB/mouse combo connected directly on the unraid server which is the rapoo one. and that works fine but i want to passthrough my normal kb and mouse. ANy idea how i can fix this ?

 

i got my GPU etc working after some tricks from spaceinvaderone. 

 

the log from the VM

 

boot strict=on \
-device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x7.0x7 \
-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x7 \
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x7.0x1 \
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x7.0x2 \
-device ahci,id=sata0,bus=pci.0,addr=0x3 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 \
-blockdev '{"driver":"file","filename":"/mnt/user/isos/virtio-win-0.1.173-2.iso","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-2-format","read-only":true,"driver":"raw","file":"libvirt-2-storage"}' \
-device ide-cd,bus=sata0.1,drive=libvirt-2-format,id=sata0-0-1 \
-blockdev '{"driver":"host_device","filename":"/dev/disk/by-id/ata-Samsung_SSD_860_EVO_250GB_S3YJNF0K211353T","node-name":"libvirt-1-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"raw","file":"libvirt-1-storage"}' \
-device ide-hd,bus=sata0.2,drive=libvirt-1-format,id=sata0-0-2,bootindex=1,write-cache=on \
-netdev tap,fd=35,id=hostnet0,vhost=on,vhostfd=36 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:80:bb:95,bus=pci.0,addr=0x2 \
-chardev pty,id=charserial0 \
-device isa-serial,chardev=charserial0,id=serial0 \
-chardev socket,id=charchannel0,fd=38,server,nowait \
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 \
-device usb-tablet,id=input0,bus=usb.0,port=4 \
-device vfio-pci,host=0000:01:00.0,id=hostdev0,x-vga=on,bus=pci.0,addr=0x5,romfile=/mnt/user/system/vbios/Palit.GTX980.4096.rom \
-device vfio-pci,host=0000:00:1b.0,id=hostdev1,bus=pci.0,addr=0x6 \
-device vfio-pci,host=0000:01:00.1,id=hostdev2,bus=pci.0,addr=0x8 \
-device usb-host,hostbus=3,hostaddr=6,id=hostdev3,bus=usb.0,port=1 \
-device usb-host,hostbus=3,hostaddr=7,id=hostdev4,bus=usb.0,port=2 \
-device usb-host,hostbus=3,hostaddr=2,id=hostdev5,bus=usb.0,port=3 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
2020-05-18 16:29:23.178+0000: Domain id=1 is tainted: high-privileges
2020-05-18 16:29:23.178+0000: Domain id=1 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [udev_hotplug_event] ignoring udev action bind
2020-05-18T16:34:56.144198Z qemu-system-x86_64: warning: guest updated active QH
libusb: error [udev_hotplug_event] ignoring udev action bind
2020-05-18T16:39:31.283736Z qemu-system-x86_64: warning: guest updated active QH
2020-05-18T16:39:31.934778Z qemu-system-x86_64: terminating on signal 15 from pid 12644 (/usr/sbin/libvirtd)
2020-05-18 16:39:34.141+0000: shutting down, reason=shutdown

Edited by KoNeko
added log VM

Share this post


Link to post
9 minutes ago, juan11perez said:

this was posted yesterday i think. 

have a look 

 

Yes i saw that one. but im not trying to passthrough any pcie device.

 

my boot USB seems to be on the same group as teh rest of my USB. i tried all ports on my computer  and always gets into the same group.

Share this post


Link to post

So you have a mouse and keyboard attached to a KVM, which in turn is attached via a single USB cable to your unRaid server (with a similar single USB attached to your standalone PC). Is that topology correct?

 

In the listing above, can you please point out which lines relate to they keyboard and mouse attached to the KVM? Can you point out if ione of the hubs listed is the KVM itself?

 

That information would be useful.

 

Do you have the KVM switched to your VM when you are booting unRAID? When you are booting the VM? What exactly are you attempting to pass through to the VM? (a screengrab of your VM config would be useful, particularly the bottom section that shows USB and PCI device passthrough).

 

I use KVMs with VMs myself and they work fine, but I always have a dedicated USB adapter passed through to the VM and have the KVM attached to that. This facilitates native device hot swapping inside the VM and works much much better than trying to get an unRAID device working.

 

 

 

Share this post


Link to post
2 hours ago, meep said:

So you have a mouse and keyboard attached to a KVM, which in turn is attached via a single USB cable to your unRaid server (with a similar single USB attached to your standalone PC). Is that topology correct?

 

In the listing above, can you please point out which lines relate to they keyboard and mouse attached to the KVM? Can you point out if ione of the hubs listed is the KVM itself?

 

That information would be useful.

 

Do you have the KVM switched to your VM when you are booting unRAID? When you are booting the VM? What exactly are you attempting to pass through to the VM? (a screengrab of your VM config would be useful, particularly the bottom section that shows USB and PCI device passthrough).

 

I use KVMs with VMs myself and they work fine, but I always have a dedicated USB adapter passed through to the VM and have the KVM attached to that. This facilitates native device hot swapping inside the VM and works much much better than trying to get an unRAID device working.

 

 

 

I have a  4 port HDMI/keybord/mouse switch. keyboard en mouse and a hdmi cable connected to the switch and than KB/mouse are connect via 1 cable to the PC and 1 to the unraid server and both have a own HDMI cable.

 

Group 3 00:14.08086:8cb1USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller

USB devices attached to this controller:

Bus 003 Device 008: ID 09eb:0131 IM Networks, Inc.

Bus 003 Device 007: ID 047d:1020 Kensington Expert Mouse Trackball

Bus 003 Device 006: ID 09ea:0130

Bus 003 Device 004: ID 05e3:0610 Genesys Logic, Inc. 4-port hub

Bus 003 Device 002: ID 1b1c:0c03 Corsair H100iGTX Cooler

Bus 003 Device 005: ID 058f:6387 Alcor Micro Corp. Flash Drive

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 004 Device 002: ID 05e3:0612 Genesys Logic, Inc. Hub

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

 

691116214_Screenshotfrom2020-05-1921-43-27.png.51d2ff23855883c0721ffed01e418901.png

 

the mouse is the kensington

the keyboard it self i dont see. but the switch seems to be the IM nbetworks. because that is the one i see on teh VM's also

it works fine on my standalone PC.

 

yes the switch is always connected also when im booting the Unraid server. When i go to the bios of the server it all works fine.

 

but once i start a VM i tried windows and LInux both only the mouse works but only when set to USB 3.0 if i use usb 2.0  on the settings page both arnt working.

 

i do have more usb controllers it seems but cant figure out which is that.

 

USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2

USB devices attached to this controller:

Bus 001 Device 002: ID 8087:8009 Intel Corp.

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

when i start the VM and check the log it seems to say this

 

2020-05-19T19:56:53.194611Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2020-05-19T19:56:53.194620Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
libusb: error [_open_sysfs_attr] open /sys/bus/usb/devices/3-9.1.6/bConfigurationValue failed ret=-1 errno=2
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [udev_hotplug_event] ignoring udev action bind

 

Share this post


Link to post
11 hours ago, KoNeko said:

I have a  4 port HDMI/keybord/mouse switch. keyboard en mouse and a hdmi cable connected to the switch and than KB/mouse are connect via 1 cable to the PC and 1 to the unraid server and both have a own HDMI cable.

 

Group 3 00:14.08086:8cb1USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller

USB devices attached to this controller:

Bus 003 Device 008: ID 09eb:0131 IM Networks, Inc.

Bus 003 Device 007: ID 047d:1020 Kensington Expert Mouse Trackball

Bus 003 Device 006: ID 09ea:0130

Bus 003 Device 004: ID 05e3:0610 Genesys Logic, Inc. 4-port hub

Bus 003 Device 002: ID 1b1c:0c03 Corsair H100iGTX Cooler

Bus 003 Device 005: ID 058f:6387 Alcor Micro Corp. Flash Drive

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 004 Device 002: ID 05e3:0612 Genesys Logic, Inc. Hub

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

 

691116214_Screenshotfrom2020-05-1921-43-27.png.51d2ff23855883c0721ffed01e418901.png

 

the mouse is the kensington

the keyboard it self i dont see. but the switch seems to be the IM nbetworks. because that is the one i see on teh VM's also

it works fine on my standalone PC.

 

yes the switch is always connected also when im booting the Unraid server. When i go to the bios of the server it all works fine.

 

but once i start a VM i tried windows and LInux both only the mouse works but only when set to USB 3.0 if i use usb 2.0  on the settings page both arnt working.

 

i do have more usb controllers it seems but cant figure out which is that.

 

USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2

USB devices attached to this controller:

Bus 001 Device 002: ID 8087:8009 Intel Corp.

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

when i start the VM and check the log it seems to say this

 

2020-05-19T19:56:53.194611Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2020-05-19T19:56:53.194620Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
libusb: error [_open_sysfs_attr] open /sys/bus/usb/devices/3-9.1.6/bConfigurationValue failed ret=-1 errno=2
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [udev_hotplug_event] ignoring udev action bind

 

It's odd that the mouse shows up like that, but the keyboard does not.

 

I would strongly advise that you figure out which physical ports are attached to the other controller and pass that controller through. First, you'd need to plug a uniquely named device (say, a usb thumb drive) into each port in turn and observe in your devices list what controller its appearing under. Then, assuming there's nothing else on this controller, and its in its own IOMMU group, use the VFIO-Config plugin to select it for passthrough and reboot. You will then be able to pass the entire controller through to the VM, and plug your KVM into one of those ports. You'll likely find this a much more reliable set up.

 

Bear in mind that some of the ports attached to the controller may be your internal motherboard USB headers.

 

Share this post


Link to post
On 5/20/2020 at 7:53 AM, meep said:

It's odd that the mouse shows up like that, but the keyboard does not.

 

I would strongly advise that you figure out which physical ports are attached to the other controller and pass that controller through. First, you'd need to plug a uniquely named device (say, a usb thumb drive) into each port in turn and observe in your devices list what controller its appearing under. Then, assuming there's nothing else on this controller, and its in its own IOMMU group, use the VFIO-Config plugin to select it for passthrough and reboot. You will then be able to pass the entire controller through to the VM, and plug your KVM into one of those ports. You'll likely find this a much more reliable set up.

 

Bear in mind that some of the ports attached to the controller may be your internal motherboard USB headers.

 

all ports i checked seems to be the same controller.

 

So best case might be a extra USB card in there. But also need to check on that. Because i have a GPU in there and a SAS card for 8 extra sata.

not sure if i add an extra card will impact the performance negatively.

 

While the server is a i7 4790k. Might upgrade maybe this year to a new system. A ryzen one.

Share this post


Link to post

Adding a USB adapter won’t impact performance, and will enhance usability for your setup.

Share this post


Link to post

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.

Sign in to follow this