Jump to content
  • Announcements

    • Allan

      Forum Rules   04/13/2018

      Hello folks! As some things are being fixed, we'll keep you updated. Per hour the Forum Rules don't have a dedicated "Tab", so here is the place that we have our Rules back. New Users Lounge > [READ] - InsanelyMac Forum Rules - The InsanelyMac Staff Team. 
Zenith432

GenericUSBXHCI USB 3.0 driver for OS X with source

920 posts in this topic

Recommended Posts

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.

  • Posts

    • Yup that's fine! Oddly, when rebooting several times it is suddenly gone! Only thing I need to fix is getting 'Headphone' output to work, after sleep. Internal Speakers are working after sleep. I assume to fix this in CodecCommander.kext/ EAPDFix.kext? Anyway thanks for your help!   Yup I have a combo output, so there was something wrong I guess.
    • Nice @yapan4 then we can join forces to make this as good as possible.
    • I had a weird situation, after running great for a while: yesterday I did a reboot and got a KP. Turns out the AstekFusion2Adapter kexts were causing the KP, strange thing is I didn't recall applying any update or a like.  I had to boot with the USB installer, mount the EFI partition to delete the old AstekFusion2Adapter kexts and replaced with the patched version contributed by despeinao. I'm glad the system is working again, not having to reinstall OSX.
    • i think the "red light" you are referring to is that you have a optical SPDIF output (3.5 mm) combo jack. it most likely will be "red" when audio is active. 
    • Domanda , ma il tuo configplist lo ha settato cosi Gengik????
      Noto molte cose atipiche , tipo aperto con Clover configurator nella sezione ACPI il nome DSDT.aml NON è selezionato , quindi in teoria NON dovrebbe caricare il DSDT che hai in Clover ACPI Patch , se usi SSDT x la CPU NON dovrebbero servirti quelle personalizzazioni sempre in configplist sezione CPU ...
      Secondo me dovresti partire da un configplist pulito , xche sempre secondo me c'è rimasto delle schifezze di qualche tool x installare facile    EDIT
      Scaricando il configplist di jolly NOTO ha impostato +o- come intendevo fare io , sistemando quello  sopra elencato e bammmmm NON avvia , mi forniresti x favore Hack info che trovi nella mia firma ???
      Grazie   Ho creato un configplist , se vuoi provare , dovrebbe essere pulito da ogni impurità , se funziona dovrai adattarli tutte le tue personalizzazioni x il boot ..... config.plist.zip


×