Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to find the corresponding values for "kUSBSleepPortCurrentLimit" and "kUSBWakePortCurrentLimit" in SSDT-EC-USBX #41

Closed
xuanhung1509 opened this issue Nov 23, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@xuanhung1509
Copy link

Hi, it seems interesting to me that your SSDT-EC-USBX discards 2 desktop properties in the USBX. However, comparing your two values of "kUSBSleepPortCurrentLimit" and "kUSBWakePortCurrentLimit" to the original code by acidanthera, they are different.

Your version:

Return (Package (0x04)
{
    "kUSBSleepPortCurrentLimit", 
    0x0BB8, 
    "kUSBWakePortCurrentLimit", 
    0x0BB8
})

acidanthera's version:

Return (Package (0x04)
{
    "kUSBSleepPortCurrentLimit",
    0x0834,
    "kUSBWakePortCurrentLimit",
    0x0834
})

I wonder how to get the appropriate values for those two keys. There's not much info on this topic. The only one I found seems to suggest I need an ioreg or an ACPI dump from the real mac model with the same SMBIOS version.

@xuanhung1509 xuanhung1509 added the bug Something isn't working label Nov 23, 2023
@dreamwhite
Copy link
Owner

Good morning and thank you so much for creating this issue. Actually, as far as I'm aware, the values proposed in my SSDT-EC-USBX under USBX device were calculated by the following:

  • the two discarded values (kUSBSleepPowerSupply and kUSBWakePowerSupply) were dropped for obvious reasons: it's a laptop, not a desktop
  • the other values instead, if you convert them from hex to dec return 3000 which is obviously an higher value rather than acidanthera's version. I don't know if that's the ampere or other things but as discussed many times in the forums, theoretically speaking you should adapt those values in a way that connecting an iPad won't lead to a USB Current Limit warning in macOS.

Hope I clarified your doubts

@xuanhung1509
Copy link
Author

Could you give me the link to the post discussing the two discarded values? I'm surprised that Dortania does not distinguish the SSDT between laptop and desktop or even mention this matter.

Regarding the two other values, are those only meaningful if I connect an iPad to the laptop (or is it irrelevant if I only use an iPhone or Android phone)?

@dreamwhite
Copy link
Owner

dreamwhite commented Nov 27, 2023

Could you give me the link to the post discussing the two discarded values? I'm surprised that Dortania does not distinguish the SSDT between laptop and desktop or even mention this matter.

I'm still looking for it. I think I have saved it somewhere. Will let you know

Regarding the two other values, are those only meaningful if I connect an iPad to the laptop (or is it irrelevant if I only use an iPhone or Android phone)?

As far as I'm aware it's meaningful if you connect an iPad. Still looking for documentation :/

UPDATE

I found this: acidanthera/bugtracker#1001 (comment)

Apparently you can test other devices also which have greater power consumption

@xuanhung1509
Copy link
Author

xuanhung1509 commented Nov 29, 2023

I tried loading two versions to see the differences. In IOReg, both cases only show kUSBSleepPortCurrentLimit and kUSBWakePortCurrentLimit.
Screen Shot 2023-11-29 at 11 54 38

It also seems like on MacbookPro, only the two properties are present. The MacbookPro14,3 in this example proves that (the same as the post you referred to).

Regarding the value, I started with 3000 and it's been working stable for days. Today, I switched to 2100 and it also seems to work fine. Actually, I don't see any different in About This Mac > System Report > USB. For example:

  • USB 3.0: Current available is 500mA, Current required is 296mA.
  • USB 2.0: Current available is 500mA, Current required is 200mA.
  • For Android phone: Current available is 900mA, Current required is 500mA.

It seems like with different devices, macOS will adjust Current available accordingly. (I don't own an iPhone so cannot test that tho)
I even tried with 800mA (0x0320), and the above results stay the same. However, I encountered sleep issue due to the improper USB power. So I will stick with either 2100 or 3000 for now.

Edit: add image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants