macOS Guest Reading USB 3.0 Bus as USB 2.0

Bug #1708551 reported by Divine E
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
QEMU
Expired
Undecided
Unassigned

Bug Description

Description:
I'm having trouble with USB Passthrough. Running `system_profiler SPUSBDataType` on macOS guest confirms that the system "sees" my device, and that qemu is passing *something* through. However, the system sees my connection as USB 2.0, even though i'm passing through XHCI controllers (nec-usb-xhci/qemu-xhci). I suspect this is the reason why my guest is unable to recognize my iPhone in XCode & iTunes.

Parameters:
QEMU release version: 2.10.0-rc0
Bios: [patched version of OVMF](https://github.com/gsomlo/edk2/tree/macboot)]
Command Line: https://pastebin.com/pBSYbrW1
Host: Arch Linux
Guest: macOS v10.12.6
Guest System Info: https://pastebin.com/U1Tihxei

Notes:
1. Observed sometime after late-May-early-June of this year.

2. Due to [a defect in qemu v2.8 which affected GTK users](https://bugs.launchpad.net/qemu/+bug/1578192), and [a recent change to macOS' booting process conflicting with qemu v2.9](https://lists.nongnu.org/archive/html/qemu-devel/2017-03/msg06366.html), i'm forced to use qemu v2.10.0-rc0 (as -rc1 fails to load OVMF right now).

Tags: usb regression
Divine E (direnter)
tags: added: regression
Revision history for this message
Thomas Huth (th-huth) wrote :

Could you please try to run QEMU without the "-usb" option here? "-usb" automatically creates an EHCI and UHCI controller on the q35 machine, so that might be the reason that your USB devices get connected as USB 2.0 instead.

Changed in qemu:
status: New → Incomplete
Revision history for this message
Divine E (direnter) wrote : Re: [Bug 1708551] Re: macOS Guest Reading USB 3.0 Bus as USB 2.0

Doing so returns:
`qemu-system-x86_64: -device usb-tablet,bus=usb-bus.0: Bus 'usb-bus.0' not found`

> On Aug 4, 2017, at 2:31 AM, Thomas Huth <email address hidden> wrote:
>
> Could you please try to run QEMU without the "-usb" option here? "-usb"
> automatically creates an EHCI and UHCI controller on the q35 machine, so
> that might be the reason that your USB devices get connected as USB 2.0
> instead.
>
> ** Changed in: qemu
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1708551
>
> Title:
> macOS Guest Reading USB 3.0 Bus as USB 2.0
>
> Status in QEMU:
> Incomplete
>
> Bug description:
> Description:
> I'm having trouble with USB Passthrough. Running `system_profiler SPUSBDataType` on macOS guest confirms that the system "sees" my device, and that qemu is passing *something* through. However, the system sees my connection as USB 2.0, even though i'm passing through XHCI controllers (nec-usb-xhci/qemu-xhci). I suspect this is the reason why my guest is unable to recognize my iPhone in XCode & iTunes.
>
> Parameters:
> QEMU release version: 2.10.0-rc0
> Bios: [patched version of OVMF](https://github.com/gsomlo/edk2/tree/macboot)]
> Command Line: https://pastebin.com/pBSYbrW1
> Host: Arch Linux
> Guest: macOS v10.12.6
> Guest System Info: https://pastebin.com/U1Tihxei
>
> Notes:
> 1. Observed sometime after late-May-early-June of this year.
>
> 2. Due to [a defect in qemu v2.8 which affected GTK
> users](https://bugs.launchpad.net/qemu/+bug/1578192), and [a recent
> change to macOS' booting process conflicting with qemu
> v2.9](https://lists.nongnu.org/archive/html/qemu-
> devel/2017-03/msg06366.html), i'm forced to use qemu v2.10.0-rc0 (as
> -rc1 fails to load OVMF right now).
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/qemu/+bug/1708551/+subscriptions

Revision history for this message
Thomas Huth (th-huth) wrote :

Then simply omit the "bus=usb-bus.0" here - the devices then should be put onto the XHCI bus automatically.

Revision history for this message
Divine E (direnter) wrote :

Removing the `bus=usb-bus.0` param from everything, [as shown here](https://pastebin.com/x0Cp70XD), boots fine; but completely breaks mouse functionality. To mitigate, i tried passing through a Logitech mousepad I own--in similar fashion to the iPhone; but Host complained about permissions & `libusb` requiring "write access to USB device nodes".

FWIW, I vaguely recall the `usb-tablet` parameter being "a whole thing" with virtual macOS; however, I'll need to check my records to refresh my memory.

> On Aug 4, 2017, at 11:29 AM, Thomas Huth <email address hidden> wrote:
>
> Then simply omit the "bus=usb-bus.0" here - the devices then should be
> put onto the XHCI bus automatically.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1708551
>
> Title:
> macOS Guest Reading USB 3.0 Bus as USB 2.0
>
> Status in QEMU:
> Incomplete
>
> Bug description:
> Description:
> I'm having trouble with USB Passthrough. Running `system_profiler SPUSBDataType` on macOS guest confirms that the system "sees" my device, and that qemu is passing *something* through. However, the system sees my connection as USB 2.0, even though i'm passing through XHCI controllers (nec-usb-xhci/qemu-xhci). I suspect this is the reason why my guest is unable to recognize my iPhone in XCode & iTunes.
>
> Parameters:
> QEMU release version: 2.10.0-rc0
> Bios: [patched version of OVMF](https://github.com/gsomlo/edk2/tree/macboot)]
> Command Line: https://pastebin.com/pBSYbrW1
> Host: Arch Linux
> Guest: macOS v10.12.6
> Guest System Info: https://pastebin.com/U1Tihxei
>
> Notes:
> 1. Observed sometime after late-May-early-June of this year.
>
> 2. Due to [a defect in qemu v2.8 which affected GTK
> users](https://bugs.launchpad.net/qemu/+bug/1578192), and [a recent
> change to macOS' booting process conflicting with qemu
> v2.9](https://lists.nongnu.org/archive/html/qemu-
> devel/2017-03/msg06366.html), i'm forced to use qemu v2.10.0-rc0 (as
> -rc1 fails to load OVMF right now).
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/qemu/+bug/1708551/+subscriptions

Revision history for this message
Thomas Huth (th-huth) wrote :

Ok, could you maybe try something like this instead:

 qemu-system-x86_64 ... -usb \
    -device qemu-xhci,id=xhci \
    -device usb-tablet,bus=usb-bus.0 \
    -device usb-kbd,bus=usb-bus.0 \
    -device usb-host,bus=xhci.0,vendorid=0x05ac,productid=0x12a8

i.e. use "bus=xhci.0" for the usb-host device?

Revision history for this message
Divine E (direnter) wrote :

In doing so, the device is now unseen by the system.

Thomas Huth (th-huth)
Changed in qemu:
status: Incomplete → Triaged
Revision history for this message
Gerd Hoffmann (kraxel-redhat) wrote :

xhci doesn't work with macos because macos has a white list of supported xhci controllers and ignores the xhci adapters emulated by qemu.

Revision history for this message
Thomas Huth (th-huth) wrote : Moved bug report

This is an automated cleanup. This bug report has been moved to QEMU's
new bug tracker on gitlab.com and thus gets marked as 'expired' now.
Please continue with the discussion here:

 https://gitlab.com/qemu-project/qemu/-/issues/146

Changed in qemu:
status: Triaged → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.