corpnewt / USBMap

Python script for mapping USB ports in macOS and creating a custom injector kext.
MIT License
1.03k stars 88 forks source link

USB3 cannot recognize USB2 device #22

Closed hpglw closed 3 years ago

hpglw commented 3 years ago

I created USBMAP.kext with USBMAP. The USB3 interface works very well, but when connected to a USB2 device, it cannot be recognized. It seems that only USB3 devices can be used. Then, the USB2 interface can only use USB2 devices. When the USB3 device is connected, it still cannot be recognized. Can help?

corpnewt commented 3 years ago

From your description, it sounds like you've only mapped one port personality for the physical USB 3 ports. Remapping and including both the USB 2 and USB 3 personalities for each physical USB 3 port should fix that issue.

-CorpNewt

hpglw commented 3 years ago

thank you very much. so, if T:1,5,6,7:3, I need to input T:1,5,6,7:0 again, I think that means it.

corpnewt commented 3 years ago

No - that only tells the injector which physical port type each port is. If you set it to 0, it will assume it's physically a USB 2 type-A port. If you set it to 3, it could be the USB 2 or 3 personality of a physical USB 3 type-A port.

-CorpNewt

hpglw commented 3 years ago

So what should i do “Remapping and including both the USB 2 and USB 3 personalities for each physical USB 3 port”。 My motherboard has 2 physical usb2 ports and 4 physical usb3 ports. My command is:T:13,14:0 and T:1,5,6,7:3。

thank you very much.

corpnewt commented 3 years ago

Your 4 physical USB 3 ports should each have 2 port personalities. One for the USB 2 personality, one for USB 3. My prior comment suggests that you ensure you're enabling both personalities for each USB 3 port to allow them to work with USB 2 and USB 3 devices.

-CorpNewt

johncolby commented 3 years ago

@osxme take a look at my setup. It sound like yours should look similar. I use a single USB 3.2 gen 1 controller, which has 4 physical ports, each with USB 2 and USB 3 personalities. My port map looks like:

  #######################################################
 #                  Edit USB Ports                     #
#######################################################

    ----- pci1022,149c@0 Controller -----
[#] 1. AppleUSB20XHCIPort | 00100000 | Type 3
    3HS
    - USB Receiver
[#] 2. AppleUSB20XHCIPort | 00200000 | Type 3
    4HS
    - IOBluetoothHostControllerUSBTransport
[#] 3. AppleUSB20XHCIPort | 00300000 | Type 3
    1HS
    - AppleUSB20Hub
        - ALT Keyboard
[#] 4. AppleUSB20XHCIPort | 00400000 | Type 3
    2HS
    - IOBluetoothHostControllerUSBTransport
[#] 5. AppleUSB30XHCIPort | 00500000 | Type 3
    3SS
    - BUP Slim BK
[#] 6. AppleUSB30XHCIPort | 00600000 | Type 3
    4SS
    - BUP Slim BK
[#] 7. AppleUSB30XHCIPort | 00700000 | Type 3
    1SS
    - BUP Slim BK
[#] 8. AppleUSB30XHCIPort | 00800000 | Type 3
    2SS
    - BUP Slim BK

Notice how I've gone around and, one by one, plugged in the same USB 2 device (bluetooth dongle, plus my keyboard and mouse RF receiver) and USB 3 device (SSD drive). The plug type for all of them is "3". Those personalities correspond to these physical ports on the motherboard IO panel:

image

Hope this helps. Good luck with your hack!

hpglw commented 3 years ago

Thank you very much, I will try

@osxme take a look at my setup. It sound like yours should look similar. I use a single USB 3.2 gen 1 controller, which has 4 physical ports, each with USB 2 and USB 3 personalities. My port map looks like:

  #######################################################
 #                  Edit USB Ports                     #
#######################################################

    ----- pci1022,149c@0 Controller -----
[#] 1. AppleUSB20XHCIPort | 00100000 | Type 3
    3HS
    - USB Receiver
[#] 2. AppleUSB20XHCIPort | 00200000 | Type 3
    4HS
    - IOBluetoothHostControllerUSBTransport
[#] 3. AppleUSB20XHCIPort | 00300000 | Type 3
    1HS
    - AppleUSB20Hub
        - ALT Keyboard
[#] 4. AppleUSB20XHCIPort | 00400000 | Type 3
    2HS
    - IOBluetoothHostControllerUSBTransport
[#] 5. AppleUSB30XHCIPort | 00500000 | Type 3
    3SS
    - BUP Slim BK
[#] 6. AppleUSB30XHCIPort | 00600000 | Type 3
    4SS
    - BUP Slim BK
[#] 7. AppleUSB30XHCIPort | 00700000 | Type 3
    1SS
    - BUP Slim BK
[#] 8. AppleUSB30XHCIPort | 00800000 | Type 3
    2SS
    - BUP Slim BK

Notice how I've gone around and, one by one, plugged in the same USB 2 device (bluetooth dongle, plus my keyboard and mouse RF receiver) and USB 3 device (SSD drive). The plug type for all of them is "3". Those personalities correspond to these physical ports on the motherboard IO panel:

image

Hope this helps. Good luck with your hack!

Thank you very much, I will try

hpglw commented 3 years ago

Your 4 physical USB 3 ports should each have 2 port personalities. One for the USB 2 personality, one for USB 3. My prior comment suggests that you ensure you're enabling both personalities for each USB 3 port to allow them to work with USB 2 and USB 3 devices.

-CorpNewt

Thank you very much, I will try

JKBWycz commented 3 years ago

I have a similar issue with an x79 board, where the VIA VL805 controller is used. I had to create an USB reset SSDT to get USB 2.0 working and possibly a USB RHUB, but get a syntax error while compiling. Screenshot 2021-01-03 at 01 44 28 Screenshot 2021-01-03 at 01 34 28

Also no USB 2.0 devices are are detected when connected. I tried to rename he entry, but then it doesn't work and the path isn't updated in IOREG. USB 3.0 gets mapped with no issue

JKBWycz commented 3 years ago

Nevermind the RHUB, it seems to work, yet only for flash drives with usb 2.0, peripherals don't get properly detected (?!)

JKBWycz commented 3 years ago

Finally, I did inject the device via SSDT and named it XHCI2, as it was not present in the DSDT and the USB 2.0 devices are now visible in System Report, when connected, but still not all are detected properly, e.g. my iLok blinks shortly and goes down, but thumb drives remain detected Screenshot 2021-01-04 at 11 42 05 Not sure if RHUB is necessary, but after the rename I was able to compile the SSDT. Is there a power issue witth the ports or what should I look fore and where?

JKBWycz commented 3 years ago

I checked all current information of USB devices and EC-USBX seems to work, but still some of the USB 2.0 devices don't work Screenshot 2021-01-05 at 18 09 42

hpglw commented 3 years ago

My English is not good, I use Google Translate. I have solved the problem. Need to connect the usb3 device and usb2 device on the usb3.0 interface, so I found a different id. I only plugged the usb3 device on the usb3 interface before, so the usb2 could not be found.

johncolby commented 3 years ago

Exactly, nice job @osxme!

@corpnewt can close.

likhner commented 3 years ago

I will join the discussion.

I have exactly the same problem as @osxme and exactly the same fix. But is there any proper explanation why when plugging 2.0 devices into a 3.0 port a new port is supposedly detected?

And yes, how do I mark these new ports, as 2.0 or 3.0?

robbins commented 3 years ago

I will join the discussion.

I have exactly the same problem as @osxme and exactly the same fix. But is there any proper explanation why when plugging 2.0 devices into a 3.0 port a new port is supposedly detected?

And yes, how do I mark these new ports, as 2.0 or 3.0?

A new port is detected because the USB 3 ports have to still include USB2.0 functionality for backwards compatibility. There's more info on this great wiki page: https://dortania.github.io/OpenCore-Post-Install/usb/#macos-and-the-15-port-limit

sinfere commented 3 years ago

I will join the discussion.

I have exactly the same problem as @osxme and exactly the same fix. But is there any proper explanation why when plugging 2.0 devices into a 3.0 port a new port is supposedly detected?

And yes, how do I mark these new ports, as 2.0 or 3.0?

when I plug in 2.0 device into a 3.0 port, no new port detected, anyone can help?