ghost8282 Posted March 13, 2021 Share Posted March 13, 2021 (edited) Hi! I noticed something which seems wrong about the injection of usb power properties. I have the latest big sur at the time of writing and the latest opencore debug version (but I think this should not be too much important for the case). I have a fresco logic usb card passed through in a virtual qemu machine and other usb devices passed through on other ports from the host. Let's consider only the fresco logic card: I'm injecting with ssdt my SSDT-EC-USBX.aml: DefinitionBlock ("", "SSDT", 2, "ACDT", "SsdtEC", 0x00001000) { External (_SB_.PCI0, DeviceObj) Scope (\_SB) { Device (USBX) { Name (_ADR, Zero) // _ADR: Address Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method { If ((Arg2 == Zero)) { Return (Buffer (One) { 0x03 // . }) } Return (Package (0x08) { "kUSBSleepPowerSupply", 0x13EC, "kUSBSleepPortCurrentLimit", 0x0834, "kUSBWakePowerSupply", 0x13EC, "kUSBWakePortCurrentLimit", 0x0834 }) } Method (_STA, 0, NotSerialized) // _STA: Status { If (_OSI ("Darwin")) { Return (0x0F) } Else { Return (Zero) } } } } Scope (\_SB.PCI0) { Device (EC) { Name (_HID, "ACID0001") // _HID: Hardware ID Method (_STA, 0, NotSerialized) // _STA: Status { If (_OSI ("Darwin")) { Return (0x0F) } Else { Return (Zero) } } } } } EC device is injected properly: Spoiler I can see the usb properties injected in AppleUSBHostResources: Spoiler Now, if I look at the ioregistry tree for the fresco logic, first thing that doesn't looks good is kUSBSleepSupported=false: Spoiler Moreover the usb properties here don't look correct...: Spoiler Anybody knows what's wrong here? Thank you for your attention. EDIT: ok, I think I fixed the issue with an injector kext, including all controllers, now: Spoiler Attached also the injector kext for my Fresco only as an example. Hope is all good now.. USBPowerFresco.kext.zip Edited March 13, 2021 by ghost8282 Link to comment Share on other sites More sharing options...
deeveedee Posted March 14, 2021 Share Posted March 14, 2021 On 3/13/2021 at 5:08 AM, ghost8282 said: Hi! I noticed something which seems wrong about the injection of usb power properties. Not sure I understand the issue or whether there is still a problem to be solved, so I'll just comment and hope that this helps you: Based on my own experience, I determined that I only want to inject USB Power properties with a single method (USBX or USBPorts.kext). If I understand your config correctly, you are injecting USB Power properties in both your USBX and your USBPorts.kext. I'd recommend picking one method (i.e. if you are happy with your USBX, remove power properties from USBPowerFresco.kext/Contents/Info.plist). 2 Link to comment Share on other sites More sharing options...
ghost8282 Posted March 14, 2021 Author Share Posted March 14, 2021 (edited) 3 hours ago, tonyx86 said: Not sure I understand the issue or whether there is still a problem to be solved, so I'll just comment and hope that this helps you: Based on my own experience, I determined that I only want to inject USB Power properties with a single method (USBX or USBPorts.kext). If I understand your config correctly, you are injecting USB Power properties in both your USBX and your USBPorts.kext. I'd recommend picking one method (i.e. if you are happy with your USBX, remove power properties from USBPowerFresco.kext/Contents/Info.plist). Thanks @tonyx86 Yes, I'm currently injecting power properties with USBX and with the kext (note: the same values are applied, of course). If I inject the power properties only with USBX you can see from the pictures that these values do not "propagate" to the usb controllers (look at the picture under "Moreover the usb properties here don't look correct...:"). I didn't find any specific guidelines for usb power, most of the resources are for older mac os versions. For example, for USB power: 1- injecting a fake EC (as it's in my case) should be no more valid (however I'm keeping injecting it, not into _SB.PCI0 as it was written in my previous post, but into _SB.PCI0.ISA (ISA is the equivalent of LPCB)) 2- I keep injecting USBX with SSDT because a real Imac pro 1,1 contains USBX in its DSDT 3- in IOService I cannot see anymore, as it happened with older versions of mac os AppleBusPowerController, but I have AppleUSBHostResources in IOResources, populated with power values Then I noticed something wrong with power values under the usb controllers, like it happened here: https://github.com/corpnewt/USBMap/issues/20 and I started to inject power values with a kext injector. Since the values are the same (USBX and kext) there should be no issues..at least it's what vit9696 explains here: https://applelife.ru/threads/nastrojka-usb-v-10-11-i-novee.627190/page-18#post-550233 As far as I know, my config should be good now, but again I cannot find enough material to compare with for big sur. Edited March 14, 2021 by ghost8282 2 Link to comment Share on other sites More sharing options...
deeveedee Posted March 14, 2021 Share Posted March 14, 2021 (edited) @ghost8282 - I use only USBPorts.kext to inject USB Power Properties for my rig and USB is working well for me. I've seen differing opinions on the "correct" method. I read one thread where someone claimed that injecting USB Power Properties with USBPorts.kext was wrong (I don't agree). Anyway, I settled on a method that works for me (USBPorts.kext). After I generated USBPorts.kext with Hackintool, I modified the USBPower Properties in USBPorts.kext/Contents/Info.plist to match those of a real MacMini8,1 (the SMBIOS that I'm using). Interesting note: A real MacMini8,1 injects USBPower properties with Device (USBX). Device (USBX) from a real MacMini8,1 Spoiler Scope (_SB) { Method (_INI, 0, NotSerialized) // _INI: Initialize { PINI () } Device (USBX) { Name (_ADR, Zero) // _ADR: Address Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method { Local0 = Package (0x08) { "kUSBSleepPowerSupply", 0x0C80, "kUSBSleepPortCurrentLimit", 0x0834, "kUSBWakePowerSupply", 0x0C80, "kUSBWakePortCurrentLimit", 0x0834 } DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } } ... } [/CODE] Edited March 14, 2021 by tonyx86 2 Link to comment Share on other sites More sharing options...
Recommended Posts