Jump to content
wegface

(GUIDE) 10.11 full speed USB (series 8/9) keeping vanilla SLE

498 posts in this topic

Recommended Posts

Your ADR address is not zero, its a function with return value ADD(XSPA, one), or XSPA+1.

 

To get the ADR, another way is to use IORegistryExplorer, check IOACPIPlane...but ADR is completely unnecessary if we go through the DSDT port removal route.

 

And fwiw, you can sacrifice the HS port associated with USB3 port, in this way, that USB3 port still works but only accepts USB3 devices with no response to USB2 devices. You can also sacrifice the SS port and making the USB3 port USB2-only.

 

If you don't have the ADR how do you know which HSxx to delete? I had 14 of them, now only using 9 due to 6 SS ports.

 

Ahh I didn't think of that, but I don't have much USB 3.0 peripherals. The one disabled is in the back, never gets used. I'll keep that in mind though and add it to my post.

Share this post


Link to post
Share on other sites
Advertisement

If you don't have the ADR how do you know which HSxx to delete? I had 14 of them, now only using 9 due to 6 SS ports.

 

Ahh I didn't think of that, but I don't have much USB 3.0 peripherals. The one disabled is in the back, never gets used. I'll keep that in mind though and add it to my post.

 

Because we only need to identify HSxx ports in use, their ADR doesn't matter. Check OP's guide, first photo, you can see he got all ports identified without messing with ADR. Once you got the port mapping, removing unwanted ones in DSDT and done.

 

ADR is only necessary for kext injection.

Share this post


Link to post
Share on other sites

Because we only need to identify HSxx ports in use, their ADR doesn't matter. Check OP's guide, first photo, you can see he got all ports identified without messing with ADR. Once you got the port mapping, removing unwanted ones in DSDT and done.

 

ADR is only necessary for kext injection.

 

Ok but in Yosemite in IOReg, at least on my computer, what it loads up you cannot decipher which HS or SS ports are being used by whatever is plugged in. Look at my first and second screen shot. There's no way to know where the ports link back to which HS or SS. That is why I used the ADR. Unless I completely  missed something.

 

I noticed you said it's a function, I'm sure it is something b/c in El Cap it later has an address. Usually they are formatted as such, xx0000 like 110000. I'm not an expert with DSDT, so when I saw "_ADR, 0" in the method and NotSerialized, I pretty much stopped there and was like the hell with it, lol. Might be cool to learn it, I dunno. Here is my SSP1 from my DSDT.

Device (SSP1)
                {
                    Method (_ADR, 0, NotSerialized)
                    {
                        Return (Add (XSPA, Zero))
                    }

                    Name (_STA, 0x0F)
                    Method (_UPC, 0, Serialized)
                    {
                        Name (UPCP, Package (0x04)
                        {
                            0xFF, 
                            0x03, 
                            Zero, 
                            Zero
                        })
                        Return (UPCP)
                    }

                    Method (_PLD, 0, Serialized)
                    {
                        Name (PLDP, Package (0x01)
                        {
                            Buffer (0x10)
                            {
                                /* 0000 */    0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                /* 0008 */    0x69, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00
                            }
                        })
                        CreateBitField (DerefOf (Index (PLDP, Zero)), 0x40, VIS)
                        If (LNot (And (PR3, One)))
                        {
                            And (VIS, Zero, VIS)
                        }

                        Return (PLDP)
                    }
                }

@blazinsmokey you can share me a DSDT and the clover config file. i'm using the same motherboard with you.

 

It's updated on my main post.

Share this post


Link to post
Share on other sites

Hi guys,

 

First of all, thank you everyone for contributing to this topic. Especially thanks to @wegface, @pjalm and @arix98, I finally managed to have all USB fully worked for my Gigabyte H97-Gaming 3. The following is quick instruction for ones (newbie just like me) who are not good at hacking/modifying hackintosh:

 

Presquitesite:

- Windows 7/8/8.1/10

- USB Tree Viewer app (Free)

- USB_9Series_Injector kext by @wedface

- Any text editors to modify the kext

- Online tools to convert decimal numbers to hex and base64 numbers

 

1. Based on @arix98 guide, I used USBViewer to map the USB ports. To map the ports, all you have to do is open USBViewer, Plug your USB 2.0 and USB 3.0 in and out your PC, you will find out the port number of the USB hub you put in. Mine has maximum of 21 ports, and it will map like: 

   01 - HS01

   02 - HS02

   -----------

   15 - HS15

   

   16 - SSP1

   17 - SSP2

   ------------

    21 - SSP6

 

2. By now, you have all port mappings. For my mainboard, when I looked into my vanilla OEM DSDT, `XHC` is already there, so I don't patch the DSDT, I could safely skip this step.

 

3. Next step, I modify the injector kexts by @wedge. Open the `info.plist` file inside the kext, change the port number to your corresponding mapping. Notice that, you must convert the port number (decimal) into base64. I used online tool to do that. First, convert decimal into hex and then convert hex into base64.

 

4. Put the modified kext into Clover EFI folders

 

5. Restart and test all your USB hubs

 

6. Profits.

 

So the main problem is the 15 ports limit, and one USB3 port takes 2 ports -- one for usb2 devices one for usb3. For a system with 8 USB2+6 USB3 that's 20 ports total....that's why we need to remove unused ports or even sacrifice some real one.

 

Is there anyway to remove the 15 limit in the XHCI driver -- perhaps a directly kext patch or clover patch so we can just let the OS grab all ports from DSDT? or at least is it technically possible?

 

Update:

 

Finally got it, and I use Windows instead of Yosemite to find port mapping.

 

My MB is a MSI Z87, the DSDT looks very much like OP's, with HS01-HS15(HS15 is a dummy port) and SSP1-SSP6 under XHC, so thats 21 ports total.

 

Under Windows, use aida64 or the free MS usbviewer, and I got 21 ports listed.  :D

In my case, port 1-15 map to HS01-HS15 and port16-21 map to SSP1-SSP6. So with a USB2 and a USB3 flash drive, I was able to map all ports correctly.

Share this post


Link to post
Share on other sites

Hi guys,

 

First of all, thank you everyone for contributing to this topic. Especially thanks to @wegface, @pjalm and @arix98, I finally managed to have all USB fully worked for my Gigabyte H97-Gaming 3. The following is quick instruction for ones (newbie just like me) who are not good at hacking/modifying hackintosh:

 

Presquitesite:

- Windows 7/8/8.1/10

- USBViewer app (Free)

- USB_9Series_Injector kext by @wedface

- Any text editors to modify the kext

- Online tools to convert decimal numbers to hex and base64 numbers

 

Can you link to this windows "USBViewer" app. Many people would benefit from this who already installed capitan and cannot map correctly. Thanks.

Share this post


Link to post
Share on other sites

Injector no longer needed if using 10.11.1 Beta 3, simply edit DSDT and remove EHC1/EHC2 and under XHC > RHUB remove any ports not needed to keep limit to 15. May work on earlier OSX but have not tested.

 

* This is only for Series 8/9. Do not remove EHC1/EHC2 on other chipsets.

This is an interesting idea.. basically disconnecting the ACPI identity from the PCIe identity...

 

The ioreg looks a little "less pretty", but...

 

Note that extensive ACPI edits are not needed. With a little knowledge of the AML byte stream, you can use config.plist/ACPI/DSDT/Patches:

post-1031260-0-54160000-1444405268_thumb.png

 

The patches are equivalent to:

into device name_adr 0x001D0000 code_regex Name.*_ADR.* replace_matched begin Name(_ADR,0) end;
into device name_adr 0x001A0000 code_regex Name.*_ADR.* replace_matched begin Name(_ADR,0) end;
into device name_adr 0x00140000 code_regex Name.*_ADR.* replace_matched begin Name(_ADR,0) end;
Note: Tested on 8-series, and 6-series. 7-series is next. Expectation is that it will work. Solution not specific to 8/9-series.

 

Note 2: It *might* break "wake on USB" (no _PRW to associate with GPE index). Which on a laptop, no problem (actually fixes any "instant wake" problems), but for a desktop might be an issue... Have not tested the idea on my 6-series desktop yet. Will test on 8-series BRIX also.

 

Note 3: To completely get rid of the EHC1/EHC2/XHC objects (or if you renamed, EH01/EH02/XHC), you can force 0 for _STA. I use an SSDT.

// a snippet
  External(\_SB.PCI0, DeviceObj)
  Name(\_SB.PCI0.EHC1.STA, 0)
  Name(\_SB.PCI0.EHC2.STA, 0)
  Name(\_SB.PCI0.XHC.STA, 0)
Caveats:

 

There are some issues that result from using this method. As expected, wake on USB was disabled (this is kind of nice for laptops). But also injections you might do via _DSM, config.plist/Devices/AddProperties, config.plist/Devices/Arbitrary, or config.plist/Devices/USB/Inject=true... don't happen. And that's a big problem. Such properties could be injected with an injector kext (that matches on PCI id), but then you're back to building an injector...

 

I think the idea does have merit for the "install from USB scenario" where you don't want USB to be perfect... you just want it to work.

Share this post


Link to post
Share on other sites

any fix should not be dependent on a boot manager

There are people that don't use Clover? :-)

 

But seriously, you should read post #160 more carefully. A set of MaciASL patches were provided.

Share this post


Link to post
Share on other sites

There are people that don't use Clover? :-)

 

But seriously, you should read post #160 more carefully. A set of MaciASL patches were provided.

There are yes and every new clover version, makes new bugs, and more people who move to something else. 

Share this post


Link to post
Share on other sites

This is an interesting idea.. basically disconnecting the ACPI identity from the PCIe identity...

 

The ioreg looks a little "less pretty", but...

 

Note that extensive ACPI edits are not needed. With a little knowledge of the AML byte stream, you can use config.plist/ACPI/DSDT/Patches:

attachicon.gifScreen Shot 2015-10-09 at 8.40.01 AM.png

 

The patches are equivalent to:

into device name_adr 0x001D0000 code_regex Name.*_ADR.* replace_matched begin Name(_ADR,0) end;
into device name_adr 0x001A0000 code_regex Name.*_ADR.* replace_matched begin Name(_ADR,0) end;
into device name_adr 0x00140000 code_regex Name.*_ADR.* replace_matched begin Name(_ADR,0) end;
Note: Tested on 8-series, and 6-series. 7-series is next. Expectation is that it will work. Solution not specific to 8/9-series.

 

Note 2: It *might* break "wake on USB" (no _PRW to associate with GPE index). Which on a laptop, no problem (actually fixes any "instant wake" problems), but for a desktop might be an issue... Have not tested the idea on my 6-series desktop yet. Will test on 8-series BRIX also.

 

 

I don't get it. If I read correctly, 0x001D0000 and 0x001A0000 are the ADR of EHC1 and EHC2(are they the same across all systems?) and 0x00140000 is ADR of XHC. And by changing ADR to 0 the bus is removed.

 

PJALM's idea is to remove unused ports on XHC and the keep the total# under 15, but your mod, completely remove(?) XHC without dealing with individual ports???

Share this post


Link to post
Share on other sites

I don't get it. If I read correctly, 0x001D0000 and 0x001A0000 are the ADR of EHC1 and EHC2(are they the same across all systems?) and 0x00140000 is ADR of XHC.

Yes.

 

And by changing ADR to 0 the bus is removed.

By changing the _ADR to zero, the ACPI identity is "disconnected" from the PCIe identity. The system cannot match the two as matching is done based on the value of _ADR.

 

PJALM's idea is to remove unused ports on XHC and the keep the total# under 15, but your mod, completely remove(?) XHC without dealing with individual ports???

Correct. My idea is a bit of an extension to PJALMs idea. Same thing going on regarding the port definitions. By disconnecting the associated ACPI objects, the kext cannot find the associated port definitions in DSDT.

Share this post


Link to post
Share on other sites

....1. Based on @arix98 guide...

Just a brief question, could someone link to arix98's guide that was mentioned. I'm wanting to try this windows mapping method on my GA-Z87X-UD4H

I can't find it through Forum search.

Many Thanks

Share this post


Link to post
Share on other sites

Yes.

 

 

By changing the _ADR to zero, the ACPI identity is "disconnected" from the PCIe identity. The system cannot match the two as matching is done based on the value of _ADR.

 

 

Correct. My idea is a bit of an extension to PJALMs idea. Same thing going on regarding the port definitions. By disconnecting the associated ACPI objects, the kext cannot find the associated port definitions in DSDT.

 

So by doing this there is no 15 ports limit then? and we don't need any port mapping, just change ADR to 0 and done?

Share this post


Link to post
Share on other sites

Just a brief question, could someone link to arix98's guide that was mentioned. I'm wanting to try this windows mapping method on my GA-Z87X-UD4H

I can't find it through Forum search.

Many Thanks

Its one page back

Share this post


Link to post
Share on other sites

So by doing this there is no 15 ports limit then? and we don't need any port mapping, just change ADR to 0 and done?

I have no hardware with >15 ports.

Share this post


Link to post
Share on other sites

There are people that don't use Clover? :-)

 

But seriously, you should read post #160 more carefully. A set of MaciASL patches were provided.

 

I would like to give this a try, but alas my DSDT-editing skills are subpar, and the original DSDT for my system fails to compile with MaciASL even without me patching anything

Can I get some willing gracious soul to take a look?

 

https://filetea.me/t1srvJAnC8ZRGSU5qQzVvldWg

Share this post


Link to post
Share on other sites

I tried Rehabman's guide. I copied all the values he provided in the screenshot to my config.plist, but nothing has changed.

 

What am I missing?

 

Also it seems that my device that I plugged into USB 2.0 is showing up in the USB 3.0 bus.

Share this post


Link to post
Share on other sites

I tried Rehabman's guide. I copied all the values he provided in the screenshot to my config.plist, but nothing has changed.

 

What am I missing?

No idea without seeing your config.plist.

 

Also it seems that my device that I plugged into USB 2.0 is showing up in the USB 3.0 bus.

It is normal when the USB2 port is connected to the XHCI controller (without FakePCIID_XHCIMux).

...

Caveats:

 

There are some issues that result from using this method. As expected, wake on USB was disabled (this is kind of nice for laptops). But also injections you might do via _DSM, config.plist/Devices/AddProperties, config.plist/Devices/Arbitrary, or config.plist/Devices/USB/Inject=true... don't happen. And that's a big problem. Such properties could be injected with an injector kext (that matches on PCI id), but then you're back to building an injector...

 

I think the idea does have merit for the "install from USB scenario" where you don't want USB to be perfect... you just want it to work.

I thought I'd quote my added "caveats" just for those that don't go back and read any edits...

 

 

---------

 

 

Here is a way to eliminate the DSDT port definition without changing _ADR and without editing DSDT.

 

Create an SSDT:

DefinitionBlock ("SSDT-HACK.aml", "SSDT", 1, "hack", "hack", 0x00003000)
{
    External(_SB.PCI0, DeviceObj)

    Name(\_SB.PCI0.XHC.RHUB._STA, 0)
    Name(\_SB.PCI0.EHC1.HUBN._STA, 0)
    Name(\_SB.PCI0.EHC2.HUBN._STA, 0)
}
Note: Names must match your DSDT. And _STA object at that path must NOT already exist.

 

This effectively "turns off" the port definition part of XHC/EHC1/ECH2, but keeps the ACPI identity attached to the PCIe device itself.

 

Of course, you would still have to rename the EHC1/EHC2 devices if there is a built-in injector for your SMBIOS.

 

In that case, after renaming (I would use config.plist/ACPI/DSDT/Patches for the rename):

DefinitionBlock ("SSDT-HACK.aml", "SSDT", 1, "hack", "hack", 0x00003000)
{
    External(_SB.PCI0, DeviceObj)

    Name(\_SB.PCI0.XHC.RHUB._STA, 0)
    Name(\_SB.PCI0.EH01.HUBN._STA, 0)
    Name(\_SB.PCI0.EH02.HUBN._STA, 0)
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   1 member

×