Jump to content

GenericUSBXHCI USB 3.0 driver for OS X with source


928 posts in this topic

Recommended Posts

Thanks for responding.  I tried changing the ioprobe key to -1 and it didn't change anything.  The drives causing the problem did work on the Intel ports, but nothing I connected to the Asmedia USB 3 ports worked, not even keyboard or mouse.

 

I also have about a dozen Seagate USB 3 drives and have tried at least at least 3 others additional that all work fine.  It was just this one Seagate Backup Plus for Mac that didn't work.  I also have some Touro desktop drives that seem to work fine with no issues as well.  I think what's possibly happening is the manufacturers are all starting to switch to a different controller chipset in their drives from what they were using previously.  If that's true, then this problem will become more prevalent very soon.  All the drives I'm having this problem with were purchased only in the last month or so.

 

I'm sure it's the controller chipset on these drives causing the problem.  This post on TMX

Link to comment
Share on other sites

 

Thanks for responding.  I tried changing the ioprobe key to -1 and it didn't change anything.  The drives causing the problem did work on the Intel ports, but nothing I connected to the Asmedia USB 3 ports worked, not even keyboard or mouse.

It seems like you must be doing the edit or install wrong of the genericxhci driver since i have this working well on one of my systems. You need to copy the entire kext to desktop, make the plist edit. save. and then install the kext using a proper kext install utility. Again i know for sure this works if it's done properly and will be the best solution until Zenith can find the bug.

g\

Link to comment
Share on other sites

Here's what I did.

 

1. Show package contents of GenericUSBXHCI.kext. Went to Contents and opened Info.plist with Text Wrangler.  Modified...

 

<key>IOProbeScore</key>

<integer>1</integer>

 

to

 

<key>IOProbeScore</key>

<integer>-1</integer> 

 

 

Saved the plist.

 

2. Opened Kext Wizard and went to install tab.  Selected the GenericUSBXHCI.kext file I modified. Installed it to /System/Library/Extensions.

 

3. Used Kext Wizard to repair permissions and rebuild cache.

 

4. Restart.

 

The modified kext is attached to confirm I did it right.  Could it be conflicting with something else?  I don't have anything other USB kexts installed other than the latest IOUSBFamily 10.8.4 v9 that I got from another thread here.  I do have a DSDT that was patched using PJALM's (over at tmx) repo.  Could that be the problem?

GenericUSBXHCI.kext.zip

Link to comment
Share on other sites

Experimental build for OS 10.8.5: If you're trying to get GenericUSBXHCI to work on OS 10.8.5, please download v1.2.5d5 from here.

 

Let me know if it works, as I don't have 10.8.5 installed.

 

Thanks.

Hi Zenith, first thanks for your work, then I can tell you that with 10.8.5 it doesn't work. I have many HD with different systems. My startup SDD with 10.8.4 works perfectly with your kext. The one with 10.8.5 doesn't. With Mavericks DP& there is an amazing behaviour. It starts well then my USB3 ext HDs disconnect. Just wanted to give you a report. Thanks again

Ciao

Link to comment
Share on other sites

Here's what I did.

 

1. Show package contents of GenericUSBXHCI.kext. Went to Contents and opened Info.plist with Text Wrangler.  Modified...

 

<key>IOProbeScore</key>

<integer>1</integer>

 

to

 

<key>IOProbeScore</key>

<integer>-1</integer> 

 

 

Saved the plist.

 

2. Opened Kext Wizard and went to install tab.  Selected the GenericUSBXHCI.kext file I modified. Installed it to /System/Library/Extensions.

 

3. Used Kext Wizard to repair permissions and rebuild cache.

 

4. Restart.

 

The modified kext is attached to confirm I did it right.  Could it be conflicting with something else?  I don't have anything other USB kexts installed other than the latest IOUSBFamily 10.8.4 v9 that I got from another thread here.  I do have a DSDT that was patched using PJALM's (over at tmx) repo.  Could that be the problem?

 

 

 

 

The modified kext is attached to confirm I did it right.  Could it be conflicting with something else?  I don't have anything other USB kexts installed other than the latest IOUSBFamily 10.8.4 v9 that I got from another thread here.  I do have a DSDT that was patched using PJALM's (over at tmx) repo.  Could that be the problem?

Probably the issue is your modified usb kexts. you shouldn't be mixing so many kexts together and the modified one (i assume the one by andy) is built to work with other controllers besides the intel ones which the vanilla apple kexts aren't. you will need to fix that. You need to use the vanilla 10.8.4 usb kexts + the genericxhci with a -1 ioprobe for this to work.

g\

Link to comment
Share on other sites

Probably the issue is your modified usb kexts. you shouldn't be mixing so many kexts together and the modified one (i assume the one by andy) is built to work with other controllers besides the intel ones which the vanilla apple kexts aren't. you will need to fix that. You need to use the vanilla 10.8.4 usb kexts + the genericxhci with a -1 ioprobe for this to work.

g\

I don't have any other modified USB kexts installed.  I don't even have any other USB kexts installed at all.  Just the IOUSBFamily.kext that is part of OS X by default, and I tried both a modified version of that and the original that came with OS X and had the same result.

Link to comment
Share on other sites

I don't have any other modified USB kexts installed.  I don't even have any other USB kexts installed at all.  Just the IOUSBFamily.kext that is part of OS X by default, and I tried both a modified version of that and the original that came with OS X and had the same result.

You just stated: "other than the latest IOUSBFamily 10.8.4 v9 that I got from another thread here" 

Those are modified kexts dude.

 

They are probably taking ownserhip for the amsedia ports which unmodded apple supplied kext wont do. Something is wonky on your system. again this works and its not rocket science but if you have kexts vying for ownership or some other issue its impossible for me to know whats going on. check your system info after you install to see what kext is working on what controller. It should list genericxhci as the kext loaded for the asmedia and applexhci as kext loaded on the intel. You already know that the genericxhci driver works on your asmedia as per your own tests (minus the hard drive issues) and you know that the apple drivers work well on the intel ports even with the problem drives. This is the same as everyone else is reporting. The issue is getting the right drivers loaded on the right controllers.

 

Maybe start from a fresh install if you cant track down your usb family kext issues. You need completely unmodifeid apple usb kexts in addition to the plist modified genericxhci kext.

g\

Link to comment
Share on other sites

Yes, I had IOUSBFamily 10.8.4 v9 installed, but when I typed that last message I had already removed it and gone back to the OS X default one.  Anyways, I grabbed that kext from my Macbook Pro and installed it and rebuilt the cache.  There must have been something wrong or a modification done that I wasn't aware of with the kext I had because that did the trick.  All the ports are working again.  Unfortunately I no longer am in possession of a USB3 drive that was causing the freezing.  I'll have to get hold of one again and give this a try.  I'll update when I can.  Thanks for your help.

Link to comment
Share on other sites

This GenericUSBXHCI.kext is making USB3 ports as slow as USB2 ports.  I've tested with both the normal 1.2.4 version the one I modified with the IOProbe Score set to -1.  With it installed I get about 13-21MB/s write and 20-30MB/s read on a portable USB3 drive.  Without it installed I get 50-60MB/s write and 90+MB/s read with the same drive.  These speeds are about the same on all Intel and Asmedia ports.  The ports are still listed in System Information as SuperSpeed.

 

Even the faster speeds are slower than USB3 should be, but I think that's because these portable bus-powered drives aren't usually that fast to start with.  Either way, this kext seems to be hurting speeds.  

Link to comment
Share on other sites

 

Even the faster speeds are slower than USB3 should be, but I think that's because these portable bus-powered drives aren't usually that fast to start with.  Either way, this kext seems to be hurting speeds.  

Something is still fishy. I have very good speed with both the generic and apple kext on the relevant ports. Your correct that many bus powered usb 3.0 drives will max out at 50-60mb anyway, but you should see that speed regardless of driver. Please check the following as it will make clear if things are even working correctly for you:

 

Go to system info and identify your USB busses and what driver is loaded. If your intel ports are slowed down when the generic kext is installed then its probably not running with the apple driver and something is wrong. 

 

post-144276-0-08732400-1378029825_thumb.jpg
post-144276-0-15079200-1378029886_thumb.jpg

 

 
The way it works is very simple and there is no room for error when its done correctly.
 
The Apple driver has an IOProbe score of 0 (i think its undefined). But its designed to only find and use the specific intel device ID.
The Generic driver as shipped has an IOProbe score of 1 and it is defined to control any USB 3.0 controller by Class ID.
So since 1 is greater than 0 and because the intel controller (of course) falls within the USB 3.0 Class ID, the generic driver will take over for intel and any other USB 3.0 controller found.
By changing the Generic driver IOProbe to -1 it now has lesser priority then Apple (0). The Apple driver as such takes priority for any device it finds, which in this case is only the intel controller. Then the generic driver is free to control any other non-intel device-id USB 3.0 controller it finds.

 

The Andy edits may have changed the way several drivers on the system work. You may find a re-install the best option if things are still wonky after checking this info.

g\

post-144276-0-08732400-1378029825_thumb.jpg

post-144276-0-15079200-1378029886_thumb.jpg

  • Like 1
Link to comment
Share on other sites

By changing the Generic driver IOProbe to -1 it now has lesser priority then Apple (0). The Apple driver as such takes priority for any device it finds, which in this case is only the intel controller. Then the generic driver is free to control any other non-intel device-id USB 3.0 controller it finds.

 

Thank you, this is a great trick.

 

I like to leave system files alone as far as possible, I'd given up figuring out how to get around this without modifying the Apple driver ioprobescore value. I'd never have thought of trying -1 in zenith's driver, I wasn't aware you could go below zero.

Link to comment
Share on other sites

Genzai, thanks a lot for all your help with this.  I checked System Info and the ports are using the different kext as they should.  I hooked up another external hard drive (actually just a SATA to USB3 interface from an external hard drive I had taken apart previously with a 3.5" hard drive) and tested that instead of my portable drives.  The speeds were the same with or without the kext installed.  I was using The Blackmagic Design Disk Speed Test utility and that shows a slow speed for the portable drive when the kext is installed.  So I ran the AJA System Test and that showed a speed that was the same whether the kext was installed or not.  So the BMD Disk Speed Test seems to give different results for some reason.

 

So you were right of course.  It looks to be working properly just like you said and just an anomaly in the disk speed test.  Now I just need to get hold of a drive that was causing the freezing so I can test that.

 

And thanks for the explanation of what's happening with the IO Probe Score.  It helps a lot to understand how all this is working.

Link to comment
Share on other sites

Hi there,

I'm using Asrock X79 Fatal1ty which packs Texas Instrument TUSB7340 USB 3.0.

I'm also using custom DSDT from RampageDev for this particular motherboard.

 

When I install GenericUSBXHCI.kext, I get KP on boot.

 

Am I doomed with my USB 3.0 Texas Instruments Chipset?

 

PS: Will try to post some boot log to see where the error stack begins.

Link to comment
Share on other sites

Hello,

I use this drivers with my Gigabyte Z77X-UD3H.

 

Sleeping is not working: I get a black screen when waking my computer up (which can be fixed with darkwake=0).

 

The biggest problem I have is that my USB 3.0 Ports are not working anymore after sleeping, just USB 2.0 is working.

How can I fix this? I need my USB 3.0 ports to work after sleep.

 

Edit: gux_nosleep doesn't seem to work here. No difference in behaviour and the problem still exists.

Link to comment
Share on other sites

i have a NEC USB 3 expresscard and thought I would try this driver out versus the older CalDigit Drivers.

 

 

ExpressCard:

 

  Type: XHCI

  Driver Installed: Yes

  MSI: Yes

  Bus: PCI

  Vendor ID: 0x1b21

  Device ID: 0x1042

  Subsystem Vendor ID: 0x174c

  Subsystem ID: 0x2104

 

i have 2 external drives/controllers. 1 is in an Asmedia AS2105 by Sabrent. and the other is a Seagate Backup +.

 

i get a KP,  listing IOUSBFamily on bootup when the Seagate is attached. But if i leave it off and attach live, it will recognize and mount it fine.

(i removed the CalDigit kexts and installed v1.2.4.)

 

any ideas on how to get it boot with the disk attached?

xhcdump caps:

$ ./xhcdump caps
Found a device of class GenericUSBXHCI: IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/EXP4@1C,3/IOPCI2PCIBridge/SLOT@0/GenericUSBXHCI
Kext Version 1.2.4
Vendor 0x1b21, Device 0x1042, Revision 0
CapLength  32
HCIVersion 0x96
MaxSlots 32, MaxIntrs 8, Rsvd(1) 0, MaxPorts 4
IST 1 microframes, ERST Max 32768, Rsvd(2) 0x17, SPR N, Max Scratchpad Bufs 0
U1 Device Exit Latency 0, Rsvd(3) 0, U2 Device Exit Latency 0
AC64 N, BNC N, CSZ N, PPC N, PIND N, LHRC N, LTC N, NSS Y, Rsvd(4) 0x1, MaxPSASize 65536
  xHC Extended Cap ID 1, Specific 0
    Legacy CTLSTS 0x40010000
  xHC Extended Cap ID 2, Specific 0x300
    Supported Protocol Name 0x20425355 PortOffset 1 PortCount 2 ProtocolDefined 0
  xHC Extended Cap ID 2, Specific 0x200
    Supported Protocol Name 0x20425355 PortOffset 3 PortCount 2 ProtocolDefined 0x1
DBOff  0x1800
RTSOff 0x1000
PageSize 4096
Will Reset on Resume
Using MSI
Link to comment
Share on other sites

I had the same problem with 10.8.5 and USB 3 (additional card). After installing 10.8.5 Combo USB3 doesn't work. Then I installed diffrent kexts but nothing works. So I removed all generic USB kexts and installed the Combo 10.8.5 a second time. Then I installed 1.25d5 and after restart all works. 

 

Hope this helps.

 

 

(Asus 5PQ - Quad Core - External Card with 2xUSB 3 and 2x Sata).

Link to comment
Share on other sites

I uploaded v1.2.5 that works on both OS 10.8.5 and 10.9.  It is functionally the same as 1.2.5d5.

 

For Intel Series 7 chipsets (Z77, X79, etc), you should use "-gux_defer_usb2" kernel flag, as the bios sometimes causes conflicts.  This was mentioned several times in the thread.

  • Like 6
Link to comment
Share on other sites

ML 10.8.5, updated to GenericUSBXHCI.kext v1.2.5 - worked initially, but stopped working after one reboot. Didn't make any changes since that I can recall. 

 

Is there any documentation I can provide to help?

 

 

Just tried 1.2.6. No difference.

Link to comment
Share on other sites

×
×
  • Create New...