Jump to content
Zenith432

GenericUSBXHCI USB 3.0 driver for OS X with source

920 posts in this topic

Recommended Posts

Advertisement

Sorry to be the first to report a not working. Acer S3 intel i3 with Intel Series 7 chipset. OSX 10.8.2 stock kext did not work, but was reporting usb 3.0. With your kext it shows both USB 3.0 and USB 2.0

 

Without the -gux_defer_usb2 flag I am missing the HD webcam showing up in System Information. Plugging in a usb 3.0 device into the usb port "stalls" the system for about 15 seconds. It comes back without anything showing as connected. Plugin a usb 2.0 device does work since it is deferred to the USB 2.0 kext from the stock kext. Without the "defer" flag, usb 2.0 doesn't show up either.

 

I'm sure it is a strange combination on my ultrabook, I had problems with video as well since on a Series 7 OSX expects intel 4000HD and not the 3000HD. I had no luck with other kext before.

Share this post


Link to post
Share on other sites
Without the -gux_defer_usb2 flag I am missing the HD webcam showing up in System Information.
Ok, Thanks. A webcam is not likely to work at all as the driver does not support isoch endpoints (I mentioned this.)

As for the stall - can you run "xhcdump running" once the keyboard is responsive (and also after the 15 seconds if it's not the same time.) and PM me the result (or post.) It contains a dump of the state of the ports. Also, "xhcdump caps" could help (shows the chip caps.)

Share this post


Link to post
Share on other sites

As requested: the xhcdump caps and running output.

The dump shows that ports 1-3 are disconnected, and on port 4 there's a high-speed device that was properly reset and enabled. If that's the HD webcam you mentioned, it's just not going to work for the time-being because isoch endpoints are not supported (sorry). If it's some other device, next thing to check is "xhcdump slots" which will dump your connected devices, and then "xhcdump endpoints <slotnumber>" which shows the configured endpoints on the device.

Share this post


Link to post
Share on other sites

I attached 3 screen dumps:

 

First shot is how I am running without your Kext

Second shot is after installing your kext with Kext Helper B7 (before reboot)

Third shot is after reboot and your kext installed.

 

There is no change in any of the xhcdump output before or after I plug in a USB device

post-277708-0-23841900-1362678246_thumb.png

post-277708-0-21611100-1362678258_thumb.png

post-277708-0-13551400-1362678269_thumb.png

Share this post


Link to post
Share on other sites
I attached 3 screen dumps:
The kext I attached in post #1, does not support webcams or any other USB device that uses real-time audio or video streaming. Such devices use isoch endpoints.

I plan to add isoch support, but it requires some work, so will take time. If the cam is all you need a driver for, use AppleUSBEHCI.kext (which I assume is active in screenshot #1, although the shot doesn't show it.)

The kext does support bulk and interrupt endpoints, which includes things like disk drives, mice, keyboard, printers, probably digital cameras. Especially, USB3 ports are used for superspeed disk drives.

The reason that the camera info shows up in shot #2 is because that's obtained through the device's control endpoint. Once the OS finds a specific driver for your camera (assuming you have one), it tries to configure the isoch endpoint and fails...

The only curious part is why it doesn't show up at all after reboot. That could be because the cam driver soft-ejects the camera after several attempts to configure it or a timeout. I don't see the point in speculating why a device that can't work anyhow sometimes shows up and sometimes doesn't. If you have a device that's supposed to work with this kext (see above), and it doesn't show up - that's a problem.

 

I tried my own webcam with my kext, and it shows up in System Info both before and after boot, but I don't have an OS X driver for it, so it never gets configured (not even with AppleUSBEHCI.)

 

Update: I notice another possible reason why no devices are showing up after boot - according to caps.txt you posted, USB legacy is enabled on the xHC and it's owned by the bios. This is a known issue with AppleUSBXHCI too. If you could verify for me that no device works on boot, I'll add some code to take ownership of the xHC from the bios, and we'll see if that fixes the problem.

Edited by Zenith432

Share this post


Link to post
Share on other sites

Dr. Brains: I added code to take ownership from the bios - uploaded v1.1.a2 (in post #1.)

 

I hope this fixes the problem with no device showing up after boot.

 

webcam should still not work due to isoch. One workaround for this is to boot with "-gux_defer_usb2". This switches the USB2 ports to EHCI, where isoch is supported. You should still be able to use superspeed devices with the kext that show up under the superspeed hub.

 

Thanks for helping me figure this out.

Edited by Zenith432

Share this post


Link to post
Share on other sites

Hi,

 

there is a lot of improvement with the new version. My USB 3.0 external harddrive gets detected and shows under Super Speed. No more system stalls when inserting the device.

 

Copying data over from external to internal drive does show something funny: It looks like it is reading a block of data, then stops, reads a block again (blocks as in around 64mb at a time). This is by looking at the progress bar during copy and the drive activity led on the external drive.

 

Copying the same file under windows 7 (x64 home premium with usb 3.0 driver) look more smooth, and the activity light continues flashing without "pause".

 

the xhcdump runnning and caps didn't change.

 

Edit: I did some benchmarks and this shows a transferspeed of around 43MB/s. This could be the HDD inself not the USB 3.0 host/kext. I will try tomorrow with a different HDD. Windows benchmark show the same drive around 45MB/s (different benchmark software, so not really fair to compare 1 to 1)

post-277708-0-63562200-1362776400_thumb.png

Share this post


Link to post
Share on other sites

Zenith432

 

I tried compiling it...

 

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Headers/IOKit/usb/USB.h:32:14: 'IOKit/usb/IOUSBPriv.h' file not found

Share this post


Link to post
Share on other sites

So is this better than you patched method? (http://www.insanelymac.com/forum/topic/285157-patched-appleusbxhci-from-os-1082/page__st__60)

 

I'm only now in need of USB3 with my ASUS Maximus IV GENEZ/GEN3 board and trying to find the best way to do so. It uses Asmedia chipset for the two ports (and two by front panel connector).

 

Back when I originally built the system the methods of getting it to work-along with sleep and other things-was a fiasco... So which of these methods is best zenith? I want to incorporate whatever solution into a writeup of the board!

 

Thanks a million-

Phil

Share this post


Link to post
Share on other sites
Is there a possibility you can also build one for SL.
No. SL IOUSBFamily has no support for superspeed devices. The layout of base class IOUSBControllerV3 is older, and GenericUSBXHCI will crash-n-burn if loaded. If fact, I'm not certain which versions of Lion run this kext. I'm pretty sure 10.7.5 does, but don't know about earlier ones.

 

DrBrains: for the stalls you describe in post #10, try updated build 1.1a3 in post #1.

Share this post


Link to post
Share on other sites

I installed 1.1a3 version. Best version until now. It improved benchmark transfer by about 3MB/s on my test harddrive to 87MB/s (WD5000BPVT)

 

Didn't notice any stalls.

Share this post


Link to post
Share on other sites

what a wonderful kext, all freezing problems on device plugin gone. thank you so much. speed is great on lion 10.7.5. lacie bye bye :thumbsup_anim:

Share this post


Link to post
Share on other sites

Good work! :thumbsup_anim: You're awesome...

 

But be careful about tonymac... :P

 

hahaha thats true, tonymac steal other hard work without asking for their permission

Share this post


Link to post
Share on other sites

I'm getting nothing, finally got around to trying this, but not on 10.8.2. Rather the 10.8.3 that just got released, I dumped Caps/Running to a file if that helps but it's not recognizing anything and NOTHING in Console.app. It shows up in system profiler but no devices when plugged in...

 

It's ASmedia from what I know...

 

Phil

Dump.rtf

Share this post


Link to post
Share on other sites
I'm getting nothing, finally got around to trying this, but not on 10.8.2. Rather the 10.8.3 that just got released
I need time to check if GenericUSBXHCI is still binary-compatible with IOUSBFamily in 10.8.3.

 

Edit: Haven't tried to run it yet, but from examination of the header files, should be ok under 10.8.3.

Edit: Verified that GenericUSBXHCI works under 10.8.3. [i also found that I had to remove AppleHDA, because it now blocks VoodooHDA.]

 

, I dumped Caps/Running to a file if that helps but it's not recognizing anything and NOTHING in Console.app. It shows up in system profiler but no devices when plugged in...
The only thing unusual I see in the dump is that the Asmedia 0x1042 does not support 64-bit physical addressing. I haven't really tested that condition. So what I'll do is simulate it with the xhci chip I have, and see if it screwes things up. Edited by Zenith432

Share this post


Link to post
Share on other sites

The only thing unusual I see in the dump is that the Asmedia 0x1042 does not support 64-bit physical addressing. I haven't really tested that condition. So what I'll do is simulate it with the xhci chip I have, and see if it screwes things up.

 

Thats interesting, am I the first Asmedia user? Let me know if you want me to test anything on the actual system if you don't want to simulate anything. Thanks for looking into it :)

Share this post


Link to post
Share on other sites

I uploaded v1.1a4 (in post #1) with a fix for the ASM1042 (problem mentioned in post #20.)

Also enhanced debug information printed by xhcdump.

The crash during sleep (post #24) still being worked on. [Fixed for 1.1]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By shiecldk
      Warning: This driver is made for none-Intel chipset USB3.0 controllers.
       
      This AppleUSBXHCI.kext is based on Zenith432's patch.
      Original Topic
       
      Please install this driver to /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns.
      Alternatively, you can use Clover's KextsToPatch with the following Binary patch.
       
      Binary patch description (Hex & Assembly Codes):
       
       
      Chipset Compatible List: (Working/Semi-working)
      Please feel free give some feedbacks, if your chipset is not on this list, or if you think there is something wrong about the list.
      NEC/Renesas:
      D720200
      D720200a
      D720201
      D720202
      D720210
      Etron:
      EJ168
      EJ168a
      EJ188
      EF198
      Fresco Logic:
      FL1000
      FL1009
      FL1100
      VIA:
      VL800
      VL801
      VL805
      VL806
      Texas Instruments:
      TUSB7320
      TUSB7340
      ASMedia:
      ASM1042
       
      If this driver doesn't work for you, restore the original AppleUSBXHCI.kext and check out Zenith432's GenericUSBXHCI.kext.
    • By Angelo_
      Since when I updated to 10.13.6 (and possibly .5 since i don't use usbs that often) my usb 3.0 drives don't work on usb 3.0 ports or hubs and work only if inserted slowly and get recognized as usb 2.0s in that case (480mb/s in sysinfo) and if i try to put my hackintosh to sleep the screen turns black for a second and then it takes me to the login screen instead of going to sleep, this usb issue happened to me on 10.13.2/3 too, is there a way to fix it ? Thank you
       
      CLOVER not working usb 3.0s+ sleep.zip
    • By cwestpha
      Looks like after the 10.12.6 update something reset in my USB subsystem and now I am no longer able to reliably use almost half of my USB ports. This is across both USB 2.0 and 3.x ports. It looks like the ports re-organized themselves and I am hitting limits again though I am not sure why (granted I have 4 USB hubs attached to my computer in addition to the internal ones). I guess I havent been keeping up on grooming my edits and patches since .3 so it was bound to happen. [i really hope the USB subsystem is better in 10.13]
       
      Any assistance would be appreciated. I have attached my ACPI dumps as patched by Clover, the original unpatched dumps, my current config.plist, my patched ssdt.aml, and an IOREG USB dump.
      Asrock Z170 Ext 6+ 6700K @ 4.4.zip
×