Jump to content

GenericUSBXHCI USB 3.0 driver for OS X with source


928 posts in this topic

Recommended Posts

I uploaded Snapshots/1.2.7d4 that tries to use the Intel low-power mode (on Series 7) in a safer way so it may work without '-gux_no_idle'.  Could not test this though.

Friend with this kext still need to use the kernel flag: "-gux_no_idle" to be able to work in both the ML 10.8.5 as the Mavericks GM is needed here. But a strange thing happens here when I plug in a USB 3.0 USB 3.0 ports it does not "ride", only if I restart the pc with the device already plugged it works! In any version of your kexts!

Link to comment
Share on other sites

This is my first post here; and therefore i would like you Zenith to thank you a million for your work on GenericUSB. It is an essential part of my Hackintosh. Deep bow!

 

I am using 1.2.7d5 at the moment on my GA-Z77X-UP4 TH, i7 3770K running OSX10.8.5 with supplemental update 1.

 

I had some problems with my Lacie Rugged being randomly ejected. Looks like its solved now.

But sometimes the port get corrupted after a dismount and remount. Sometimes its fine, but on the other moment after an eject i can't remount anything USB3 anymore. 

Link to comment
Share on other sites

Does this happen on the Intel Series 7 ports (the ones soldered to the MB), or on the VIA VL800 ports?

If it happens in the Intel series 7 ports, try booting with kernel flag '-gux_no_idle'.

If it happens on the VIA VL800 ports, I need to see 'xhcdump running' after you dismount, remount, and the port isn't recognized.

But sometimes the port get corrupted after a dismount and remount. Sometimes its fine, but on the other moment after an eject i can't remount anything USB3 anymore. 
Link to comment
Share on other sites

Does this happen on the Intel Series 7 ports (the ones soldered to the MB), or on the VIA VL800 ports?

If it happens in the Intel series 7 ports, try booting with kernel flag '-gux_no_idle'.

If it happens on the VIA VL800 ports, I need to see 'xhcdump running' after you dismount, remount, and the port isn't recognized.

I connect them to the front USB ports; so the USB connector on the MOBO header. Thats the intel chip if i am not mistaken. 

I tried this kernel flag but it made things worse the first time. HD's get randomly ejected again. And now the system freezed. 

Next boot with -gux didn't mounted the Lacie. 

Next boot without -gux didn't mounted it too, but a disconnect and reconnect mounted the Lacie. Now it looks fine again. Unmounted and remounted a few times. 

I am sorry, it's vague. It's hard to get my nail between it. 

Link to comment
Share on other sites

I connect them to the front USB ports; so the USB connector on the MOBO header. Thats the intel chip if i am not mistaken. 

I tried this kernel flag but it made things worse the first time. HD's get randomly ejected again. And now the system freezed. 

Next boot with -gux didn't mounted the Lacie. 

Next boot without -gux didn't mounted it too, but a disconnect and reconnect mounted the Lacie. Now it looks fine again. Unmounted and remounted a few times. 

I am sorry, it's vague. It's hard to get my nail between it. 

I have the feeling that the random dismount happens only, or more often, or at least has anything to do with, when i have another USB3 disk attached to my front USB3 ports (that are on the header on the mobo). This other drive is a regular HD that is in a Sharkoon UBS3 U3 quickport that has it's own power supply. 

 

Edit: No, this is not the case. The random eject happens also with just the Lacie. 

Link to comment
Share on other sites

My motherboard GA-Z77-D3H rev 1.1

 

have intel chipset PCI Device ID: 0x1e31 and Etron PCI Device ID:0x7023

 

testing GenericUSBXHCI.kext from 1.2.6 to 1.2.7d5

 

Western Digital MyPassport USB3 2TB works great linking at full speed (5Gb/sec)

 

but need a restart to get it mounted

 

​I hope you can fix it

 

thanks you for great work

 

cheers!

Link to comment
Share on other sites

Zenith432, today I tested GenericUSBXHCI.kext 1.2.6 with new ASMedia ASM1042 ExpressCard on MacBook Pro 17 OS X 10.8.5.

There is some advantages and bugs between It and Renesas upd720202 one.

Strange bug is: I use ASM1051E UAS enclosure with NTFS-formatted drive inside for test. Also, I have Paragon NTFS 10.1 driver installed (and can write to NTFS volumes).

It works with both cards, but on USB 2.0 port or on USB 3.0 port on NEC ExpressCard no issues for now.

If I connect this to ASM1042 ExpressCard, there is error in syslog and drive mounted readonly (uses Apple ro NTFS driver). So looks like it's GenericUSBXHCI + ASM1042 isssue (It have no error with NEC card).

 

​Under spoiler log with HDD attached to a) ASM1042 and B) NEC upd720202 USB 3.0 port:

 

 

 

23.10.13 1:41:33,000 kernel[0]: USBMSC Identifier (non-unique): 00000000000000000000 0x174c 0x5106 0x1, 3
23.10.13 1:41:37,619 ReportCrash[524]: DebugSymbols was unable to start a spotlight query: spotlight is not responding or disabled.
23.10.13 1:41:37,730 ReportCrash[524]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
23.10.13 1:41:37,730 ReportCrash[524]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
23.10.13 1:41:37,730 ReportCrash[524]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
23.10.13 1:41:37,731 ReportCrash[524]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
23.10.13 1:41:37,731 ReportCrash[524]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
23.10.13 1:41:37,731 ReportCrash[524]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
23.10.13 1:41:37,731 ReportCrash[524]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
23.10.13 1:41:37,731 ReportCrash[524]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
23.10.13 1:41:37,731 ReportCrash[524]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
23.10.13 1:41:37,731 ReportCrash[524]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
23.10.13 1:41:37,737 diskarbitrationd[22]: unable to probe /dev/disk1s1 (status code 0x0000000A).
23.10.13 1:41:37,793 ReportCrash[524]: Saved crash report for ufsd_NTFS.util[521] version ??? to /Library/Logs/DiagnosticReports/ufsd_NTFS.util_2013-10-23-014137_mbp17.crash
23.10.13 1:41:38,000 kernel[0]: NTFS volume name VIDEO-NTFS, version 3.1.
23.10.13 1:42:31,452 CVMServer[85]: Check-in to the service com.apple.cvmsCompAgent_x86_64 failed. This is likely because you have either unloaded the job or the MachService has the ResetAtClose attribute specified in the launchd.plist. If present, this attribute should be removed.
23.10.13 1:42:31,554 CVMServer[85]: Check-in to the service com.apple.cvmsCompAgent_x86_64 failed. This is likely because you have either unloaded the job or the MachService has the ResetAtClose attribute specified in the launchd.plist. If present, this attribute should be removed.
23.10.13 1:43:11,000 kernel[0]: [ PCI configuration begin ]
23.10.13 1:43:11,000 kernel[0]: [ PCI configuration end, bridges 13, devices 18 ]
23.10.13 1:43:22,000 kernel[0]: [ PCI configuration begin ]
23.10.13 1:43:22,000 kernel[0]: [ PCI configuration end, bridges 13, devices 17 ]
23.10.13 1:43:41,000 kernel[0]: [ PCI configuration begin ]
23.10.13 1:43:41,000 kernel[0]: [ PCI configuration end, bridges 13, devices 18 ]
23.10.13 1:43:42,000 kernel[0]: USBMSC Identifier (non-unique): 00000000000000000000 0x174c 0x5106 0x1, 3
23.10.13 1:43:46,337 fseventsd[54]: could not open <</Volumes/VIDEO-NTFS/.fseventsd/fseventsd-uuid>> (No such file or directory)
23.10.13 1:43:46,338 fseventsd[54]: log dir: /Volumes/VIDEO-NTFS/.fseventsd getting new uuid: EF9B7969-153A-4E3A-A4C5-8C21D92C9325

 
Another issue with ASM1042 it works only if ExpressCard installed on boot / once. If I unmount card from task bar and replug it, there is no card detection (and icon in task bar) so it doesn't work.
It also doesn't detected if card inserted on live system. And it works fine after sleep, if card was installed on boot (so detected). Probably, it's as media firmware issue?
It's not the same with Nec upd720202 card, which always detected on the fly.
 
The good thing is ASM1042 ExpressCard works fine with another USB 3.0 drive (I mention it in my previous post) when there is external power attached. Nec ExpressCard always stalled with it.
 
P.S. Firmware on ASM1042 was updated to last possible which I find on the net: xHCI_v120816_02_02_6D.bin
 
Also, there is new bug and kernel panic, I can't even boot laptop with GenericUSBXHCI 1.2.7d7 installed and Nec or ASM1042 + UASP drive attached. All OK with last 1.2.6 thou.
ASM1042 just disappears from system if I connect the UAS drive to it on live system and working card (without KP). Nec card give me KP with the same situation (works fine with Thumb Drive, KP immediately on UAS drive insert).
Dumps attached.
 
p.p.s. The speed on GenericXHCI 1.2.6 + Nec + UAS + SSD on MacBook Pro 2011 is amazing ;-)

ufsd_NTFS.util_2013-10-23-014137_mbp17.crash.txt

xhcidump-asm1042.txt

Kernel_2013-10-23-025237_mbp17.panic.txt

Kernel_2013-10-23-030409_mbp17.panic.txt

Kernel_2013-10-23-031149_mbp17.panic.txt

post-42158-0-97723100-1382485449_thumb.png

post-42158-0-32488100-1382485457_thumb.png

post-42158-0-32326100-1382485464_thumb.jpg

  • Like 1
Link to comment
Share on other sites

Update on my issue with 10.9:

 

ASUS Gene V

2500K

Using 7 series port on back

 

Latest GenericUSBXHCI available.

 

10.8.5 - All works without issues.

10.9 (retail) - USB3 Drive (Seagate 2TB) detected and mounting but reading/writing give errors (as attached).

 

 

 

post-948717-0-36500700-1382500544_thumb.png

Link to comment
Share on other sites

nikk: 1.2.7d8.

It works ) No more panic ) Thanks!

But only in RO mode with Apple driver in case of ASMedia and in RW mode with Paragon driver in case of NEC. Does it xhci version dependent?

 

Don't you have any info why ASM1042 doesn't detected if inserted after boot? Is it firmware issue?

I read this chipset also (as Nec 720202) supports streams, but there is only xhci 0.96 compliance according Windows Driver info, not 1.0, and it works in BOT there. Do I need special fw to enable UAS for it?

ufsd_NTFS.util_2013-10-23-143958_mbp17.crash.txt

Link to comment
Share on other sites

nikk,

you can disable UAS by adding the following In GenericUSBXHCI.kext/Contents/Info.plist

<key>DisableUAS</key>
<true/>

(this should be inside the personality, e.g. after IOProbeScore).

 

This will disable UAS on all your xhci controllers, so if UAS works with Renesas, but not with ASM1042 - you lose both.  It will revert to BOT.
 

I don't know why ASM1042 card is not detected.  Look in the ioregistry after connecting the card to see if the device exists. (get IORegistryExplorer from Apple)  PCIe hotplug is handled by IOPCIFamily, and driver matching is handed by IOKit, so if device appears, GenericUSBXHCI should be loaded for it automatically (like it is with Renesas chip.)

 

Streams were an official feature of 0.96 - so that should not be a problem.  It's probably good to update the 720202 to its latest firmware - but that will not change the 0.96 to 1.00, and will not change the status of streams (other than possible bugfixes...)

Anyhow, if UAS works then streams work - as they're a required and mandatory feature for superspeed UAS.

Link to comment
Share on other sites

Zenith432, UAS (streams) work perfectly with 720202 (and it's xhci 1.0, 720200 is xhci 0.96). It doesn't work in Windows 8 on ASM1042, so I'm trying to understand why and how turn it on there also ;-) No thoughts why ufsd_NTFS crashed on 1042 and works perfectly on NEC with ASM1051E enclosure?

I tested NTFS volume on flash disk. It works in RW mode on both cards... But that flash disk (Sandisk Extreme USB 3.0) doesn't support streams, maybe that's the difference...

Link to comment
Share on other sites

Has it occurred to you that streams may be broken on ASM1042, which is why ASMedia's own Windows driver disables it and why you're getting the failure in ufsd_NTFS?

 

That's why I ask that you please disable UAS manually with property I showed above - to see if ASM1042 continues to fail with ASM1051E.

 

There's no convenient way for me to disable UAS on a xhci model-specific basis except to hardcode it.  It's hardcoded for Etron because I know those are broken.

I don't know which other chips have broken streams.

FreeBSD disables UAS on all chips just to be safe.  This means UAS extra performance is lost even on chips that support streams.

So it's on by default.

If UAS doesn't work with ASM1042, I'll add a quirk to disable it.

  • Like 1
Link to comment
Share on other sites

If UAS doesn't work with ASM1042, I'll add a quirk to disable it.

How to check It works? I can access NTFS Volume in RO mode. It's an issue of third party driver. I bet with HFS+ all will be fine...

I hear UAS enabled on ASUS motherboards with ASM1042 and they have their driver also.

 

It's better to have possibility to disable it in Info.plist by user side (in case of some weird behaviour).

There are not much difference in running configs as I see.

 

Also, can't we define personalities ant their options in that plist file by chipset ID?

 

I saw options per device can be defined in arrays inside IOKitPersonalities (in Info.plist). SATSMARTDriver as example.

 

Can't this be defined like this:

 

 

                <key>GenericUSBXHCI</key>
                <dict>
                        <key>CFBundleIdentifier</key>
                        <string>net.osx86.kexts.GenericUSBXHCI</string>
                        <key>IOClass</key>
                        <string>GenericUSBXHCI</string>
                        <key>IOPCIClassMatch</key>
                        <string>0x0c033000</string>
                        <key>IOPCIPauseCompatible</key>
                        <true/>
                        <key>IOPCITunnelCompatible</key>
                        <true/>
                        <key>IOProbeScore</key>
                        <integer>100</integer>
                        <key>IOProviderClass</key>
                        <string>IOPCIDevice</string>
                        <key>IOUserClientClass</key>
                        <string>IOUSBControllerUserClient</string>
                </dict>
                <key>GenericUSBXHCI_ASM1042</key>
                <dict>
                        <key>CFBundleIdentifier</key>
                        <string>net.osx86.kexts.GenericUSBXHCI</string>
                        <key>IOClass</key>
                        <string>GenericUSBXHCI</string>
                        <key>IOPCIClassMatch</key>
                        <string>0x0c033000</string>
                        <key>IOPCIPauseCompatible</key>
                        <true/>
                        <key>IOPCITunnelCompatible</key>
                        <true/>
                        <key>IOProbeScore</key>
                        <integer>200</integer>
                        <key>IOProviderClass</key>
                        <string>IOPCIDevice</string>
                        <key>IOUserClientClass</key>
                        <string>IOUSBControllerUserClient</string>
                        <key>Product Identification</key>
                        <string>0x1042</string>
                        <key>Vendor Identification</key>
                        <string>0x1b21</string>
                        <key>DisableUAS</key>
                        <true/>
                </dict>

 

 

 

P.S. Disabling UAS by <key>DisableUAS</key> <true/> fixes Paragon driver incompatibility with ASM1042. So it can be a workaround for some users with the same hardware combinations.

I'll try newer firmware to check the difference (can't flash it because it have DOS flasher, and I don't have dos on MacBookPro).

Can't see any difference in xhcidump caps / running except

MFIndex 965 <> MFIndex 5784 and # Configured Endpoints 5 <> # Configured Endpoints 3 between them.

 

P.P.S. I have no issues with ASM1051E connected to ASM1042 without disabled UAS, if HDD have HFS+ filesystem. It works as expected. No issues or errors at all. 

dump-asm1042-asm1051e-ERROR.txt

dump-asm1042-sandisk-OK.txt

dump-nec-asm1051e-OK.txt

dump-nec-sandisk-OK.txt

dump-asm1042-asm1051e-noUAS-OK.txt

Link to comment
Share on other sites

Has it occurred to you that streams may be broken on ASM1042, which is why ASMedia's own Windows driver disables it and why you're getting the failure in ufsd_NTFS?

 

That's why I ask that you please disable UAS manually with property I showed above - to see if ASM1042 continues to fail with ASM1051E.

If UAS doesn't work with ASM1042, I'll add a quirk to disable it.

 

There are firmware updates for the ASM1042: http://www.station-drivers.com/index.php/10-drivers/40-asmedia

 

I updated mine (Asus P8Z77-V Pro) but my USB 3.0 flash drive was stolen..so I can't say if anything has improved.

  • Like 1
Link to comment
Share on other sites

Is it possible to boot like this is Clover? With the flag -gux_no_idle I get no boot.

 

Is your driver the same from Pandora's Box?

 

poispois, b0rnav: boot with kernel flag -gux_no_idle.

 

nikk: 1.2.7d8.

 

Got it working with -gux_no_idle. Thanks for your driver and support also.  :thumbsup_anim:

Link to comment
Share on other sites

How to check It works? I can access NTFS Volume in RO mode. It's an issue of third party driver. I bet with HFS+ all will be fine...

P.P.S. I have no issues with ASM1051E connected to ASM1042 without disabled UAS, if HDD have HFS+ filesystem. It works as expected. No issues or errors at all.

Yes, but there is something odd going on.

- ASM1042 + HFS + UAS - no problems.

- ASM1042 + NTFS + Paragon + UAS - RO

- Renesas 720202 + NTFS + Paragon + UAS - no problems.

Paragon NTFS should not notice the difference between presence of ASM1042 and Renesas.  Obviously it does.  The reason is that some packets are timing out and it's getting some errors.  That's also what was causing your KP (the errors were being mishandled.)  Now Paragon is getting some errors - and falling back to RO mode (which for some reason works.)  If all goes as planned (which it does on Renesas), it should not experience packet errors.

Also, can't we define personalities ant their options in that plist file by chipset ID?

Yes, of course, but I'll be damned if I'm going to start explaining to people how to do that.  If you already know - great.

MFIndex 965 <> MFIndex 5784 and # Configured Endpoints 5 <> # Configured Endpoints 3 between them.

This is due to UAS uses 5 endpoints and BOT uses 3 endpoints...

 

I'll leave UAS enabled for ASM1042 for the time being, since it's just Paragon NTFS that's running into trouble.

 

Link to comment
Share on other sites

I'll leave UAS enabled for ASM1042 for the time being, since it's just Paragon NTFS that's running into trouble.

Alter some more testing, I was wrong. ASM1042 doesn't work in UAS mode well on any FS.

In case of HFS+, I can read contents, I can write small files, but on big amounts of data writes it gives me an error (-36). Spotlight can't finish index volume.

Also, there is weird values for writes in AJA System Test with such volume.

 

It not firmware dependent. Flashed my card with Asus's xHCI_v120816_02_02_6D, original xHCI_v110930_00_02_53, earlier xHCI_v110914_00_02_51. All the same. Not tested only HighPoint's one, it's for DOS flasher.

 

It's all about native HFS+ volume.

 

In BOT there is no issues. So, at least for now, it's better to fallback to BOT for ASM1042. UAS also disabled in Windows 8 native and ASMedia driver for this chipset.

 

So, the best external option for mac is Renesas upd720202 as I understand ;-) It supports streams well and works like a charm (hotpug). It even works in UAS mode (if supported) on Windows 8 native driver ;-)

post-42158-0-44111400-1382566548_thumb.png

post-42158-0-32983200-1382566555_thumb.png

post-42158-0-16294800-1382566565_thumb.png

asm1042.txt

Link to comment
Share on other sites

poispois, b0rnav: boot with kernel flag -gux_no_idle.

 

nikk: 1.2.7d8.

Thanks for your support.

 

Tried that. Same issue. Its quiet odd. All structures and substructures are properly enumerated but cant actually read any of the files without some OS error.

 

Let me know if i could provide any other diagnostics info.

 

Borna.

Link to comment
Share on other sites

On 10.9 with H77-DS3H

 

USB3 ports didn't work at all, until I tried -gux_defer_usb2. 

Now, the ports work but only at USB2 speeds - (so if I connect my ipad, it goes to "Not charging" instead of charging like it does when it's connected to a USB3)

 

Help?

Link to comment
Share on other sites

please read this: http://pikeralpha.wordpress.com/2013/06/13/kext-requirements-for-os-x-10-9-mavericks/

 

kextutil -tn /System/Library/Extensions/GenericUSBXHCI.kext 

Diagnostics for /System/Library/Extensions/GenericUSBXHCI.kext:

Code Signing Failure: not code signed

/System/Library/Extensions/GenericUSBXHCI.kext appears to be loadable (including linkage for on-disk libraries).

Link to comment
Share on other sites

Thanks for the brilliant work!

 

I have an external usb 3.0 dual drive enclosure - Nextar MX, set up as 2 individual drives. Weird thing is that I'm getting 100MB/s throughput on the one drive, but only about 48MB/s on the other. The two drives are identical WD drives.

 

These drives were operating flawlessly at the higher data rate under M/L - this problem occurred immediately after upgrade to Mavericks.

 

What could be causing this?

 

Cheers

Link to comment
Share on other sites

×
×
  • Create New...