USBToolBox / tool

the USBToolBox tool
MIT License
936 stars 62 forks source link

UTBMap.kext not being loaded? #19

Closed adrianlungu closed 3 years ago

adrianlungu commented 3 years ago

I'm just leaving this here in case anyone else runs into this. Not sure if it's something on my end, or there was something preventing this from properly being loaded.

I've been trying to load the generated UTBMap.kext for a couple of hours now and it didn't seem to work at all. Do note that I've generated the kext using Windows. Everything is up to date (including BIOS, drivers, etc.).

Kextutil was reporting the following:

Diagnostics for /Users/adrian/UTBMap.kext:
Warnings:
    Personality CFBundleIdentifier differs from containing kext's (not necessarily a mistake, but rarely done):
        XHC
    Personality CFBundleIdentifier names a kext that can't be found:
        'XHC' -> 'com.dhinakg.USBToolBox.kext'
    Kext has no executable or compatible version, so it should not declare any OSBundleLibraries.

Dependency Resolution Failures:
    No kexts found for these libraries:
        com.dhinakg.USBToolBox.kext

In the end, I stumbled upon this page: https://dortania.github.io/OpenCore-Post-Install/usb/manual/manual.html#special-notes

After following the guide there, I changed the following:

In the end, this helped load the kext and have the XHC Ports correlate with the IOProviderMergeProperties specified in the kext, and System Report shows the proper USB ports now.

I've attached the before (UTBMap.kext) and after (USBMap.kext) for reference.

usb kexts.zip

dhinakg commented 3 years ago

Did you have USBToolBox.kext along with UTBMap.kext? See step 8 in the README.

adrianlungu commented 3 years ago

No, I did not;

I looked into the USBToolBox.kext repo and when I read

 However, it is not needed and must be removed if you choose to map from the start (ie. from Windows, using the USBToolBox tool).

I understood that I shouldn't have USBToolBox.kext alongside the UTBMap.kext since I built it using Windows.

dhinakg commented 3 years ago

I was referring to UTBDefault.kext with that sentence, although I see how that can be confusing. I'll fix it soon, but basically, UTBDefault.kext should be removed once you have a map

adrianlungu commented 3 years ago

No other USB or UTB related kext either; you can find a copy of exactly what I'm running here: https://github.com/adrianlungu/OpenCore-Z490-UD-rev-10

If I turn USBMap.kext off and turn UTBMap.kext on, OpenCore doesn't seem to run it. It does run USBMap.kext though which is UTBMap.kext with the changes I mentioned earlier.

dhinakg commented 3 years ago

Again: UTBMap.kext requires USBToolBox.kext USBMap.kext does not

The USBToolBox tool can generate both, but UTBMap.kext is default. You can switch to build maps that don't rely on USBToolBox.kext (option "Use Native Classes") in the tool's settings.

adrianlungu commented 3 years ago

Ah, ok, now it makes sense!

I wasn't sure what the Use Native Classes option would do.

Might I propose a slight improvement in the docs for this repo ? Or if you're open to collabs I could give it a shot and cook up a PR ?

dhinakg commented 3 years ago

Up to you. Really need to work on proper docs (kext options, in depth how to map, etc) but I've just entered the period where I can't spend a lot of time.