Contribute
Register

The New Beginner's Guide to USB Port Configuration

Hi guys, I have LG Gram 17 with Big Sur 11.6 I generated and installed USBPorts.kext and everything seems working. Sleep, waking up, all usb ports etc. I can transfer large amount of data to/from usb flash drives. However, I've recently bought nvme-to-usb3.0 dongle and installed 1TB Intel nvme drive there. With this dongle I have problems. During data transfer it suddenly disconnects. I'm guessing the power provided by usb port is not enough for it to work properly. In system info for this drive I see

Code:
  Current Available (mA):    900
  Current Required (mA):    896
  Extra Operating Current (mA):    0

While for iphone, for example, I see

Code:
  Current Available (mA):    500
  Current Required (mA):    500
  Extra Operating Current (mA):    1504
  Sleep current (mA):    2100

The problem with this dongle occurs only in macos. In linux I can transfer data to and from it without any problems.
I attached my ioreg and EFI/OC files. Any help would be very much appreciated

Hi there.

@Edhawk just posted before me and I can see the same ...

Another thing I found "odd" was in USBPorts.kext. SS01 - the port with the Realtek adapter in it - is defined as a plain old UsbConnector type 0x3 (USB-A USB3 etc) and type 0x9 (USB-C) in two places within. I admit I haven't seen this before. The code shows two USB Intel controllers - one of which is the Thunderbolt function. But why designate two types of connector is new to me ... I'll have to do some research.

PS - I would also make sure you use the SSDT-EC* file that Hackintool, exports. I can see one is disabled but a point worth making.
 
Last edited:
I assume you have tried all three external Type-A USB3 ports on your laptop, do you see the same result with each port?
Yes, I tried all the ports with the same result.
Have you tried using a Type-c adapter and the Type-C port
Yes, this one I also tried. The same result
Does the NVME USB3 adapter have the option for adding external power,
No, it has just one usb type с socket
 
Another thing I found "odd" was in USBPorts.kext. SS01 - the port with the Realtek adapter in it - is defined as a plain old UsbConnector type 0x3 (USB-A USB3 etc) and type 0x9 (USB-C) in two places within
I have no idea why it looks like this. That's what hackintool produced. The dongle does nor work in either port, so I don't think this strange thing is the source of the problem. And beside usb2nvme everything works fine.
PS - I would also make sure you use the SSDT-EC* file that Hackintool, exports. I can see one is disabled but a point worth making.
I'll try with enabled ...EC.aml and post here how it goes, thou I in 1-st post of this thread is mentioned, that these are 2 different config options. I can use either USBPorts kext or .aml files. Is that wrong?
 
I can use either USBPorts kext or .aml files. Is that wrong?

No, that is okay. :thumbup:

It is probably not the source of your problem, and clearly because Linux works fine, it must be macOS.

You can change the power delivery with an SSDT, besides the one Hackintool exports. There's a guide here ...

Quite a learning curve, sadly. I think there is an easier way, but I will need to do some research first ...

Can you get USB power draw data for this port, from Linux when running?
 
Last edited:
Remove the USB-LG-Gram-17z990.kext from your /OC/Kexts folder, it just messes with your USBPorts.kext, even if it isn't enabled in the config.plist.

Change HS03 to connector type Type-C+SW (10) in the USBPorts.kext.

The rest of your USBPorts.kext looks fine.

Your /OC/Drivers folder looks like it contains a number of drivers copied over from a Clover setup. You are advised to remove most of these drivers:

Screenshot 2021-12-31 at 18.04.24.png

You only need these three remaining drivers:

Screenshot 2021-12-31 at 18.07.23.png

Why have you retained the Bootstrap folder in your new OC 0.7.5 config? This folder and the driver contained in it, were dropped when OC 0.6.6 was released.

Why is your DSDT.aml present in your /OC/ACPI folder? The OC guide clearly states not to have your DSDT.aml present in this folder, the recommendation is to use custom SSDT's. Has the DSDT.aml been patched? Do these DSDT patches conflict with any of the patches, kexts, SSDT's and other settings used by OpenCore?

Your config.plist contains a number of ACPI patches from Rehabman's Laptop Master Clover config.plist, for example the OSID to XSID patch and others. They should not be present in this format.

All of these ACPI patches are also missing two new entries required by OpenCore, Base & BaseSkip entries. Below is a comparison of the OSI_ to XOSI patch I use and the one in your config.

Screenshot 2021-12-31 at 18.16.50.png Your patch

Screenshot 2021-12-31 at 18.16.40.png Correct patch, with additional entries.

You have the SSDT-XOSI.aml shown as enabled in your config.plist, but it is not present in your /OC/ACPI folder!

WTF are you doing with your DeviceProperties Add section!! Have you again copied a load of information from a Clover config to your OC config?

Screenshot 2021-12-31 at 18.33.33.png DeviceProperties > Add section!

Your Kext entries are also not in the correct format, spot the difference:

Screenshot 2021-12-31 at 18.22.58.png

Screenshot 2021-12-31 at 18.23.13.png

Do you speak Russian?

Why have you included your Serial Number in the config.plist? I would recommend you generate a new SMBIOS for your system. I should remove the post containing the copy of your OC folder, but this config is so bad I wish someone else would use your setup!
 
Can you get USB power draw data for this port, from Linux when running?
The only relevant thing I can check in linux is declared power required for this device
Code:
lsusb -v|grep 'Bus\|MaxPower'
This command gives the same 896 ma, but this is not the real consumption, just a declaration.
 
The only relevant thing I can check in linux is declared power required for this device
Code:
lsusb -v|grep 'Bus\|MaxPower'
This command gives the same 896 ma, but this is not the real consumption, just a declaration.

Okay. :thumbup:

On a real Mac the USB3 ports would have the SS** designation and the Thunderbolt ports SSP*. Each Thunderbolt port would also be paired with an HS** port - as you would expect.

However the HS** ports would also be Type-C(Sw) to match the SSP* ports.

What we can see in your USBPorts.kext is that the Thunderbolt port is not named SSP1 but SS01 - which I think is wrong. Also that the matching HS** port is type 3 and not Type-C(Sw) as it should be.

From your description it sounds as though you get a certain amount of connectivity and then it suddenly disconnects. This could be caused by the port confusion, rather than the power-output as such.

EDIT:

Okay I have just done some checking and Hackintool correctly identifies the Thunderbolt ports and allocates them SSP* as expected. The matching HS** USB2 ports also have the correct/same UsbConnector type.

So I am unsure what has happened with your own configuration. We can see from the IOReg file that the 'errors' are in there too, so it is not Hackintool's fault.

Also, please read through @Edhawk 's reply above. He makes some great points. For example OC recommends you do not use DSDT.aml etc. All the things he mentions can affect your setup.

:)
 
Last edited:
Remove the USB-LG-Gram-17z990.kext from your /OC/Kexts folder, it just messes with your USBPorts.kext, even if it isn't enabled in the config.plist.

Change HS03 to connector type Type-C+SW (10) in the USBPorts.kext.

The rest of your USBPorts.kext looks fine.

Your /OC/Drivers folder looks like it contains a number of drivers copied over from a Clover setup. You are advised to remove most of these drivers:

View attachment 538171

You only need these three remaining drivers:

View attachment 538172

Why have you retained the Bootstrap folder in your new OC 0.7.5 config? This folder and the driver contained in it, were dropped when OC 0.6.6 was released.

Why is your DSDT.aml present in your /OC/ACPI folder? The OC guide clearly states not to have your DSDT.aml present in this folder, the recommendation is to use custom SSDT's. Has the DSDT.aml been patched? Do these DSDT patches conflict with any of the patches, kexts, SSDT's and other settings used by OpenCore?

Your config.plist contains a number of ACPI patches from Rehabman's Laptop Master Clover config.plist, for example the OSID to XSID patch and others. They should not be present in this format.

All of these ACPI patches are also missing two new entries required by OpenCore, Base & BaseSkip entries. Below is a comparison of the OSI_ to XOSI patch I use and the one in your config.

View attachment 538174 Your patch

View attachment 538173 Correct patch, with additional entries.

You have the SSDT-XOSI.aml shown as enabled in your config.plist, but it is not present in your /OC/ACPI folder!

WTF are you doing with your DeviceProperties Add section!! Have you again copied a load of information from a Clover config to your OC config?

View attachment 538178 DeviceProperties > Add section!

Your Kext entries are also not in the correct format, spot the difference:

View attachment 538175

View attachment 538176

Do you speak Russian?

Why have you included your Serial Number in the config.plist? I would recommend you generate a new SMBIOS for your system. I should remove the post containing the copy of your OC folder, but this config is so bad I wish someone else would use your setup!
I did every thing you pointed here, except SSDT-XOSI.aml I didn't find it enabled in my config.plist. Now everything is neat and tidy, however the problem still persists. I think that the power values defined in USBPorts do not reflect the real capability of the hubs. That might be one reason, another reason I can imagine is that max power of 896 ma declared by the dongle is not correct and it in fact requires more than that. Linux and windows know how to deal with that, but macos does not know what to do and this is the reason of dongle disconnects. I noticed one more thing. Sometimes after disconnect dongle reconnects automatically, but in this case it connects as usb2 device to HSxx port. In this case I can transfer data to/from it without problems, but on low speed.
 
What errors you have in mind?

I disabled dsdt.aml in config.plist. I lost access to my touchpad and battery indicator, however using remote desktop I can check the dongle. The problem is still there.
Happy New Year!

Okay, the errors are in labelling the thunderbolt ports as SS, as I explained. This will confuse macOS.

There are separate SSDTs you can use for touchpad and battery. Check out the work of our expert on laptops @Feartech -

https://www.tonymacx86.com/threads/guide-usb-power-property-injection-for-sierra-and-later.222266/

:)
 
Back
Top