Giter Club home page Giter Club logo

Comments (27)

Andrey1970AppleLife avatar Andrey1970AppleLife commented on July 18, 2024 1

I don't support hackintool.
https://github.com/acidanthera/bugtracker/blob/master/DOCUMENTS.md
ACDT0116PRU
https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EHCx_OFF.dsl

from hackintool.

whatnameisit avatar whatnameisit commented on July 18, 2024 1

EHCx Hub ports are from /S*/L*/E*/IOUSBHostFamily.kext/C*/P*/AppleUSBEHCIPCI.kext/C*/Info.plist:
image
USB devices to plug into the external ports and attach under Hubs can be configured like that in /S*/L*/E*/IOUSBHostFamily.kext/C*/P*/AppleUSBHub.kext/C*/Info.plist:
image
These kexts are from 10.14.6.
You can use model instead of board-id, or vice versa.
USB devices listed under Hub ports should have their type set as USB2 (0), not Internal (255) or they will fail to be injected. Oh shoot, I have not tested USB2 (2)...
My kexts:
USB kexts.zip
My IOReg:
MacBook Pro.zip
I hope you can update Hackintool to check for "hub" ports and "device" ports that are under the "hub" with USBInjectAll.kext installed because currently Hackintool mixes them up in unpredictable ways:
USBPorts.kext.zip
But as Sniki pointed out, it works great for XHC, and also many other things I greatly appreciate :)

from hackintool.

Sniki avatar Sniki commented on July 18, 2024 1

@whatnameisit you are a legend, currently im on Arch Linux on my X240 but i did try on my Desktop HP Elite 8300SFF by checking you two separate kexts, you figured it out.
Now it's working perfect, i did manage to make them work in a single kext now including XHC.
Here is the attached ioreg and USBPorts.kext the correct way.
As HUB1 and HUB2 we can actually name them as we wish as you mentioned above.

@headkaze now we have the correct implementation, have a look at this USBPorts.kext to incorporate changes.

For testing purpose i don't have IOProbScore and EHC1 but EH01 instead as i was using USBInjectAll.kext previously, but you can rename the values on the kext to EHC1 and EHC2 as i just left them like that after the quick test. (was lazy to edit config.plist to remove the renames from ehc1 to eh01 and ehc2 to eh02.

Thanks !
HP8300.zip
USBPorts.kext.zip

from hackintool.

benbaker76 avatar benbaker76 commented on July 18, 2024 1

@whatnameisit can you please contact me (username @ gmail.com) to discuss fixing this issue. First thing that would be useful is to generate a USBPorts.kext using Hackintool then make the minimum changes required for it to work and then show me the changes side by side so I can go through and make the changes. Then I need you to test that Hackintool is generating the file correctly as I don't have a machine with a HUB to test this.

from hackintool.

whatnameisit avatar whatnameisit commented on July 18, 2024 1

@Sniki @headkaze The way with Hackintool is to install USBInjectAll which then requires EH01, EHC2, and XHC renames, right? If all devices are correctly named and all ports are injected then you have the same situation as having installed USBInjectAll the correct way. Then Hackintool's USB tab works as it should.
Doesn't OpenCore lift the limit on XHCI only and without any renames because disabling EHCI and renames is what's recommended?
Anyways, you guys can collaborate by committing EHC1, EHC2 name match on USBInjectAll, or even better is to match by locationID such as 1D000000 for EHx1 and 1A000000 for EHx2 and the same thing for Intel's and AMD's XHC (It works in either hex or decimal.). Hackintool can check the locationID of these controllers and show all ports on the screen.
I can test :)

from hackintool.

benbaker76 avatar benbaker76 commented on July 18, 2024 1

Yeah so USBInjectAll is needed to inject the ports but I think we can make a quirk for OC to do the same thing at some point.

from hackintool.

Sniki avatar Sniki commented on July 18, 2024

I don't support hackintool.
https://github.com/acidanthera/bugtracker/blob/master/DOCUMENTS.md
ACDT0116PRU
https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EHCx_OFF.dsl

I understand but I did check AppleLife forum where you posted how to create a codeless kext info.plist for USB ports but it didn't show how to make it for EH01 and EH02 ports.

I can't disable EH01 controller because touchscreen/EMV Smart Card Reader (depends on laptop) is attached to that port and it's hardwired to it, I can't move it into XHC controller.

The other problem is for desktops (older models).
I have an HP Elite 8300 SFF (Ivy Bridge).
It has 6x USB2 Ports + 3xUSB2 (internal headers) and 4xUSB3 ports.
What to do on this scenario ?

9 USB2 + 4USB3 with 2.0 and 3.0 functionality makes a total of (9+8=17) which is out of the 15 limit.

Should it be possible to implement EH01 and EH02 ports with such kext ?

Do you have an example (template kext) that has EH01 and EH02 ports ?

Headkaze Hackintool is not generating EH01 and EH02 controller ports correctly,
But i CC you @Andrey1970AppleLife to check the generated USBPorts.kext since it's your method that I checked on AppleLife maybe you can tell where the problem is on that .kext
Or maybe you can direct or attach us to a codeless kext example with EH01 and EH02 ports.

Thanks

from hackintool.

Andrey1970AppleLife avatar Andrey1970AppleLife commented on July 18, 2024

You didn't read a manual up to the end. There is about Legacy_InternalHub-EHCx.kext

P.S. It not my place, I won't make comments here further.

from hackintool.

Sniki avatar Sniki commented on July 18, 2024

You didn't read a manual up to the end. There is about Legacy_InternalHub-EHCx.kext

P.S. It not my place, I won't make comments here further.

Thank you @Andrey1970AppleLife , that's all I needed for reference so I can find the issue.

Sorry for bothering you with that, I had to use Google translate on AppleLife to read that.
Will check the entire thread.

Thanks again.

from hackintool.

benbaker76 avatar benbaker76 commented on July 18, 2024

Did you use USBInjectAll.kext when setting up your USB ports? It's a requirement to show all ports for configuring in Hackintool.

Yes, in future please don't bother the acidanthera team with Hackintool issues.

from hackintool.

Sniki avatar Sniki commented on July 18, 2024

Did you use USBInjectAll.kext when setting up your USB ports? It's a requirement to show all ports for configuring in Hackintool.

Yes, in future please don't bother the acidanthera team with Hackintool issues.

Yes, I used USBInjectAll.kext + my SSDT-UIAC (SSDT-USB) as well on second attempt so everything is preconfigured and just do the USB ports.kext
The problem is with EH01 and EH02 controller ports.
Specifically EH01 > PR11 part is ok but under PR11 the HP15 port doesn't appear anywhere at all.
Check files on attached USB.zip for reference.

I can't figure out where the problem is.
XHC ports are perfect on every hackintosh.
Just EH01 and EH02 controllers are not being configured properly, tested and verified on 4 hacks so far.

from hackintool.

benbaker76 avatar benbaker76 commented on July 18, 2024

I'm hoping that @corpnewt can take a look at this as I don't have access to any machine with EH0 ports on it.

from hackintool.

Sniki avatar Sniki commented on July 18, 2024

EHCx Hub ports are from /S*/L*/E*/IOUSBHostFamily.kext/C*/P*/AppleUSBEHCIPCI.kext/C*/Info.plist:
image
USB devices to plug into the external ports and attach under Hubs can be configured like that in /S*/L*/E*/IOUSBHostFamily.kext/C*/P*/AppleUSBHub.kext/C*/Info.plist:
image
These kexts are from 10.14.6.
You can use model instead of board-id, or vice versa.
USB devices listed under Hub ports should have their type set as USB2 (0), not Internal (255) or they will fail to be injected. Oh shoot, I have not tested USB2 (2)...
My kexts:
USB kexts.zip
My IOReg:
MacBook Pro.zip
I hope you can update Hackintool to check for "hub" ports and "device" ports that are under the "hub" with USBInjectAll.kext installed because currently Hackintool mixes them up in unpredictable ways:
USBPorts.kext.zip
But as Sniki pointed out, it works great for XHC, and also many other things I greatly appreciate :)

Thank you for confirming this @whatnameisit ,
As it really makes USB 2 ports useless or better say this awesome kext unusable in hardware with USB2 ports.
With UsbInjectAll.kext in my case PR11 and PR21 are the two USB2 Hubs which should be 255 and the ports are HP11 till HP21 or so.

So what you are saying is that those ports should be as PRT instead of HP right ?

Example as you can see on my files, my Thinkpad X240 does have a EH01 controller as touchscreen on some models is attached to EH01>PR11>HP15 or my model is the smart card reader.

So with the usbports.kext it should be PRT5 ?
Am i correct ?

from hackintool.

whatnameisit avatar whatnameisit commented on July 18, 2024

@Sniki

So what you are saying is that those ports should be as PRT instead of HP right ?

The example screenshots I took from Apple's kexts both have the name PRT1 for both "Hub" and "devices", so it is confusing when you ask if something should be PRT. And port naming does not matter at all, as you can see in my IOReg I have named all "device" ports so I can identify them just by reading their names: H11L for EHC1 left @ 1 and H23W for EHC2 webcam @ 3.

So with the usbports.kext it should be PRT5 ?

Since port names do not matter, I believe it is that your kext needs to set the porttype for the "device" port @ 5 to be "0". And I'm not 100 % sure for IOName, CFBundleIdentifier, and IOClass but I modified them to look similar to mine:
USBPorts.kext.zip
I hope it works for you...If not, you can try changing the IOName from AppleUSB20InternalHub to AppleUSB20InternalIntelHub.

from hackintool.

benbaker76 avatar benbaker76 commented on July 18, 2024

@Sniki please try 2.9.5 and let me know of any issues.

Big thanks to @whatnameisit for helping test.

from hackintool.

Sniki avatar Sniki commented on July 18, 2024

@headkaze thanks, i will test it during this weekend.

However im already using a custom made USBPorts.kext with @whatnameisit suggestions.
Things that id like to know.

For example im using OpenCore and i don't have EHC1 renamed to EH01 as i modified the USBPorts.kext to match with EHC1 instead of EH01.

I was curious to know if Hackintool would work with that and if XHCIPortLimit Quirk of OpenCore does remove the port limit without USBInjectAll and without those renames ?

from hackintool.

Sniki avatar Sniki commented on July 18, 2024

@Sniki @headkaze The way with Hackintool is to install USBInjectAll which then requires EH01, EHC2, and XHC renames, right? If all devices are correctly named and all ports are injected then you have the same situation as having installed USBInjectAll the correct way. Then Hackintool's USB tab works as it should.
Doesn't OpenCore lift the limit on XHCI only and without any renames because disabling EHCI and renames is what's recommended?
Anyways, you guys can collaborate by committing EHC1, EHC2 name match on USBInjectAll, or even better is to match by locationID such as 1D000000 for EHx1 and 1A000000 for EHx2 and the same thing for Intel's and AMD's XHC (It works in either hex or decimal.). Hackintool can check the locationID of these controllers and show all ports on the screen.
I can test :)

Good idea, since im maintaining USBInjectAll.kext now, i will try to change so it matches with location id as it's required work to be done only on EHCI controllers.
That way we can avoid renames like EHC1 and EHC2 to EH01 and EH02

Thanks for the idea !

from hackintool.

benbaker76 avatar benbaker76 commented on July 18, 2024

@Sniki I'm wondering if it would be possible to have Hackintool configure ports without the need for USBInjectAll?

Since we know this about the location id:
The value (e.g. 0x14320000) is represented as follows: 0xAABCDEFG
AA - Ctrl number 8 bits (e.g. 0x14, aka XHCI)
B - Port number 4 bits (e.g. 0x3, aka SS03)
C ~ F - Bus number 4 bits (e.g. 0x2, aka IOUSBHostHIDDevice)
C ~ F are filled as many times as many USB Hubs are there on the port.
ie.
XHCI - 0x14xxxxxx
EHx1 - 0x1Dxxxxxx
EHx2 - 0x1Axxxxxx

Does USBInjectAll just rename the ports HSxx, SSxx and HPxx based on location id? If you have a port limit patch without USBInjectAll does IORegistry still list all ports?

from hackintool.

Sniki avatar Sniki commented on July 18, 2024

@Sniki I'm wondering if it would be possible to have Hackintool configure ports without the need for USBInjectAll?

Since we know this about the location id:
// The value (e.g. 0x14320000) is represented as follows: 0xAABCDEFG
// AA - Ctrl number 8 bits (e.g. 0x14, aka XHCI)
// B - Port number 4 bits (e.g. 0x3, aka SS03)
// CF - Bus number 4 bits (e.g. 0x2, aka IOUSBHostHIDDevice) // CF are filled as many times as many USB Hubs are there on the port.

Does USBInjectAll just rename the ports HSxx, SSxx and HPxx based on location id? If you have a port limit patch without USBInjectAll does IORegistry still list all ports?

@headkaze good question.
To be honest im not 100% sure yet.
I will do some testing tonight and tomorrow as it's weekend and i don't have anything else on my agenda.
Thanks for these details

Will check OpenCore XHCI Port Limit removal Quirk without USBInjectAll.kext and see if all ports do get listed, if that turns out to be true, we won't need USBInjectAll.kext anymore.

from hackintool.

whatnameisit avatar whatnameisit commented on July 18, 2024

@Sniki @headkaze USBInjectAll injects all ports with the names defined in its Info.plist by locationID. To be a little bit more informative, macOS first checks the ACPI if any USB ports are active, which many times are wrong. To get around the wrong ACPI, macOS then checks if any ports are injected on the IORegistry level (the plugin kexts found in /S*/L*/E*/IOUSBHostFamily.kext or hackintosh's USBPorts.kext) and overwrites the ACPI ports. If no data is injected on the IORegistry level, macOS assumes the ports found in the ACPI.
And here's a bit of what USBInjectAll has in its Info.plist:
1

from hackintool.

benbaker76 avatar benbaker76 commented on July 18, 2024

I don't think it will be possible to do without USBInjectAll. Because it injects the XHC ports UsbConnector to 3 (USB 3 Standard-A connector) so they'll respond to a device being plugged in. Without it the defaults are set based on (I'm guessing) the Model Identifier. Please correct me if I'm wrong.

EDIT: I spoke to vit about this and he seems to think that you shouldn't need USBInjectAll with the XHCIPortLimit Quirk. So we need to investigate this also. We could add the setting UsbConnector to 3 in the Quirk.

from hackintool.

benbaker76 avatar benbaker76 commented on July 18, 2024

from hackintool.

whatnameisit avatar whatnameisit commented on July 18, 2024

I'm using Clover. I'd applied the patch via KextsToPatch. I always had in mind to switch over to OpenCore, so I will later test OpenCore.
@headkaze I successfully booted with OpenCore 0.5.4, and the XHCIPortLimit quirk does not inject ports disabled in ACPI. I'm convinced vit9696 said that because the quirk and USBInjectAll have different usages. The former lifts the limit imposed by macOS on the number of XHCI ports (15 per XHC device), and the latter overwrites port-injection in the ACPI by injecting ports listed in its Info.plist until the port number limit on XHC or EHC device. If used together, we have all ports on IOService that have overwritten IODeviceTree then one can check all physical and internal ports. Then the quirk can be removed, and SSDT-UIAC.aml or USBPorts.kext can be used, the latter injection by kext being Acidanthera's preferred method.
Here's the IOReg from OpenCore-booted HackBookPro15,4:
HBP15,4.zip

from hackintool.

benbaker76 avatar benbaker76 commented on July 18, 2024

from hackintool.

whatnameisit avatar whatnameisit commented on July 18, 2024

from hackintool.

Sniki avatar Sniki commented on July 18, 2024

@headkaze sorry for my late answer here, i've been busy with other stuff.
I will do some testing soon on the USBPorts side, for now even though it's configured correctly by creating the USBPorts.kext manually, i will give it a try from scratch and see how it works during this week/weekend

from hackintool.

whatnameisit avatar whatnameisit commented on July 18, 2024

Hey, headkaze. Instead of opening a new issue, I came here because of the similarities.
I have an HP Elite X2 1012 G2, and it has an internal hub under XHC that detachable keyboards connect. The keyboard does not show up, and I'm thinking that Hackintool has never supported this kind of setup. A similar setup, however, is used in certain iMac models:

		<key>iMac13,1-InternalHub-EHC1-InternalHub</key>
		<dict>
			<key>CFBundleIdentifier</key>
			<string>com.apple.driver.AppleUSBHostMergeProperties</string>
			<key>IOClass</key>
			<string>AppleUSBHostMergeProperties</string>
			<key>IOProviderClass</key>
			<string>AppleUSB20InternalHub</string>
			<key>IOProviderMergeProperties</key>
			<dict>
				<key>port-count</key>
				<data>
				AQAAAA==
				</data>
				<key>ports</key>
				<dict>
					<key>PRT1</key>
					<dict>
						<key>port</key>
						<data>
						AQAAAA==
						</data>
						<key>portType</key>
						<integer>2</integer>
					</dict>
				</dict>
			</dict>
			<key>locationID</key>
			<integer>488112128</integer>
			<key>model</key>
			<string>iMac13,1</string>
		</dict>

This specific code above means there is an internal hub (locaionID of 488112128 or 0x1D180000) alongside other ports under EHCI (the controller), and a lower port is connected to this internal hub. This should apply to boards that have internal hubs.
Since the same driver AppleUSB20InternalHub is shown in IORegistry with no injector kext, I thought I might use this structure for my XHC's internal hub, and it worked:

		<key>MacBookPro14,1-XHC-internal-hub</key>
		<dict>
			<key>CFBundleIdentifier</key>
			<string>com.apple.driver.AppleUSBHostMergeProperties</string>
			<key>IOClass</key>
			<string>AppleUSBHostMergeProperties</string>
			<key>IOProbeScore</key>
			<integer>5000</integer>
			<key>IOProviderClass</key>
			<string>AppleUSB20InternalHub</string>
			<key>IOProviderMergeProperties</key>
			<dict>
				<key>port-count</key>
				<data>AwAAAA==</data>
				<key>ports</key>
				<dict>
					<key>HS01</key>
					<dict>
						<key>name</key>
						<string>ABCD</string>
						<key>port</key>
						<data>AQAAAA==</data>
						<key>portType</key>
						<integer>0</integer>
					</dict>
				</dict>
			</dict>
			<key>locationID</key>
			<integer>337641472</integer>
			<key>model</key>
			<string>MacBookPro14,1</string>
		</dict>

스크린샷 2022-01-29 오후 5 17 21
I'm attaching IOReg below.
Jinmo’s MacBook Pro.zip
I thought searching for internal hub could be similar to searching for ports under EHCI. Would you like to update the USB tab like last time?

from hackintool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.