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 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
    • By misterphoton
      Thanks to the website for being a resource and making hacktintosh a valuable resource to the little guy.
       
      I have a HP Elitebook 8560p with a Radeon HD 6470m video card / Hackintosh that I was able to get Mavericks onto with everything working but Sierra has problems with the USB 3.0, as well the Radeon Card working with GPU acceleration.
       
      I have installed Sierra and I cannot get the GPU to work with OPEN CL, resolution or the USB 3.0 to be recognized, unlike the Mavericks partition.
       
      As far as the Radeon goes, It is in VGA mode with no GPU acceleration, but it sees it in the system profiler but not correctly with the V RAM. I for the life of me cannot remember how I resolved these issues in Mavericks, as I was foolish enough not to take notes or make a build sheet.
       
      Can you point me in the right direction on these 2 issues? I can provide my contact information as well if this is OK to?
       
      Hardware is: (Bolder text being an immediate priority for assistance if anyone can)
       
      i7 quad core 16gb ram (OK) 2 USB 2 ports working 2 USB 3.0 port not working Radeon HD 6470m with 1024 v RAM, that is in VGA mode with no GPU acceleration motherboard:  Intel MX67QM (not sure if this is a 6, 7, 8 or 9 series chipset) The chipset is listed as MX67QM BIOS: AMI 64 (updated) NO Intel HD graphics enabled on the motherboard HDMI not tested, but says the audio is working via HDMI Intel 82579LM Gigabit LAN not tested Intel 82574 PCIe LAN not tested (not seen, but listed in motherboard specs) Intel Centrino Ultimate N6300 AGN (says for network adapter, but I  Realtek ALC 887 working by Voodoo 2,8,8 Card Reader: Not recognized No dual Intel HD graphics (not seen by system profiler) and HP stated the card is either removed or disabled (perhaps by BIOS)  
       
      Thanks for your time, Nick Teti, Mister Photon Media. [url=&quot;http://www.insanelymac.com/forum/topic/279450-why-insanelymac-does-not-support-tonymacx86/&quot;]#####[/url] worked in the past for USB 3, but I do not remember how I got the GPU issue fixed. I can be contacted through the forum or by my profile if this is not breaking the rules?
    • By insanelymacdonald
      CPU | Intel core i7 6700 3.4Ghz
      Mobo | Gigabyte H170-D3hp
      Ram | Corsair Vengeance 16GB (2x8GB) 2133Mhz
      GPU | Galax GTX970 4GB
      SSD | Samsung 850 Evo 500GB
      PSU | Thermaltake 600w
      OS | 10.11.6

      I initially thought this issue was a blown port and while it still could be hardware I've noticed something very odd.

      Two days ago I was using a USB 3.0 portable drive doing some colour grading in Da Vinci resolve. Quite suddenly, the mouse stopped working and then a couple of seconds later the system reset itself. I have no idea what happened but when the system rebooted a message popped up and for a tense few seconds I was worried the drive was ruined. The message said something like 'drive connected to mac but does not have power' or something along those lines but specifically indicating that I should plug the device in to a port that has power.

      This was the same port the drive was plugged in to when the reset happened and so I unplugged it and moved it to the port above and it worked. I was curious about the issue today and didn't have any critical work to do so I had a test with another bus powered drive that also previously worked fine. This one also had not encountered any dodginess like the sudden system reset either. I plugged it in to the port that I knew had caused issue and received the same message. I plugged it in to the port immediately adjacent and also received the same message. The thing is the drive is spinning so it *is* receiving power and the fact that it's giving me that message suggested to me that is registering on at least some level with OSx.

      Anyone know what I should do?
    • By mediocre
      Ciao a tutti ragazzi, ho aggiornato da Mavericks a Sierra, tutto ok, le uniche 2 cose che non sono riuscito ancora ad installare sono le porte usb 3.0 e la scheda ethernet realtek 8169sc che funzionava con Mavericks, la scheda ethernet è aggiuntiva Pci perchè quella della motherboard si è bruciata ho fatto alcune prove ma non ci sono riuscito qualcuno può aiutarmi per favore? Grazie mille
      Questa sotto è la mia configurazione:
      i5 2400 - Motherboard P8H61 Asus, 12Gb Ram DDR3, SSD Evo 850
    • By rhew90
      Hello, There is a solution to my problem? do not work as USB 3.0 ports 3.1. Also not working the sound card and for this I thought I Buy the Asus Xonar x3 to Solve
×