Jump to content

GenericUSBXHCI USB 3.0 driver for OS X with source


928 posts in this topic

Recommended Posts

Attached is Info.plist for AppleKextExcludeList.kext on 10.9GM.

After copying the file you should run 'sudo kextcache -system-c; sudo kextcache -system-p'.

 

There should be a space between kernel flags '-gux_defer_usb2 -gux_no_idle'.  Also, these flags are only useful if you have Intel Series 7 xhci.

Hi Zenith432,

 

the script attached (GenericXHCI_Update_ExcludeList.sh), automatically find the GenericUSBXHCI.kext installed, read its CFBundleShortVersionString version, then clean the AppleKextExcludeList.kext/Contents/info.plist (delete  the net.osx86.kexts.GenericUSBXHCI entry), then rewrite it with the corresponding value.

The script also repairs permissions for GenericUSBXHCI.kext and AppleExcludelist.kext, then touch S/L/E.

 

*Editing/adding the script case statement:

case "${GXHCI_VER}" in
    1.2.6)
        NewValue="1111.0"
    ;;
    1.2.5)
        NewValue="1.2.5d5"
    ;;
    *)
        echo "*** Currently you can update AppleKextExcludeList.kext only for GenericUSBXHCI.kext v 1.2-5/1.2.6"
        echo "    Sorry, other case statement need to be set in this script!"
        echo "------------------------------------------------------------------------ >"
        exit
    ;;
esac

we can update AppleKextExcludeList.kext  with all version made of GenericUSBXHCI.kext.

 

Hope this helps, and I'm going to put it in Pandora.app, to up to date always the exclude list :)

 

Micky

GenericXHCI_Update_ExcludeList.sh.zip

  • Like 2
Link to comment
Share on other sites

nikk: Download and try 1.2.7d2 with a fix for this KP.  It happens when waking from unpowered sleep with a superspeed drive supporting streams.  Some loose end from the stream fixes in 1.2.6.

 

jorgeMax: Run 'kextstat | grep Gen' when the system is up to check if GenericUSBXHCI 1.2.6 is loaded and running.

 

Micky1979: Thanks!

 

Edit: I've integrated a fix for the KP mentioned by nikk into 1.2.6, and uploaded a new 1.2.6 with this fix.  So anyone suffering from this KP (happens during wake from sleep with streams drive) should replace 1.2.6.

Edited by Zenith432
  • Like 1
Link to comment
Share on other sites

do you guys really need to add anything to the kext excluded list? I have not needed to add anything there and all my non-apple kexts work.

 

edit: i also notice that GM doesn't have a cached plist of excluded kexts in kext.caches startup folder for me like the db builds had.

Link to comment
Share on other sites

JorgeMax: What exactly is not working?  Upload output of 'xhcdump running'.

   PS: If using '-gux_defer_usb2', then any USB 2.0 device would appear under the EHCI tree.  You should see only superspeed xhci devices under "Barramento Superspeed USB 3.0", assuming such device is connected.

 

joe75: If you mean loadedkextmt.plist, then I do have one under GM.

Link to comment
Share on other sites

do you guys really need to add anything to the kext excluded list? I have not needed to add anything there and all my non-apple kexts work.

 

edit: i also notice that GM doesn't have a cached plist of excluded kexts in kext.caches startup folder for me like the db builds had.

Most likely it is a problem of kernelcache, unsigned kext are actually register in the /....com.apple.kext.caches/Startup plist files (in GM also), definitely new versions need to be updated in those files.
AppleExcludelist.kext, contains references to extensions that will be loaded even if they have signed or not.
Kextcache can be removed, and rebuilt....the AppleKextExcludelist.kext, maybe he needs a hand (??)....obviously if the two things are connected (....I would say yes).
I have not played much with kexts lately and I've never had excluded kexts, but it seems that some people have these problems.
 
GenericUSBXHCI.kext is having new update versions, maybe it does not happen with other "hackintosh" extensions in the same System ..
Can be?
 
Micky
Link to comment
Share on other sites

JorgeMax: What exactly is not working?  Upload output of 'xhcdump running'.

   PS: If using '-gux_defer_usb2', then any USB 2.0 device would appear under the EHCI tree.  You should see only superspeed xhci devices under "Barramento Superspeed USB 3.0", assuming such device is connected.

 

joe75: If you mean loadedkextmt.plist, then I do have one under GM.

Friend the only USB device when I can test is version 2.0, 3.0 with one USB 3.0 external HDD from my brother. But I can only test it on my doors at night when he gets the service. Only I'm finding it strange the USB 2.0 ports are not recognized by USB 3.0 when I'm using the Mavericks ML 10.8.5 and now it is recognized.

Link to comment
Share on other sites

When booting with '-gux_defer_usb2' USB 2.0 devices are never going to be recognized by the USB 3.0 controller.  They'll show up on the USB 2.0 controller.

Remove this kernel flag, reboot, and see what happens then.

The reason this flag is recommended, is because on some MBs with Intel series 7, when USB 2.0 ports are routed to xhci, they cause instant-wakeup-on-sleep.  It's a hardware bug, but not all MBs suffer from this.  So try taking it out and see.

Friend the only USB device when I can test is version 2.0, 3.0 with one USB 3.0 external HDD from my brother. But I can only test it on my doors at night when he gets the service. Only I'm finding it strange the USB 2.0 ports are not recognized by USB 3.0 when I'm using the Mavericks ML 10.8.5 and now it is recognized.

Link to comment
Share on other sites

Removed the flag "-gux_defer_usb2" friend, but still the same, no work with USB 2.0 devices such as USB key, keyboard, mouse and a USB 2.0 HDD I have here none was recognized. Just missing one that I test is 3.0.

Link to comment
Share on other sites

It's because you're running without '-gux_no_idle'.  It's a new issue with 10.9 that sometimes interrupts are stalled due to the Intel low-power mode.  Add '-gux_no_idle' kernel flag and reboot.  Run './xhcdump caps'.  It should say "Intel Doze Disabled" in the very last line.

Link to comment
Share on other sites

Your Boot.plist file looks fine, but maybe you have two different Boot.plist - one for 10.8.5, and one for 10.9.

Do you have the chameleon bdmesg utility (in /usr/sbin/bdmesg).

If so, boot 10.9, and run 'bdmesg >bdmesg.txt'.  Look in bdmesg.txt toward the end.  It lists all the kernel flags it booted with.  See what it says.

Anyhow, if you boot with '-gux_no_idle', your 'xhcdump caps' should say 'Intel Doze Disabled' as the last line.

Edit: try to manually type '-gux_no_idle' on the chameleon command line before booting - see if that catches on.


 Is it also because this flag: npci = 0x2000? Because it does not have the ML 10.8.5 and USB 3.0 ports work in ML.

  • Like 1
Link to comment
Share on other sites

I alternated boot.plist friend in the flags "-gux_no_idle" and placed before the "NPCI = 0x2000". But I put in the time to boot the system to flag you indicated and when the system started and appeared to "Desktop / Mesa" I plugged in the USB ports USB 3.0 and it worked, now I try to start the system without typing anything on startup.


Your Boot.plist file looks fine, but maybe you have two different Boot.plist - one for 10.8.5, and one for 10.9.

Do you have the chameleon bdmesg utility (in /usr/sbin/bdmesg).

If so, boot 10.9, and run 'bdmesg >bdmesg.txt'.  Look in bdmesg.txt toward the end.  It lists all the kernel flags it booted with.  See what it says.

Anyhow, if you boot with '-gux_no_idle', your 'xhcdump caps' should say 'Intel Doze Disabled' as the last line.

Edit: try to manually type '-gux_no_idle' on the chameleon command line before booting - see if that catches on.

No works by boot.plist, only if I start typing on the screen chameleon works oh yes flag:-gux_no_idle. Does it have another way to make this work without flag be entered manually?

Link to comment
Share on other sites

nikk: Download and try 1.2.7d2 with a fix for this KP.  It happens when waking from unpowered sleep with a superspeed drive supporting streams.  Some loose end from the stream fixes in 1.2.6.

Yeah, you roxxx man! Now it works like a charm ;-) Thanks.

 

Another issue which I have with my card - it won't work with Freecom Mobile MG USB 3.0 / FW drive (With Samsung M8 inside). But I think it's not the driver itself but weird power requirements (saw some kind of notes about violating RFC power standards in system log with earlier version of GenericXHCI). The drive is recognized, volumes mounted, but soon there are disconnect and enumerate loop on the bus. External power (from USB 2.0 port to the drive, from 5V AC/DC adapter to the drive, from adapter to Express Card DC-IN jack) didn't help also. Strange thing, this drive works OK without any external power or Y-cable on USB 2.0 Port of same computer (MacBook Pro 17).  And same Samsung M8 in enclosure with ASM1051E works fine from that USB 3.0 port (without external power also), which capable Max. 5V/900mA power output.

 

Zenith432, I have a tech question about UAS. Don't you know, does OS X send SCSI UNMAP to Solid Disks attached via SCSI? I wonder is there any possibility to TRIM (at least manually) SATA SSDs, working in UAS-mode over SATA-USB bridges like ASMedia 1051/53E etc in the future.

kernel_log.txt

kernel_log_2.txt

kernel_log_3.txt

Link to comment
Share on other sites

@Zenith432,

 

Thank you very much for the work you've done on this kernel extension.  

 

I had something very odd happen today and I don't know what the root cause is but the symptom was an encrypted corestorage volume got into a state where it could not be unlocked by any users of the system. I did some troubleshooting for about 90 minutes, Keychain repairs, etc., and gave up, tore it down, and rebuilt without corestorage to restore from a TimeMachine snapshot.

 

  • Hardware: 
    • I have a board with 2xEJ168 USB 3 ports, it's an LGA-1155 ga-z68x-ud3h-b3 with an i7 2600k @ 3.4GHz, and I'm using UEFI
  • OS/platform:
    • GM seed of 10.9
  • Storage (all GUID, no MBR):
    • Internal (no problems that I know of)
      • Marvel SATA3 6Gbps  
        • SSD (Traditional format and partition) jhfs+ OS, Applications
        • SSD (corestorage, part of Fusion Drive LVG — /Users — was encrypted jhfs+ but after the problem today reverted it to unencrypted jhfs+)
      • ​SATA2 3Gbps
        • ​spinning 1 x 1TB (corestorage, part of Fusion Drive LVG)
        • spinning 1 x 1TB (Traditional format and partition) jhfs+
        • spinning 1 x 3TB (corestorage, encrypted jhfs+ TimeMachine LVG)
      • ​EJ168 USB 3 off the board to the front panel for a media card reader — USB3 SD/OMG/WTF/BBQ reader for reading photos and video — working fine, hard to evaluate performance to SD)
    • External 
      • ​USB 3 via on-board EJ168
        • ​1 x Toshiba USB 3 500GB (Traditional format and partition) jhfs+
        • 1 x MediaSonic 4-bay JBOD (USB3 to 4 x SATA)
          • ​4 x 1TB SATA configured as follows:
            • ​RAID0+1: a striped physical device via an AppleRaid volume, jhfs+, named "jbodvol" built from:
              • "jbodm1" 2 x 1TB as an AppleRAID mirror
              • ​"jbodm2" 2 x 1TB as an AppleRAID ​mirror

 

Still with me? Great!

 

I had previously then taken jbodvol and converted it to corestorage (100%, jhfs+, encrypted) and it worked fine for a few days. It wasn't going very quickly though, so I did some tests with mkfile and rsync, dd et al and determined I was only getting ~60MBps to the volume. Also ran BlackMagic which gave similar (almost identical) results for 200m, 1024m test files sequential read/write.

 

I had installed GenericUSBXHCI and System Profiler said it was using SuperSpeed USB but regardless, it was slow. I installed the kernel extension again, ensured the kextcache rebuilt, rebooted and BAM: can't unlock jbodvol in the GUI, nor the cli (diskutil cs unlockvolume $UUID-of-logicalvolume)! Did my testing across two-three reboots, different accounts, and rummaging around with keychains, the error I was getting is written down and not in front of me but wasn't very descriptive and searches on the Web resulted in a number of vaguely related but not really relevant threads about broken keychains.

 

Post-rebuild of the RAID in the JBOD the performance is much better and within expectations (~90-110MBps) so I'm confidant that GenericUSBXHCI is installed correctly but I'm not certain it was before. The version I have installed currently is the same as I had in /System/Library/Extensions (confirmed shasum is identical in Time Machine snapshot to current — 1.2.6d2)

 

tl;dr: Does the GenericUSBXHCI kernel extension change an identifier for a device or logical volume group that influences how corestorage interacts with encrypted logical volumes and block devices?

 

The only (intentional) change between working and not-working was re-installation of that kext, and I'm not in a broken state now (so no urgency on my part) but I would rather have my JBOD's volume encrypted but not if it's going to be unreliable, obviously. I'm admittedly grasping at straws for a root cause, I don't even know what fde/FileVault/corestorage cares about in terms of unlocking a volume, I figured it was just the passphrase but apparently that isn't sufficient since it was unable to unlock with it. It's also possible that I have something misconfigured or implemented wrong with my workstation, I was using Clover before but now am using Chameleon with 10.9 and I don't know if my Recovery Partition is built correctly, or if my configuration to allow iMessage to work is stomping on something important either. 

 

The JBOD's RAID was initialized and built post-installation of 10.9 so everything should be done under the same system ID or other identifiers it would care about. I will say that I certainly *changed* the system identifiers post-install and possibly post-RAID when I was under the hood to ensure iMessage would work correctly.

 

Apologies for the wall of text, I look forward to any insight you may have or recommendations for using a JBOD with your extension.

Link to comment
Share on other sites

Have here a Seagate HDD USB ​​3.0 with the reference number: P / N 9SCAL4-500 and S / N 2GHC2NB2 that when plugged in the USB 3.0 ports do not ride it! But the power led lights it. I'm with GenereicUSBXHCI in version 1.2.6 Final.

This is now the HDD plugged into a USB 2.0 port. That does not mount a USB 3.0 port.

post-1145065-0-75551400-1381497389_thumb.png

 

And @ Zenith432, the problem is the bootloader Mavericks 10.9GM same! That is not 100% compatible with this system yet, the boot flag "-gux_no_idle" does not load when inserted into org.chameleon.boot.plist only if manually typed in the same tele boot.

Link to comment
Share on other sites

×
×
  • Create New...