├── .gitignore ├── Makefile ├── README.md └── USBHubPowerFix.kext └── Contents └── Info.plist /.gitignore: -------------------------------------------------------------------------------- 1 | USBHubPowerFix.kext/Contents/_CodeSignature/ 2 | *.zip 3 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | KEXT= USBHubPowerFix.kext 2 | 3 | CODESIGN= codesign 4 | KEXTUTIL= kextutil 5 | SUDO= sudo 6 | TAR= tar 7 | 8 | DESTDIR= /Library/Extensions 9 | IDENTITY= E1E40BB5B7277129FCA48576BBC1625463B13386 10 | 11 | all: 12 | 13 | sign: 14 | ${CODESIGN} -s ${IDENTITY} ${KEXT} 15 | 16 | check: 17 | ${SUDO} ${KEXTUTIL} -t ${KEXT} 18 | 19 | package: 20 | ${TAR} cvf ${KEXT}.zip --format zip ${KEXT} 21 | 22 | clean: 23 | ${RM} -r ${KEXT}/Contents/_CodeSignature ${KEXT}.zip 24 | 25 | install: 26 | ${SUDO} cp -R ${KEXT} ${DESTDIR} 27 | ${SUDO} chown -R root:wheel ${DESTDIR}/${KEXT} 28 | ${SUDO} chmod -R og-w ${DESTDIR}/${KEXT} 29 | 30 | load: 31 | ${SUDO} kextload ${DESTDIR}/${KEXT} 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # USBHubPowerFix 2 | 3 | This codeless kext fixes "USB Device Needs Power" alert with non-Apple non-powered USB hubs 4 | in El Capitan (OS X 10.11) and later. 5 | 6 | Many of such hubs worked flawlessly in Yosemite but stopped working in El Capitan. 7 | Whenever a USB device is plugged in into the hub the "USB Device Needs Power" alert appears with 8 | the following error in the */var/log/system.log*: 9 | 10 | ``` 11 | Aug 10 09:25:08 Maximilians-iMac kernel[0]: 034851.758657 USB Mass Storage Device@fa124000: IOUSBHostDevice::setConfigurationGated: 480mA of bus current is not available 12 | Aug 10 09:25:08 Maximilians-iMac kernel[0]: 034851.758664 AppleUSBCDCCompositeDevice@: AppleUSBHostCompositeDevice::ConfigureDevice: unable to set a configuration (0xe0005001) 13 | ``` 14 | 15 | I noticed that Apple USB Hub in Apple Keyboard however works in El Capitan. 16 | 17 | The properties injected by this kext are copied from *Apple Aluminium Keyboard Properties* 18 | from *AppleUSBHub.kext* driver (see here: */System/Library/Extensions/IOUSBHostFamily.kext/Contents/PlugIns/AppleUSBHub.kext/Contents/Info.plist*). 19 | 20 | ## Installation 21 | 22 | 1. Edit Vendor and Product ids to match your hub in *USBHubPowerFix.kext/Contents/Info.plist* 23 | (you can find them by looking at idProduct and idVendor properties in `ioreg -c IOUSBHostDevice -r -l -w0` output). 24 | 2. Run `make install`. 25 | 26 | Note: This kext is not signed. You need either to [disable SIP](http://apple.stackexchange.com/questions/208478/how-do-i-disable-system-integrity-protection-sip-aka-rootless-on-os-x-10-11) or sign it (see [Signing](#signing) below). 27 | 28 | ## Testing 29 | 30 | 1. Run `sudo kextload /Library/Extensions/USBHubPowerFix.kext` or `make load` 31 | 2. Check the output of `ioreg -c IOUSBHostDevice -r -l -w0` - *kUSBConfigurationCurrentOverride* property should appear in the output. 32 | 3. Please send me (as pull request or to fjoe@samodelkin.net) product id, vendor id and USB hub name if the fix works. 33 | 34 | ## Signing 35 | 36 | You need to have Apple Developer Program subscription and [request a kext signing certificate](https://developer.apple.com/contact/kext/). 37 | 38 | 1. Modify IDENTITY= in Makefile 39 | 2. Run `make sign` 40 | -------------------------------------------------------------------------------- /USBHubPowerFix.kext/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | net.samodelkin.USBHubPowerFix 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | UsbHubPowerFix 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | IOKitPersonalities 22 | 23 | Asmedia USB Hub 24 | 25 | CFBundleIdentifier 26 | com.apple.driver.AppleUSBHostMergeProperties 27 | IOClass 28 | AppleUSBHostMergeProperties 29 | IOProviderClass 30 | IOUSBHostDevice 31 | IOProviderMergeProperties 32 | 33 | kUSBConfigurationCurrentOverride 34 | 500 35 | kUSBHubPortSequenceDelay 36 | 100 37 | kUSBSleepPortCurrentLimit 38 | 500 39 | kUSBWakePortCurrentLimit 40 | 500 41 | 42 | idVendor 43 | 7172 44 | idProductArray 45 | 46 | 8308 47 | 48 | 49 | NeoDrive USB Hub 50 | 51 | CFBundleIdentifier 52 | com.apple.driver.AppleUSBHostMergeProperties 53 | IOClass 54 | AppleUSBHostMergeProperties 55 | IOProviderClass 56 | IOUSBHostDevice 57 | IOProviderMergeProperties 58 | 59 | kUSBConfigurationCurrentOverride 60 | 500 61 | kUSBHubPortSequenceDelay 62 | 100 63 | kUSBSleepPortCurrentLimit 64 | 500 65 | kUSBWakePortCurrentLimit 66 | 500 67 | 68 | idVendor 69 | 2565 70 | idProductArray 71 | 72 | 1 73 | 74 | 75 | 76 | OSBundleLibraries 77 | 78 | 79 | 80 | --------------------------------------------------------------------------------