VirtualBox

Opened 7 months ago

Last modified 4 months ago

#22069 new defect

Problems with forwarding USB devices to the guest machine

Reported by: tutralex Owned by:
Component: USB Version: VirtualBox-7.0.18
Keywords: USB forward STM32 ST-Link programmer Cc:
Guest type: Windows Host type: Linux

Description (last modified by tutralex)

ST-Link v2 programmer is not forwarded to the guest machine. The problems started with virtualbox version 7.0.16. In version 7.0.14 the device works without problems. This bug has been checked and is present in the following host operating systems: Arch Linux (kernel 6.8.9), Linux Mint 21.3 (kernel 6.5.0) and Windows 10 Pro (22H2). Guest operating systems: Windows 10 Pro and Windows 11 Pro. The bug appears when I try to forward the ST-Link v2 programmer to the guest OS, it is not detected in the guest OS, even though the checkbox is checked, and when I try to disconnect ST-Link v2 from the virtual machine, the virtualbox freezes, and I have to kill their processes.

Attachments (6)

VBox (USB 1.1 OHCI) v.7.0.14 work.log (333.6 KB ) - added by tutralex 4 months ago.
VBox (USB 1.1 OHCI) v.7.0.20 bug.log (115.4 KB ) - added by tutralex 4 months ago.
VBox (USB 2.0 OHCI+EHCI) v.7.0.14 work.log (335.8 KB ) - added by tutralex 4 months ago.
VBox (USB 2.0 OHCI+EHCI) v.7.0.20 bug.log (115.7 KB ) - added by tutralex 4 months ago.
VBox (USB 3.0 xHCI) v.7.0.14 work.log (337.2 KB ) - added by tutralex 4 months ago.
VBox (USB 3.0 xHCI) v.7.0.20 work.log (345.0 KB ) - added by tutralex 4 months ago.

Download all attachments as: .zip

Change History (18)

comment:1 by tutralex, 7 months ago

Description: modified (diff)

comment:2 by molej, 5 months ago

What I see is very similar:

1) Conitec software fail to connect to Galep-5 chip programmer.

2) When I disconnect the device by unchecking the checkbox in the virtual machine menu, the guest hang hard, do not even respond when I let VB send it ACPI Off. I need to force shut down the guest machine window.

Host system: Mageia 9

Guest system: MS Windows 7

USB device: Conitec Galep-5 chip programmer

Stopped working after upgrade to VirtualBox 7.0.18, works again when downgrading back to 7.0.14. Mageia do not have 7.0.16 packaged.

Tested for both kernel 6.6.28 and 6.6.37 both in the less patched "linus" and the more by Mageia patched "desktop" kernel flavours.

$ inxi -MC

Machine:

Type: Desktop Mobo: ASRock model: P55 Pro serial: <superuser required>

BIOS: American Megatrends v: P2.60 date: 08/20/2010

CPU:

Info: dual core model: Intel Core i7 870 bits: 64 type: MT MCP cache:

L2: 512 KiB

Speed (MHz): avg: 3481 min/max: 1200/2934 cores: 1: 3481 2: 3481 3: 3481

4: 3481

Reported in Mageia at https://bugs.mageia.org/show_bug.cgi?id=33400, and there I will now link here.

comment:3 by tutralex, 4 months ago

With the release of virtualbox 7.0.20 nothing has changed. The error is not fixed! Will have to go back to 7.0.14 again. Tested: Arch Linux (kernel 6.9.9), Linux Mint 21.3 (kernel 6.5.0-44) and Windows 10 Pro (22H2). Guest operating systems: Windows 10 Pro and Windows 11 Pro.

comment:4 by tutralex, 4 months ago

In virtualbox 7.0.14 USB device forwarding works even if VBoxGuestAdditions v7.0.20 is left installed.

Last edited 4 months ago by tutralex (previous) (diff)

comment:5 by sunlover1, 4 months ago

Which virtual USB controller is configured in the VM settings? XHCI or EHCI/OHCI? BTW, both of you forgot to attach VBox.log file of a VM session where this problem is reproduced. Generally it is not possible to say anything without a VBox.log.

by tutralex, 4 months ago

comment:6 by tutralex, 4 months ago

Ok, some logs (USB 1.1 OHCI and USB 2.0 OHCI+EHCI):

2 logs of working version 7.0.14, connecting and disconnecting ST-Link v2 programmer, everything is fine.

2 logs with errors of version 7.0.20, connecting ST-Link v2 programmer (not found in the device manager), when trying to disconnect, the guest OS (Windows 11) freezes and I killed the virtualbox process!

Looking at attachments: VBox (USB 1.1 OHCI) v.7.0.14 work.log VBox (USB 1.1 OHCI) v.7.0.20 bug.log VBox (USB 2.0 OHCI+EHCI) v.7.0.14 work.log VBox (USB 2.0 OHCI+EHCI) v.7.0.20 bug.log

comment:7 by tutralex, 4 months ago

Hmmm, if you use USB 3.0 xHCI, everything works! Just in case, I'll also attach the logs: VBox (USB 3.0 xHCI) v.7.0.14 work.log VBox (USB 3.0 xHCI) v.7.0.20 work.log

comment:8 by sunlover1, 4 months ago

Thanks for a thorough testing! I hoped that the device would work with a different USB controller. It is good to know that the regression affects OHCI/EHCI only.

comment:9 by molej, 4 months ago

I confirm problem is still in 7.0.20 in my case too. This machine do not have any USB3 controller to try the xHCI driver with.

Last lines in VBox.log when guest immediately hang after I disconnect the USB:

00:07:55.744447 VUSB: Attached '00007feab033ad80[proxy 1c12:0001]' to port 2 on RootHub#1 (FullSpeed) 00:07:56.439998 RTC: period=0x20 (32) 1024 Hz 00:07:56.460781 RTC: period=0x100 (256) 128 Hz 00:07:57.046235 RTC: period=0x200 (512) 64 Hz 00:09:22.211741 VUSB: Detached '00007feab033ad80[proxy 1c12:0001]' from port 2 on RootHub#1 00:09:24.421756 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago

comment:10 by michaln, 4 months ago

The xHCI emulation does not require an xHCI controller on the host any more than the OHCI emulation requires a physical OHCI controller.

comment:11 by molej, 4 months ago

I can in VirtualBox guest settings select USB3 xHCI, boot guest, and then in the guest window frame menu checkmark i.e a connected USB flash stick, but the guest (Windows 7) do not detect it.

That same stick works if setting is USB2.

Ah.... I guess MS Windows 7 do not support USB3...

comment:12 by molej, 4 months ago

OK xHCI works with my device too, after i have in the Windows 7 guest installed USB3 driver per https://us.informatiweb.net/tutorials/it/virtualization/virtualbox-usb-3-0-support-with-windows-7.html

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette