Jump to content

[GUIDE] USB Fix El Capitan 10.11


829 posts in this topic

Recommended Posts

Injecting properties for hubs...

 

Newer beta builds use DSDT _UPC/_PLD info to determine the state of ports on a hub, similar to how _UPC/_PLD is used for ports. I'm not sure when the change happened, but the change caused my USB2 ports on XHC to stop working when using FakePCIID_XHCIMux.kext.

 

If your DSDT returns incorrect information for hub ports, they will be excluded and the ports will not work. This seems to be common with laptops.

 

Do you think we can do it by SSDT.aml injection ? So it will very easy to generate once you know your ports and it won't be impacted by updates ... 

 

a SSDT with only : 

_ADR for Address

_UPC / _PLD for Infos

_DSM for Cosmetics 

for ECH1, EHC2 and XCH1

which match a SMBIOS config ... 

 

See the SSDT attached

SSDT-5.aml.zip

  • Like 1
Link to comment
Share on other sites

hey guys I have sabertooth x79 and 3930k using macpro6.1 smbios and dsdt + ssdt with clover r3259... can someone guide me how to get usb 2.0 and 3.0 to work properly in 10.11 GM would be very grateful for the help :)

 

Asus Sabertooth correct?  Are you able to boot without any kernel panic just curious.  I have the Asus X79-Deluxe and I can't boot without panic, still working on it hoping if I use the information from this thread I will be able to solve it.

Link to comment
Share on other sites

Asus Sabertooth correct?  Are you able to boot without any kernel panic just curious.  I have the Asus X79-Deluxe and I can't boot without panic, still working on it hoping if I use the information from this thread I will be able to solve it.

I couldn't send u a message so I'm trying to explain in pastebin instead  http://pastebin.com/U9p6tEJz

  • Like 1
Link to comment
Share on other sites

I couldn't send u a message so I'm trying to explain in pastebin instead  http://pastebin.com/U9p6tEJz

 

So you have the kernel panic as well.  I have no fix for this yet.  Working through this thread to see if disabling the Intel USB will at least allow me to boot past the panic.

Link to comment
Share on other sites

So you have the kernel panic as well.  I have no fix for this yet.  Working through this thread to see if disabling the Intel USB will at least allow me to boot past the panic.

 

oh sorry my bad i thought u meant just to install 10.11 but yeah as far usb 3.0 goes I'm not using it and have that disabled in bios or else kp :)

 

keep in mind I still don't know how to use the kext from this thread since i don't know how to edit etc or not sure where to start...

  • Like 1
Link to comment
Share on other sites

Do you think we can do it by SSDT.aml injection ? So it will very easy to generate once you know your ports and it won't be impacted by updates ... 

 

a SSDT with only : 

_ADR for Address

_UPC / _PLD for Infos

_DSM for Cosmetics 

for ECH1, EHC2 and XCH1

which match a SMBIOS config ... 

 

See the SSDT attached

 

IIRC you must first disable the original USB devices in the DSDT, I don't think you can just override them from an SSDT without disabling them first. I have not tried using an SSDT for USB but it should be possible to rename _SB.PCI0.EHC1/etc. to _SB.PCI0.EH01/etc. (using Clover config.plist DSDT binpatch) [you don't want to just rename all instances of EHC1/etc. to EH0/etc. because you want the original names so you can disable them], and then disable the original USB device. A short SSDT example:

DefinitionBlock ("GA-Z77X-UD5H.aml", "SSDT", 1, "APPLE", "tinySSDT-USB", 0x00000001)
{
	External (_SB.PCI0, DeviceObj)

	Scope (\_SB.PCI0)
	{
		/* Disabling the EHC1 device */
		Scope (EHC1) { Name (_STA, Zero) }
		/* Adding a new EH01 device */
		Device (EH01)
		{
			Name (_ADR, 0x001D0000)
			/* Put methods/whatever here */
		}
	}
} 

I haven't tested this technique with USB devices (I don't need to add new USB devices in my SSDT, I just add a _DSM method), but it has worked with other devices I've tried it with. Credits to Piker-Alpha for this technique.

  • Like 2
Link to comment
Share on other sites

After putting the proper IOPCIPrimaryMatch value, It shows properly the USB3 hub in system profiler. Ioreg is showing my usb3 drive connected to SSP1 via XHC, but in system profiler the speed is USB2, rebooting to yosemite gives me USB3 speeds. Any clues if this is fixable or is it an OSX issue? someone had mentioned they re-did the usb code and it wasn't quite complete yet.

Link to comment
Share on other sites

IIRC you must first disable the original USB devices in the DSDT, I don't think you can just override them from an SSDT without disabling them first. I have not tried using an SSDT for USB but it should be possible to rename _SB.PCI0.EHC1/etc. to _SB.PCI0.EH01/etc. (using Clover config.plist DSDT binpatch) [you don't want to just rename all instances of EHC1/etc. to EH0/etc. because you want the original names so you can disable them], and then disable the original USB device. 

 

Thanks for the answer ...

I'll give a closer look to DSDT clover patch (I compile my DSDT.aml when I need to rename something).

 

What would be nice nice would be to disable EHC1,EHC2 and XHC from DSDT and then inject them via SSDT override ... I'll try !

Link to comment
Share on other sites

 

 

Look like a great card will this work on any SMBIos or only MacPro smbios?  No driver needed?  I have iMac14,2 smbios currently. 

Link to comment
Share on other sites

It's working for my old EP35 with MacPro3,1 smbios on OS X 10.10 & 10.11 natively. So, I think it will work with any smbios. 

 

I used your H87 XHCI dummy kext just was curious because I could not seem to configure mine correctly for the Asus X79-deluxe and although I got past the kernel panic with my Dummy XHCI none of my USB ports would work.   With your kext I have at least USB2 ports enabled and working.  Not all USB2 ports but enough to get onto the desktop and troubleshoot the rest.  I have the ASmedia controller for USB3 but the USB2/3 are multiplex.  So even though I physically have blue/black connectors, USB2/USB3 seem to be sharing?  The USB2 is intel though.  I though it was the ASMedia that was giving me the Kernel Panic when all along I think it was because Intel USB2 was not configured for the ports correctly?

 

Thanks!! 

Link to comment
Share on other sites

 

Injecting properties for hubs...

 

Newer beta builds use DSDT _UPC/_PLD info to determine the state of ports on a hub, similar to how _UPC/_PLD is used for ports. I'm not sure when the change happened, but the change caused my USB2 ports on XHC to stop working when using FakePCIID_XHCIMux.kext.

 

If your DSDT returns incorrect information for hub ports, they will be excluded and the ports will not work. This seems to be common with laptops.

 

For example, with my Lenovo u430 using FakePCIID_XHCIMux.kext to force USB2 ports on XHC to be handled by EHC drivers, the ports end up being disabled and built-in devices such as camera, bluetooth, touchscreen, etc aren't recognized.

 

Already using a port injector for the port itself, which is defined as "not-connectable" and "not user visible", therefore disabled by 10.11:

    Device (HUBN)

            {

                Name (_ADR, Zero)  // _ADR: Address

                Device (PR01)

                {

                    Name (_ADR, One)  // _ADR: Address

                    Method (_UPC, 0, Serialized)  // _UPC: USB Port Capabilities

                    {

                        Name (UPCA, Package (0x04)

                        {

                            Zero, // not connectable

                            0xFF,

                            Zero,

                            Zero

                        })

                        Return (UPCA)

                    }

                    Method (_PLD, 0, Serialized)  // _PLD: Physical Location of Device

                    {

                        Name (PLDP, Package (0x01)

                        {

                            Buffer (0x10)

                            {

                                /* 0000 */  0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

                                /* 0008 */  0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // hidden

                            }

                        })

                        Return (PLDP)

                    }

 

The above port can be fixed in DSDT:

Device (HUBN)

            {

                Name (_ADR, Zero)  // _ADR: Address

                Device (PR01)

                {

                    Name (_ADR, One)  // _ADR: Address

                    Method (_UPC, 0, Serialized)  // _UPC: USB Port Capabilities

                    {

                        Name (UPCA, Package (0x04)

                        {

                            0xFF, // connectable

                            0xFF,

                            Zero,

                            Zero

                        })

                        Return (UPCA)

                    }

                    Method (_PLD, 0, Serialized)  // _PLD: Physical Location of Device

                    {

                        Name (PLDP, Package (0x01)

                        {

                            Buffer (0x10)

                            {

                                /* 0000 */  0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

                                /* 0008 */  0x30, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // hidden

                            }

                        })

                        Return (PLDP)

                    }

 

You can also leave DSDT as-is, and inject port-count/ports with an injector kext (dummy not needed with EHCx->EH0x rename).

 

Injecting port-count/ports for that port makes the system load the driver for the port (which is a hub and is handled by the hub driver), but only a subset of the ports on the hub are enabled, due to the same/similar problem.

 

For example:

                    Device (PR11)

                    {

                        Name (_ADR, One)  // _ADR: Address

                        Method (_UPC, 0, Serialized)  // _UPC: USB Port Capabilities

                        {

                            Name (UPCP, Package (0x04)

                            {

                                Zero, // not connectable

                                0xFF,

                                Zero,

                                Zero

                            })

                            Return (UPCP)

                        }

                        Method (_PLD, 0, Serialized)  // _PLD: Physical Location of Device

                        {

                            Name (PLDP, Package (0x01)

                            {

                                Buffer (0x10)

                                {

                                    /* 0000 */  0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

                                    /* 0008 */  0xE1, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // visible

                                }

                            })

                            Return (PLDP)

                        }

                    }

 

In this particular case, both _UPC and _PLD are wrong.  _UPC should be connectable, and the _PLD should indicate "not user visible".  This hub port is the internal bluetooth connection for the half-mini PCIe BT/WiFi combo card.

 

It can be fixed in DSDT:

Device (PR11)

                    {

                        Name (_ADR, One)  // _ADR: Address

                        Method (_UPC, 0, Serialized)  // _UPC: USB Port Capabilities

                        {

                            Name (UPCP, Package (0x04)

                            {

                                0xFF, // connectable

                                0xFF,

                                Zero,

                                Zero

                            })

                            Return (UPCP)

                        }

                        Method (_PLD, 0, Serialized)  // _PLD: Physical Location of Device

                        {

                            Name (PLDP, Package (0x01)

                            {

                                Buffer (0x10)

                                {

                                    /* 0000 */  0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

                                    /* 0008 */  0xE0, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // hidden

                                }

                            })

                            Return (PLDP)

                        }

                    }

 

Or you can inject port-count and ports for the hub itself and leave DSDT untouched.

 

Through a bit of experimentation (and intuition) I was able to determine that the same properties (port-count and ports) that are read by the controller driver, are also read by the hub driver.

 

The trick is injecting the properties with an appropriate IOKitPersonality match:

attachicon.gif Screen Shot 2015-08-06 at 8.13.15 AM.png

 

Matching on provider class AppleUSB20InternalHub and locationID.  The locationID (0x1d100000, decimal 487587840) is the locationID you see for the hub in ioreg.  It is based on the port address and controller address.

 

The complete injector is at my u430 repo: https://github.com/RehabMan/Lenovo-U430-Touch-DSDT-Patch

 

After giving up with the dummy I finally fixed USB with this DSDT patch, It just works! However it won't sleep nor shutdown anymore, I tried different types of patches and reviewing my DSDT with no luck, thing is it does shutdown (1/10 times) which is weird, but it won't sleep at all, it just freezes, latest wake reason I get is PWRB like 3 days ago (not a real sleep, it was just me pressing power during the process). Here's my DSDT.

 

I really hope you guys can help me.

 

patched.zip

Link to comment
Share on other sites

 

 

After giving up with the dummy I finally fixed USB with this DSDT patch, It just works! However it won't sleep nor shutdown anymore, I tried different types of patches and reviewing my DSDT with no luck, thing is it does shutdown (1/10 times) which is weird, but it won't sleep at all, it just freezes, latest wake reason I get is PWRB like 3 days ago (not a real sleep, it was just me pressing power during the process). Here's my DSDT.

 

I really hope you guys can help me.

 

 

 

I had shutdonw issues due to USB. 

Rehabman gave me a solution here. But I still want to use DSDT/SSDT to make it work !

Link to comment
Share on other sites

I had shutdonw issues due to USB. 

Rehabman gave me a solution here. But I still want to use DSDT/SSDT to make it work !

Thanks! I still have issues however the kext doesn't seem to help, renaming the device to eh0x would also make USB work though. What I find weird is that if try to use the dummy injector from the first post, it disables USB but make sleep and shutdown work, so I think this has to be something related to USB and we are just a few patches away to fix it.

Link to comment
Share on other sites

Alright, I feel like I have given this a fair shot on my own, but alas, I can't really get it to fully work. If anyone could look over what I did and tell me where I am screwing up it would be great

 

My motherboard is an Asus Z97 Deluxe. I disabled the ASMedia USB3 controller since it was causing a kernel panic in IOUSBHostFamily. According to DPCIManager, I have an Intel xHCI controller:

8086, 8CB1, 1043, 8534, Intel Corporation, 9 Series Chipset Family USB xHCI Controller

 

I have a USB hard drive that I use for Time Machine, and when I plug it in the rear USB ports, it never even shows up, except for one of the ports, where then it works (SSP3)

I can plug an iPhone into most of the ports, and it starts charging, except one or two don't even recognize that

DSDTKextIOReg.zip

Link to comment
Share on other sites

Hey Poken,

 

Two of my rear usb 2.0 ports aren't working on my Asus P8z77-v LK. So I followed part 2b of you guide.



2b. Add ports to Ports Restriction

 

In this method, you will enable port restriction and add your ports.

 

To enable port restrictions:

- For USB 2.0, rename your USB to EHC1/EHC2 or change IONameMatch.

- For USB 3.0, rename your USB to XHC1 or change IONameMatch.

 

Then, you have to identify which ports you have in your DSDT. For example, my XHC1 has ports at 1, 2, 3, 4:

 

jKXRuTe.png

 

However, the SMBIOS MacBookPro9,2 I'm using only contains ports 1, 2, 5, 6 (note that port name is not important):

 

5yVfpJK.png

 

So I had to add ports 3 4, and the ports work again!

 

Hptjqdk.png

 

Please note that there is still a limitation of 15 ports (discovered by VCH888). For example: If your DSDT defined 14 USB 2.0 ports HS01->HS14 and 6 USB 3.0 ports SS01->SS06, OS X will only recognize HS01->HS14 and SS01.

 

To fix this problem, you have to identify which ports are real and which ports are unavailable, then add only valid ports. You can find example here: http://www.insanelymac.com/forum/topic/306777-guide-usb-fix-el-capitan-1011/?do=findComment&comment=2147401

 

 

 

My DSTD and Info was this -

 

EHC1

post-1306847-0-00772100-1442804949_thumb.jpg

 

XHC1

post-1306847-0-36122200-1442805018_thumb.jpg

 

So I changed EHC1 to this

post-1306847-0-28590800-1442805563_thumb.jpg

 

And the two USB ports still aren't working, any idea what's wrong?

Thanks

Link to comment
Share on other sites

Hey Poken,

 

Two of my rear usb 2.0 ports aren't working on my Asus P8z77-v LK. So I followed part 2b of you guide.

 

My DSTD and Info was this -

 

EHC1

attachicon.gifEHC1.jpg

 

XHC1

attachicon.gifXHC1.jpg

 

So I changed EHC1 to this

attachicon.gifEHC1-new.jpg

 

And the two USB ports still aren't working, any idea what's wrong?

 

Thanks

 

Post an IOReg dump with IORegistryExplorer v2.1.

Link to comment
Share on other sites

And add a hub port injector if needed, using an IOProbeScore=5000 to force recognition of my hub port injector over any system provided hub port injector.

 

    | |   | +-o XH01@14000000  <class AppleUSBXHCIPCI, id 0x10000025e, registered, matched, active, busy 0 (648 ms), retain 170>

    | |   |   +-o SSP5@14100000  <class AppleUSB20XHCIPort, id 0x10000027a, registered, matched, active, busy 0 (603 ms), retain 16>

 

This sound like my problem, how does one force USB30XHCI to be used on a SSP port?

Link to comment
Share on other sites

If anyone runs into non-working USB after sleep, it could be caused by DSDT.

 

I found that on one of my laptops, that DSDT was calling XSEL from _WAK (indirectly through XWAK). XSEL (or is it ESEL?) on this particular machine sets PR2 (32-bit register at offset 0xD0 in XHC PCI config) which controls how USB2 devices are routed to the ECH1 controller (USB2 deferring, as -gux_defer_usb2 does). Because it is routing USB2 devices to EHC1 and the new drivers in 10.11 don't expect it (system expects them to stay on the XHC controller), no USB ports devices were working after sleep.

 

Easy fix: Make XSEL and ESEL do nothing.

 

 

Hey I just ran along this post and can say that my G750Jx Asus Haswell Laptop only behaves like this when on battery only.

Link to comment
Share on other sites

 

I found Microsoft Windows 10 also put all USB 2.0 and 3.0 ports together in the XHC controller. The only difference is they don't have 15 port limitation. See the photo (Gigabyte Z97 board + Windows 10). So, we'd better find a way to unlock 15 port limitation in AppleUSBXHCI.kext ???

 

post-629226-0-38756800-1442944746_thumb.png

Link to comment
Share on other sites

×
×
  • Create New...