USB 3 on Linux Guests with Windows Hosts

Discussions related to using VirtualBox on Windows hosts.
firthmj
Posts: 6
Joined: 29. Jun 2017, 12:10
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Windows 10

USB 3 on Linux Guests with Windows Hosts

Post by firthmj »

Hi,

I'm running a Linux (Debian 9) guest on a Windows 10 Pro host.

Trying to attach a USB 3 memory stick to the guest does not appear to work properly.

It seems others have had a similar problem:

https://askubuntu.com/questions/783076/ ... virtualbox

The device seems to be attaching, as it disappears from the host environment. I then get some kernel errors generated in the Linux guest:

Code: Select all

[  103.729312] usb 1-2: new high-speed USB device number 3 using xhci_hcd
[  103.953459] usb 1-2: device descriptor read/64, error 18
[  104.287092] usb 1-2: device descriptor read/64, error 18
[  104.616878] usb 1-2: new high-speed USB device number 4 using xhci_hcd
[  104.841785] usb 1-2: device descriptor read/64, error 18
[  105.180767] usb 1-2: device descriptor read/64, error 18
[  105.512329] usb 1-2: new high-speed USB device number 5 using xhci_hcd
[  105.534120] usb 1-2: Invalid ep0 maxpacket: 9
[  105.760270] usb 1-2: new high-speed USB device number 6 using xhci_hcd
[  105.781062] usb 1-2: Invalid ep0 maxpacket: 9
[  105.781150] usb usb1-port2: unable to enumerate USB device
The advice on the "Ask Ubuntu" page is to put the USB 3 device behind a USB 2 hub, but (a) this will really hurt performance and (b) I don't have a USB 2 hub handy.

Is there a known problem with USB 3?

I'm running VirtualBox 5.1.28 with the extension pack installed. I've set the guest to have an xHCI USB 3.0 controller, the errors were the same as with the default USB 2.0 EHCI controller.

Thanks in advance
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: USB 3 on Linux Guests with Windows Hosts

Post by mpack »

Please provide a VM log file. With the VM fully shut down, right click it in GUI. Select "Show Log" and save "VBox.log" (ONLY) to a zip file. Attach the zip here.
firthmj
Posts: 6
Joined: 29. Jun 2017, 12:10
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Windows 10

Re: USB 3 on Linux Guests with Windows Hosts

Post by firthmj »

ZIPped log is attached
Attachments
deb-vm-2017-09-25-12-26-54.zip
VBox.log zipped
(35.87 KiB) Downloaded 144 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: USB 3 on Linux Guests with Windows Hosts

Post by mpack »

I don't see anything wrong with the VM settings yet (at least not related to USB - I do see an NVidia DLL being rejected, presumably because it is unsigned).

Are you defining a filter for the device, and are you waiting until the guest OS has booted to its desktop before plugging in the device?

What is the output of "VBoxManage list usbhost", while the device is plugged in (no VM needs to be running) ?
tokenwizard
Posts: 1
Joined: 9. Oct 2017, 22:40

Re: USB 3 on Linux Guests with Windows Hosts

Post by tokenwizard »

I have the exact same issue whether I set the guest to use USB 1.1, 2.0, or 3.0. I only have USB 3 ports on my host laptop. I also get the same dmesg errors as posted by the original poster.

have seen "answers" on other threads that just say "USB 3 support was added in VirtuaBox 5" but that is lame an not really an answer at all. I am running Version 5.1.28 r117968 (Qt5.6.2) with the latest Guest Additions and Extension Packs installed.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: USB 3 on Linux Guests with Windows Hosts

Post by socratis »

tokenwizard wrote:"USB 3 support was added in VirtuaBox 5" but that is lame an not really an answer at all
That's not lame, that's reality. Please read the following thread: USB basics and troubleshooting, all of the posts. If you still have a problem after reading through the whole thing, please follow the advice of the last post.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
timblaktu
Posts: 9
Joined: 5. Mar 2010, 20:59
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: Debian Stretch

Re: USB 3 on Linux Guests with Windows Hosts

Post by timblaktu »

Same errors here with Win10 host, VBox 5.2.6 (and corresponding GA + Extension Pack), Debian 9 guest.

I have followed the instructions at the afore-linked "USB basics and troubleshooting page", and nothing there fixes the problem or sheds quite enough light on this problem. The only thing I know of that I haven't yet done is to verify that a native debian 9 install can mount this USB 3 drive.

To review, here is what I'm doing:

1. Insert USB 3 flash drive (into USB 3 "SS" port), prove it works fine in Windows, "Eject" drive in Windows Explorer
2. Open VBox VM settings, USB tab:
a. "Enable USB Controller" is checked, with USB 2 (EHCI) selected
b. Add filter, choose my device from list (PNY USB 3.0 FD [0100]), edit filter to Delete all values except Name, VendorID and ProductID.
c. Save settings
3. Unplug USB 3 flash drive
4. Start guest VM, login, tail -f /var/log/syslog
5. Plug in USB 3 flash drive
6. Filter is "working" in that the host does NOT mount the drive, however the Debian 9 guest also does NOT mount the drive, syslog shows:

Code: Select all

Feb  5 13:19:55 tblack-stretch kernel: [  631.825255] usb 1-1: new high-speed USB device number 6 using ehci-pci
Feb  5 13:19:55 tblack-stretch kernel: [  632.073892] usb 1-1: device descriptor read/64, error 18
Feb  5 13:19:56 tblack-stretch kernel: [  632.445037] usb 1-1: device descriptor read/64, error 18
Feb  5 13:19:56 tblack-stretch kernel: [  632.793226] usb 1-1: new high-speed USB device number 7 using ehci-pci
Feb  5 13:19:56 tblack-stretch kernel: [  633.045335] usb 1-1: device descriptor read/64, error 18
Feb  5 13:19:57 tblack-stretch kernel: [  633.473260] usb 1-1: device descriptor read/64, error 18
Feb  5 13:19:57 tblack-stretch kernel: [  633.822564] usb 1-1: new high-speed USB device number 8 using ehci-pci
Feb  5 13:19:57 tblack-stretch kernel: [  633.860040] usb 1-1: Invalid ep0 maxpacket: 9
Feb  5 13:19:58 tblack-stretch kernel: [  634.105774] usb 1-1: new high-speed USB device number 9 using ehci-pci
Feb  5 13:19:58 tblack-stretch kernel: [  634.149770] usb 1-1: Invalid ep0 maxpacket: 9
Feb  5 13:19:58 tblack-stretch kernel: [  634.162388] usb usb1-port1: unable to enumerate USB device
7. lsusb shows a "Linux Foundation 2.0 root hub"
8. shutdown guest. I then notice that the host mounts the drive (still plugged in) (I believe this behavior is expected)

I have repeated above steps except substituting 2a as:

a. "Enable USB Controller" is checked, with USB 3 xHCI selected

and the result is identical (except that the syslog read error entries show "usb 1-2" instead of "usb 1-1" (as expected I believe), and lsusb shows a "Linux Foundation 3.0 root hub" (also as expected) )

More details:
* I've ensured my user is in vboxusers group.
* I will attach my vbox logs after this post.
* Output of "VBoxManager list usbhost" with USB flash drive connected includes the device:

Code: Select all

PS C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe list usbhost
Host USB Devices:

UUID:               debd29c1-607f-498a-86fb-23802d4a3d26
VendorId:           0x1bcf (1BCF)
ProductId:          0x000a (000A)
Revision:           6.18 (0618)
Port:               6
USB version/speed:  2/High
Manufacturer:       Sunplus Innovation Technology Inc.
Product:            USB Laser Wheel Mouse
Address:            {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0000
Current State:      Busy

UUID:               a1e971ee-7c13-4552-87f9-31ebbd1c9e2e
VendorId:           0x154b (154B)
ProductId:          0x00d2 (00D2)
Revision:           1.0 (0100)
Port:               22
USB version/speed:  3/Super
Manufacturer:       PNY
Product:            USB 3.0 FD
SerialNumber:       07037BB8BB3A8956
Address:            {36fc9e60-c465-11cf-8056-444553540000}\0008
Current State:      Busy

UUID:               06596964-66d9-4c65-8531-a11046821f72
VendorId:           0x0a12 (0A12)
ProductId:          0x0001 (0001)
Revision:           136.145 (136145)
Port:               7
USB version/speed:  2/High
Manufacturer:       Cambridge Silicon Radio, Ltd
Product:            Bluetooth Dongle (HCI mode)
Address:            {e0cbf06c-cd8b-4647-bb8a-263b43f0f974}\0000
Current State:      Busy

UUID:               2d670806-3471-46b2-be12-96946c35f44d
VendorId:           0x0483 (0483)
ProductId:          0x5710 (5710)
Revision:           2.0 (0200)
Port:               4
USB version/speed:  2/High
Manufacturer:       STMicroelectronics
Product:            obins anne keyboard
SerialNumber:       STM32
Address:            {36fc9e60-c465-11cf-8056-444553540000}\0002
Current State:      Busy

UUID:               f8971d71-28e1-4516-bba7-0d5b62f6e0a1
VendorId:           0x0403 (0403)
ProductId:          0x6001 (6001)
Revision:           6.0 (0600)
Port:               5
USB version/speed:  2/High
Manufacturer:       FTDI
Product:            TTL232R-3V3
SerialNumber:       FTH0C51L
Address:            {36fc9e60-c465-11cf-8056-444553540000}\0007
Current State:      Busy
Please help.

EDIT:
* I confirmed this drive mounts fine in Ubuntu 16, connected to a usb 2 port.
* Then I found this post on Debian 9 USB 3 errors, and then thought to try same steps but in step 1. plug into a 2.0 port instead of 3.0 port.... et voila! she mounts!

Code: Select all

Feb  5 14:02:48 tblack-stretch kernel: [   48.646375] usb 1-2: new high-speed USB device number 3 using xhci_hcd
Feb  5 14:02:48 tblack-stretch kernel: [   49.001890] usb 1-2: New USB device found, idVendor=154b, idProduct=00d2
Feb  5 14:02:48 tblack-stretch kernel: [   49.001894] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb  5 14:02:48 tblack-stretch kernel: [   49.001896] usb 1-2: Product: USB 3.0 FD
Feb  5 14:02:48 tblack-stretch kernel: [   49.001898] usb 1-2: Manufacturer: PNY
Feb  5 14:02:48 tblack-stretch kernel: [   49.001899] usb 1-2: SerialNumber: 07037BB8BB3A8956
Feb  5 14:02:48 tblack-stretch mtp-probe: checking bus 1, device 3: "/sys/devices/pci0000:00/0000:00:0c.0/usb1/1-2"
Feb  5 14:02:48 tblack-stretch mtp-probe: bus: 1, device: 3 was not an MTP device
Feb  5 14:02:48 tblack-stretch kernel: [   49.022367] usb-storage 1-2:1.0: USB Mass Storage device detected
Feb  5 14:02:48 tblack-stretch kernel: [   49.022777] scsi host4: usb-storage 1-2:1.0
Feb  5 14:02:48 tblack-stretch kernel: [   49.022828] usbcore: registered new interface driver usb-storage
Feb  5 14:02:48 tblack-stretch kernel: [   49.024102] usbcore: registered new interface driver uas
Feb  5 14:02:50 tblack-stretch kernel: [   50.549598] scsi 4:0:0:0: Direct-Access     PNY      USB 3.0 FD       PMAP PQ: 0 ANSI: 6
Feb  5 14:02:50 tblack-stretch kernel: [   50.549960] sd 4:0:0:0: Attached scsi generic sg2 type 0
Feb  5 14:02:50 tblack-stretch kernel: [   50.551085] sd 4:0:0:0: [sdb] 30343168 512-byte logical blocks: (15.5 GB/14.5 GiB)
Feb  5 14:02:50 tblack-stretch kernel: [   50.554450] sd 4:0:0:0: [sdb] Write Protect is off
Feb  5 14:02:50 tblack-stretch kernel: [   50.554451] sd 4:0:0:0: [sdb] Mode Sense: 23 00 00 00
Feb  5 14:02:50 tblack-stretch kernel: [   50.557997] sd 4:0:0:0: [sdb] No Caching mode page found
Feb  5 14:02:50 tblack-stretch kernel: [   50.558067] sd 4:0:0:0: [sdb] Assuming drive cache: write through
Feb  5 14:02:50 tblack-stretch kernel: [   50.569286]  sdb: sdb1
Feb  5 14:02:50 tblack-stretch kernel: [   50.577757] sd 4:0:0:0: [sdb] Attached SCSI removable disk
..and the device now shows up in the output of lsusb, lsblk, and I can mount it.

So, the question remains... what is the problem with using a USB 3.0 port with Windows 10 host, Debian Guest?
Attachments
vboxlogs.zip
Had to compress vbox logs (3) bc they were too big to upload.
(96.83 KiB) Downloaded 103 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: USB 3 on Linux Guests with Windows Hosts

Post by mpack »

If you're having fun battling with USB then by all means continue, but I find that the easiest way to access a host drive is using a shared folder. This works just as well with removable drives as with fixed ones. And it doesn't require configuring USB filters or unplugging/replugging devices.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: USB 3 on Linux Guests with Windows Hosts

Post by socratis »

timblaktu wrote:So, the question remains... what is the problem with using a USB 3.0 port with Windows 10 host
Let's recap what you said:
timblaktu wrote: Insert USB 3
timblaktu wrote:(into USB 3 "SS" port)
timblaktu wrote:"Enable USB Controller" is checked, with USB 2 (EHCI) selected
timblaktu wrote:PNY USB 3.0
timblaktu wrote:Unplug USB 3
timblaktu wrote:Plug in USB 3
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
timblaktu
Posts: 9
Joined: 5. Mar 2010, 20:59
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: Debian Stretch

Re: USB 3 on Linux Guests with Windows Hosts

Post by timblaktu »

True, I did write that, but also later I wrote that I did the same with USB 3 xHCI selected and it still didn't work.
mpack wrote:If you're having fun battling with USB then by all means continue, but I find that the easiest way to access a host drive is using a shared folder. This works just as well with removable drives as with fixed ones. And it doesn't require configuring USB filters or unplugging/replugging devices.
Thanks, but I don't think that would have helped me since I was doing some low level operations on the usb stick (e.g. catting an iso file to the stick's /dev/sdb), not simply reading/writing files to the filesystem on there.
arQon
Posts: 226
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: USB 3 on Linux Guests with Windows Hosts

Post by arQon »

For reference, W7 hosts have the same problem. As timblaktu says, plugging such non-working-on-USB3 devices into a USB*2* port instead allows them to work correctly, though obviously much more slowly.

It clearly depends on the device to at least some extent. I have a USB3 stick (PNY, 64GB - can't remember the model unfortunately, but it's super-tiny) that doesn't work on USB3 in this scenario (and is fine on the host, obviously). However, I also have several USB3 HDDs, and those all work fine. (The HDDs are unquestionably working AS USB3 devices, given the transfer rates).

Sorry I don't have a solution. The linux USB code is known to be pretty dodgy though (albeit mostly because the USB spec itself is garbage, and most devices implement it poorly on top of that) and my WAG would be that the root cause is a combination of several factors including (and likely "mostly") the device firmware and the vagaries of the device itself, rather than an issue with VB itself.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: USB 3 on Linux Guests with Windows Hosts

Post by socratis »

arQon wrote:mostly because the USB spec itself is garbage, and most devices implement it poorly on top of that
Not really on #1. Absolutely on #2!
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
_Zephyrus_
Posts: 1
Joined: 29. Mar 2018, 11:51
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Linux,FreeBSD

Re: USB 3 on Linux Guests with Windows Hosts

Post by _Zephyrus_ »

For reference, I am seeing exactly the same issue with a Windows10 host and a FC27 guest. At one point I managed to have the external disk (a WD Elements) mounted inside the Linux guest using a USB2 extension cable (and having USB2 as the USB hub emulated inside the virtual machine), as others have done, but now also this seems to fail -- and I do not understand why. I have also tried to look around for solutions but found nothing so far.
jschwartzman
Posts: 5
Joined: 30. Jun 2011, 23:12
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: opensuse - TUMBLEWEED

Re: USB 3 on Linux Guests with Windows Hosts

Post by jschwartzman »

I'm having the same problem with a Windows 10 host and an opensuse TUMBLEWEED x86_64 guest. lsusb shows no activity when I insert a USB 3.0 device and usbview doesn't see the device. I have the latest virtualbox with vbox extension pack installed. I've applied filters for all of my usb devices. Only a USB1.1 device is detected. My hp zbook workstation only has USB3.0 ports.
journalctl -f produces the following output when I insert a USB3.0 device:
Sep 06 20:19:39 linux-zqyy kernel: usb 1-1: new high-speed USB device number 10 using xhci_hcd
Sep 06 20:19:39 linux-zqyy kernel: usb 1-1: device descriptor read/64, error 18
Sep 06 20:19:40 linux-zqyy kernel: usb 1-1: device descriptor read/64, error 18
Sep 06 20:19:40 linux-zqyy kernel: usb 1-1: new high-speed USB device number 11 using xhci_hcd
Sep 06 20:19:40 linux-zqyy kernel: usb 1-1: device descriptor read/64, error 18
Sep 06 20:19:41 linux-zqyy kernel: usb 1-1: device descriptor read/64, error 18
Sep 06 20:19:41 linux-zqyy kernel: usb usb1-port1: attempt power cycle
Sep 06 20:19:41 linux-zqyy kernel: usb 1-1: new high-speed USB device number 12 using xhci_hcd
Sep 06 20:19:41 linux-zqyy kernel: usb 1-1: Invalid ep0 maxpacket: 9
Sep 06 20:19:41 linux-zqyy kernel: usb 1-1: new high-speed USB device number 13 using xhci_hcd
Sep 06 20:19:41 linux-zqyy kernel: usb 1-1: Invalid ep0 maxpacket: 9
Sep 06 20:19:41 linux-zqyy kernel: usb usb1-port1: unable to enumerate USB device

Please help!
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: USB 3 on Linux Guests with Windows Hosts

Post by mpack »

jschwartzman wrote:Only a USB1.1 device is detected.
Which hints that you did not install the extension pack, despite what you say later. Unfortunately no VM log is provided so we can only speculate.
Post Reply