[Spice-devel] USB redirection on W10 does not work (USB2 and USB3)

Snir Sheriber ssheribe at redhat.com
Wed Apr 26 07:10:24 UTC 2017


Hi,


On 04/26/2017 01:26 AM, Oscar Segarra wrote:
> Hi Pavel,
>
> With updated documentation I have configured the USB3 support (nec-xhci)
>
> After setting this configuration, my USB2 pen drive has begun working 
> on my Windows 10 guest. Nevertheless, the USB3 is not working yet.
Does both xhci & usb3 device appear in windows device manager?

As mentioned in the documentation usb3 is less tested, especially on windows
guests, i would suggest to use the EHCI controller set up, that should 
also work with
your usb3 device (but it will fall back to usb2.0 so.. no usb3 speed :/)

>
>  32104 ?        Sl  47:42 /usr/libexec/qemu-kvm -name one-62 -S 
> -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -cpu SandyBridge -m 
> 2048 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 
> c5cfe20c-42a9-4f7b-856d-078d950f47a0 -no-user-config -nodefaults 
> -chardev socket,id=charmonitor,path=/var/lib/libvirt 
> qemu/domain-7-one-62/monitor.sock,server,nowait -mon 
> chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown 
> -boot strict=on *-device nec-usb-xhci*,id=usb,bus=pci.0,addr=0x5 
> -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -device 
> usb-hub,id=hub0,bus=usb.0,port=1 -drive 
> file=/var/lib/one//datastores/0/62/disk.0,format=qcow2,if=none,id=drive-ide0-0-0,cache=directsync 
> -device 
> ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 
> -netdev tap,fd=30,id=hostnet0,vhost=on,vhostfd=32 -device 
> virtio-net-pci,netdev=hostnet0,id=net0,mac=02:00:ba:b8:50:78,bus=pci.0,addr=0x3,bootindex=2 
> -chardev spicevmc,id=charchannel0,name=vdagent -device 
> virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 
> -chardev 
> socket,id=charchannel1,path=/var/lib/libvirt/qemu/channel/target/domain-7-one-62/org.qemu.guest_agent.0,server,nowait 
> -device 
> virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent.0 
> -device usb-tablet,id=input0,bus=usb.0,port=2 -spice 
> port=5962,addr=0.0.0.0,disable-ticketing,seamless-migration=on -k es 
> -vga qxl -global qxl-vga.ram_size=67108864 -global 
> qxl-vga.vram_size=67108864 -global qxl-vga.vgamem_mb=64 -device 
> intel-hda,id=sound0,bus=pci.0,addr=0x4 -device 
> hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev 
> spicevmc,id=charredir0,name=usbredir -device 
> usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=3 -chardev 
> spicevmc,id=charredir1,name=usbredir -device 
> usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=4 -chardev 
> spicevmc,id=charredir2,name=usbredir -device 
> usb-redir,chardev=charredir2,id=redir2,bus=usb.0,port=1.1 -chardev 
> spicevmc,id=charredir3,name=usbredir -device 
> usb-redir,chardev=charredir3,id=redir3,bus=usb.0,port=1.2 -device 
> virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -msg timestamp=on
>
> Thanks a lot.
>
>
> 2017-04-25 20:04 GMT+02:00 Pavel Grunt <pgrunt at redhat.com 
> <mailto:pgrunt at redhat.com>>:
>
>     On Tue, 2017-04-25 at 20:12 +0300, Yuri Benditovich wrote:
>     > It looks like piix3-usb-uhci is full-speed controller. In could be
>     > problematic to redirect high-speed devices to it.
>     > Please try it with addition of ich9-ehci, for example (for USB2).
>     > For USB3 you will need xhci model.
>     > See also https://people.freedesktop.org/~teuf/spice-
>     <https://people.freedesktop.org/%7Eteuf/spice->
>     > doc/html/ch02s06.html
>
>     updated usbredir documentation:
>     https://www.spice-space.org/usbredir.html
>     <https://www.spice-space.org/usbredir.html>
>
>     >
>     > Thanks,
>     > Yuri
>     >
>     >
>     >
>     >
>     > On Tue, Apr 25, 2017 at 7:57 PM, Oscar Segarra <oscar.segarra at gmail.
>     > com> wrote:
>     > > Hi,
>     > >
>     > >
>     > > ps ax | grep qemu
>     > >
>     > >  11538 ?        Sl     2:56 /usr/libexec/qemu-kvm -name one-58 -S
>     > > -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -cpu SandyBridge -m
>     > > 2048 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid
>     > > 601a0119-1052-40e0-aa68-a1bbd0d78fce -no-user-config -nodefaults
>     > > -chardev socket,id=charmonitor,path=/var/lib/libvirt qemu/domain-
>     > > 3-one-58/monitor.sock,server,nowait -mon
>     > > chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-
>     > > shutdown -boot strict=on -device piix3-usb-
>     > > uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-
>     > > pci,id=virtio-serial0,bus=pci.0,addr=0x5 -device usb-
>     > > hub,id=hub0,bus=usb.0,port=1 -drive
>     > > file=/var/lib/one//datastores/0/58/disk.0,format=qcow2,if=none,id=
>     > > drive-ide0-0-0,cache=directsync -device ide-
>     > > hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1
>     > > -netdev tap,fd=29,id=hostnet0,vhost=on,vhostfd=31 -device virtio-
>     > > net-
>     > > pci,netdev=hostnet0,id=net0,mac=02:00:ba:b8:50:7d,bus=pci.0,addr=0
>     > > x3,bootindex=2 -chardev spicevmc,id=charchannel0,name=vdagent
>     > > -device virtserialport,bus=virtio-
>     > > serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.sp
>     > > ice.0 -chardev
>     > > socket,id=charchannel1,path=/var/lib/libvirt/qemu/channel/target/d
>     > > omain-3-one-58/org.qemu.guest_agent.0,server,nowait -device
>     > > virtserialport,bus=virtio-
>     > > serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.gues
>     > > t_agent.0 -device usb-tablet,id=input0,bus=usb.0,port=2 -spice
>     > > port=5958,addr=0.0.0.0,disable-ticketing,seamless-migration=on -k
>     > > es -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-
>     > > vga.vram_size=67108864 -global qxl-vga.vgamem_mb=16 -device intel-
>     > > hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-
>     > > codec0,bus=sound0.0,cad=0 -chardev
>     > > spicevmc,id=charredir0,name=usbredir -device usb-
>     > > redir,chardev=charredir0,id=redir0,bus=usb.0,port=1.1 -chardev
>     > > spicevmc,id=charredir1,name=usbredir -device usb-
>     > > redir,chardev=charredir1,id=redir1,bus=usb.0,port=1.2 -chardev
>     > > spicevmc,id=charredir2,name=usbredir -device usb-
>     > > redir,chardev=charredir2,id=redir2,bus=usb.0,port=1.3 -device
>     > > virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -msg
>     > > timestamp=on
>     > >  17237 pts/2    S+     0:00 grep --color=auto qemu
>     > >
>     > >
>     > >
>     > >
>     > > 2017-04-25 18:24 GMT+02:00 Yuri Benditovich <yuri.benditovich at dayn
>     > > ix.com <http://ix.com>>:
>     > > > Sorry for unclear request.
>     > > > Please run on the host "ps ax | grep qemu", the output gives us
>     > > > the
>     > > > exact command line of qemu instance which creates guest system.
>     > > > This is what I asked for.
>     > > >
>     > > > Thanks
>     > > >
>     > > > On Tue, Apr 25, 2017 at 7:09 PM, Jonathon Jongsma <jjongsma at redh
>     > > > at.com <http://at.com>> wrote:
>     > > > > On Tue, 2017-04-25 at 18:03 +0200, Oscar Segarra wrote:
>     > > > > > My guest system is a Windows 10... I think generic USB2
>     > > > > driver should
>     > > > > > be installed by default...
>     > > > > >
>     > > > > > As it is a Windows guest... there is no "ps" command... :S
>     > > > >
>     > > > > The 'ps' command should be run on the host, not the guest.
>     > > > >
>     > > > >
>     > > > > >
>     > > > > > Thanks a lot.
>     > > > > >
>     > > > > > Th
>     > > > > >
>     > > > > > 2017-04-25 18:00 GMT+02:00 Yuri Benditovich <yuri.benditovic
>     > > > > h at daynix.
>     > > > > > com>:
>     > > > > > > Hi Oscar,
>     > > > > > >
>     > > > > > > Can you please also submit to the bug exact qemu command-
>     > > > > line for
>     > > > > > > Win10 guest, for example output of "ps ax | grep qemu".
>     > > > > > > Is it possible that your guest system does not have USB2
>     > > > > > > controller?
>     > > > > > >
>     > > > > > > Thanks
>     > > > > > > Yuri
>     > > > > > >
>     > > > > > > On Tue, Apr 25, 2017 at 6:40 PM, Oscar Segarra <oscar.sega
>     > > > > rra at gmail
>     > > > > > > .com> wrote:
>     > > > > > > > Sorry but I don't know how to do it... I have installed
>     > > > > vistual
>     > > > > > > > studio in guest and the WDK... but I don't know how to
>     > > > > check
>     > > > > > > > it...
>     > > > > > > >
>     > > > > > > > Is there any detailed step by step document that I can
>     > > > > follow to
>     > > > > > > > debug the driver?
>     > > > > > > >
>     > > > > > > > Thanks a lot.
>     > > > > > > >
>     > > > > > > > 2017-04-25 17:37 GMT+02:00 Victor Toso <lists at victortoso
>     > > > > .com>:
>     > > > > > > > > Hi,
>     > > > > > > > >
>     > > > > > > > > On Mon, Apr 24, 2017 at 11:34:07PM +0200, Oscar
>     > > > > Segarra wrote:
>     > > > > > > > > > Hi, bug opened!
>     > > > > > > > >
>     > > > > > > > > Bug is:
>     https://bugs.freedesktop.org/show_bug.cgi?id=1
>     <https://bugs.freedesktop.org/show_bug.cgi?id=1>
>     > > > > 00778
>     > > > > > > > >
>     > > > > > > > > Debug says:
>     > > > > > > > >
>     > > > > > > > > GSpice-DEBUG: src/usbdk_api.c:62 UsbDk driver is
>     > > > > installed.
>     > > > > > > > > GSpice-DEBUG: src/usbdk_api.c:86 Loading UsbDk API DLL
>     > > > > > > > > GSpice-DEBUG: src/usb-device-manager.c:528 auto-
>     > > > > connect filter
>     > > > > > > > > set to 0x03,-1,-1,-1,0|-1,-1,-1,-1,1
>     > > > > > > > > GSpice-DEBUG: src/usb-device-manager.c:2196 Auto-
>     > > > > connect
>     > > > > > > > > disabled, no hider setup needed
>     > > > > > > > > GSpice-DEBUG: src/usb-device-manager.c:1013 device
>     > > > > added
>     > > > > > > > > 0b05:179c (0000000008274840)
>     > > > > > > > > GSpice-DEBUG: src/usb-device-manager.c:1013 device
>     > > > > added
>     > > > > > > > > 1bcf:0823 (00000000082743A0)
>     > > > > > > > > GSpice-DEBUG: src/usb-device-manager.c:1013 device
>     > > > > added
>     > > > > > > > > 04b4:f02f (0000000008274540)
>     > > > > > > > > GSpice-DEBUG: src/usb-device-manager.c:1013 device
>     > > > > added
>     > > > > > > > > 054c:05ba (0000000008276320)
>     > > > > > > > > GSpice-DEBUG: src/usb-device-manager.c:1013 device
>     > > > > added
>     > > > > > > > > 048d:1366 (0000000008276260)
>     > > > > > > > > GSpice-DEBUG: src/usb-device-manager.c:1013 device
>     > > > > added
>     > > > > > > > > 0a12:0001 (0000000008276800)
>     > > > > > > > >
>     > > > > > > > > It seems sane enough. It would be great to have the
>     > > > > UsbDk debug
>     > > > > > > > > that I
>     > > > > > > > > asked too ;)
>     > > > > > > > >
>     > > > > > > > > Cheers,
>     > > > > > > > >
>     > > > > > > > > >
>     > > > > > > > > > Thanks a lot!
>     > > > > > > > > >
>     > > > > > > > > > 2017-04-24 8:10 GMT+02:00 Victor Toso <victortoso at re
>     > > > > dhat.com <http://dhat.com>>
>     > > > > > > > > :
>     > > > > > > > > >
>     > > > > > > > > > > Hi,
>     > > > > > > > > > >
>     > > > > > > > > > > On Mon, Apr 24, 2017 at 07:47:35AM +0200, Oscar
>     > > > > Segarra
>     > > > > > > > > wrote:
>     > > > > > > > > > > > Hi Victor,
>     > > > > > > > > > > >
>     > > > > > > > > > > > thanks for your quick answer:
>     > > > > > > > > > > >
>     > > > > > > > > > > > Can you confirm that you are using virt-viewer
>     > > > > 5.0?
>     > > > > > > > > > > > Yes
>     > > > > > > > > > > >
>     > > > > > > > > > > > Which kind of device are you trying? Was there
>     > > > > any kind
>     > > > > > > > > of device you
>     > > > > > > > > > > > were able to successfully redirect?
>     > > > > > > > > > > >
>     > > > > > > > > > > > I'm trying to redirect a standard pen drive (jus
>     > > > > > > > > storage). I have been
>     > > > > > > > > > > able
>     > > > > > > > > > > > to successfully redirect my headset (
>     > > > > > > > > > > >
>     https://steelseries.com/gaming-headsets/siberia-
>     <https://steelseries.com/gaming-headsets/siberia->
>     > > > > 350). I
>     > > > > > > > > have tried with
>     > > > > > > > > > > > multiple pen-drives but no one works on the
>     > > > > guest (they
>     > > > > > > > > work properly in
>     > > > > > > > > > > > the client).
>     > > > > > > > > > >
>     > > > > > > > > > > Interesting. Maybe they are mounted in the client
>     > > > > OS and
>     > > > > > > > > UsbDK is unable
>     > > > > > > > > > > to unmount them before redirecting?
>     > > > > > > > > > >
>     > > > > > > > > > > Could you run virt-viewer from command-line with
>     > > > > --spice-
>     > > > > > > > > debug option
>     > > > > > > > > > > and file a bug at [0] with it attached? It would
>     > > > > also be
>     > > > > > > > > helpful to
>     > > > > > > > > > > gather logs from UsbDk side - for that you can
>     > > > > follow items
>     > > > > > > > > 1,2,3 from
>     > > > > > > > > > > [1] (it is a different bug)
>     > > > > > > > > > >
>     > > > > > > > > > > [0]
>     https://bugs.freedesktop.org/enter_bug.cgi?pro
>     <https://bugs.freedesktop.org/enter_bug.cgi?pro>
>     > > > > duct=Spic
>     > > > > > > > > e
>     > > > > > > > > > > [1]
>     https://bugzilla.redhat.com/show_bug.cgi?id=13
>     <https://bugzilla.redhat.com/show_bug.cgi?id=13>
>     > > > > 01088#c2
>     > > > > > > > > > >
>     > > > > > > > > > > Cheers,
>     > > > > > > > > > >
>     > > > > > > > > > > >
>     > > > > > > > > > > > Thanks a lot.
>     > > > > > > > > > > >
>     > > > > > > > > > > > 2017-04-24 7:34 GMT+02:00 Victor Toso <victortos
>     > > > > o at redhat.
>     > > > > > > > > com>:
>     > > > > > > > > > > >
>     > > > > > > > > > > > > Hi,
>     > > > > > > > > > > > >
>     > > > > > > > > > > > > On Sun, Apr 23, 2017 at 11:32:43PM +0200,
>     > > > > Oscar Segarra
>     > > > > > > > > wrote:
>     > > > > > > > > > > > > > Hi,
>     > > > > > > > > > > > > >
>     > > > > > > > > > > > > > In my environmet I have a W10 client and a
>     > > > > W10 guest
>     > > > > > > > > but in spite of
>     > > > > > > > > > > > > > the installation of the latest available
>     > > > > filter
>     > > > > > > > > driver
>     > > > > > > > > > > > > > UsbDk_1.0.19_x64.msi the USB redirection
>     > > > > does not
>     > > > > > > > > work yet.
>     > > > > > > > > > > > >
>     > > > > > > > > > > > > Can you confirm that you are using virt-viewer
>     > > > > 5.0?
>     > > > > > > > > > > > > >
>     > > > > > > > > > > > > > I have tried with an USB2 and USB3 but I get
>     > > > > the
>     > > > > > > > > following messages
>     > > > > > > > > > > in
>     > > > > > > > > > > > > the
>     > > > > > > > > > > > > > W10 guest:
>     > > > > > > > > > > > > >
>     > > > > > > > > > > > > > *USB2*
>     > > > > > > > > > > > > >
>     > > > > > > > > > > > > > [image: Imágenes integradas 2]
>     > > > > > > > > > > > > >
>     > > > > > > > > > > > > > My translation: "USB Storage device has a
>     > > > > problem
>     > > > > > > > > with the driver"
>     > > > > > > > > > > > > >
>     > > > > > > > > > > > > > [image: Imágenes integradas 3]
>     > > > > > > > > > > > > >
>     > > > > > > > > > > > > > *USB3*
>     > > > > > > > > > > > > >
>     > > > > > > > > > > > > > [image: Imágenes integradas 1]
>     > > > > > > > > > > > > >
>     > > > > > > > > > > > > > My translation: "Unkown USB device (Device
>     > > > > descritor
>     > > > > > > > > not valida) it
>     > > > > > > > > > > does
>     > > > > > > > > > > > > > not work correctly"
>     > > > > > > > > > > > >
>     > > > > > > > > > > > > Which kind of device are you trying? Was there
>     > > > > any kind
>     > > > > > > > > of device you
>     > > > > > > > > > > > > were able to successfully redirect?
>     > > > > > > > > > > > >
>     > > > > > > > > > > > > >
>     > > > > > > > > > > > > > Anybody has experienced the same issue?
>     > > > > > > > > > > > > >
>     > > > > > > > > > > > > > Thanks a lot.
>     > > > > > > > > > > > >
>     > > > > > > > > > > > > I tested in win7 only in the past, with both
>     > > > > webcam and
>     > > > > > > > > bulk device
>     > > > > > > > > > > (usb
>     > > > > > > > > > > > > 2.0 only but it should work with usb 3.0 for
>     > > > > windows
>     > > > > > > > > client too).
>     > > > > > > > > > > > >
>     > > > > > > > > > > > > If you were not able to redirect anything so
>     > > > > far, maybe
>     > > > > > > > > it is worth to
>     > > > > > > > > > > > > try by restarting your client machine with
>     > > > > driver
>     > > > > > > > > signature enforcement
>     > > > > > > > > > > > > disabled (a menu on boot by pressing F8 or F9,
>     > > > > IIRC).
>     > > > > > > > > > > > >
>     > > > > > > > > > > > > Let us know the results ;)
>     > > > > > > > > > > > >
>     > > > > > > > > > > > > Cheers,
>     > > > > > > > > > > > >
>     > > > > > > > > > > > > >
>     > > > > _______________________________________________
>     > > > > > > > > > > > > > Spice-devel mailing list
>     > > > > > > > > > > > > > Spice-devel at lists.freedesktop.org
>     <mailto:Spice-devel at lists.freedesktop.org>
>     > > > > > > > > > > > > >
>     https://lists.freedesktop.org/mailman/listin
>     <https://lists.freedesktop.org/mailman/listin>
>     > > > > fo/spice-
>     > > > > > > > > devel
>     > > > > > > > > > > > >
>     > > > > > > > > > > > >
>     > > > > > > > > > >
>     > > > > > > > > > >
>     > > > > > > > > > >
>     > > > > > > > >
>     > > > > > > > > > _______________________________________________
>     > > > > > > > > > Spice-devel mailing list
>     > > > > > > > > > Spice-devel at lists.freedesktop.org
>     <mailto:Spice-devel at lists.freedesktop.org>
>     > > > > > > > > >
>     https://lists.freedesktop.org/mailman/listinfo/spice
>     <https://lists.freedesktop.org/mailman/listinfo/spice>
>     > > > > -devel
>     > > > > > > > >
>     > > > > > > > >
>     > > > > > > >
>     > > > > > > >
>     > > > > > > > _______________________________________________
>     > > > > > > > Spice-devel mailing list
>     > > > > > > > Spice-devel at lists.freedesktop.org
>     <mailto:Spice-devel at lists.freedesktop.org>
>     > > > > > > >
>     https://lists.freedesktop.org/mailman/listinfo/spice-dev
>     <https://lists.freedesktop.org/mailman/listinfo/spice-dev>
>     > > > > el
>     > > > > > > >
>     > > > > > >
>     > > > > > >
>     > > > > >
>     > > > > > _______________________________________________
>     > > > > > Spice-devel mailing list
>     > > > > > Spice-devel at lists.freedesktop.org
>     <mailto:Spice-devel at lists.freedesktop.org>
>     > > > > >
>     https://lists.freedesktop.org/mailman/listinfo/spice-devel
>     <https://lists.freedesktop.org/mailman/listinfo/spice-devel>
>     > > > >
>     > > >
>     > > >
>     > >
>     > >
>     >
>     > _______________________________________________
>     > Spice-devel mailing list
>     > Spice-devel at lists.freedesktop.org
>     <mailto:Spice-devel at lists.freedesktop.org>
>     > https://lists.freedesktop.org/mailman/listinfo/spice-devel
>     <https://lists.freedesktop.org/mailman/listinfo/spice-devel>
>
>
>
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170426/11bd81c5/attachment-0001.html>


More information about the Spice-devel mailing list