Closed riley21 closed 5 years ago
The port type doesn't change during discovery, as the script just guesses which type it thinks it should be by the controller it's on. I may remove that output at some point as it can be confusing. The code where the type is checked is below:
# Find out which controller we're on
if pnum > xhc_start and pnum < eh2_start:
# XHC Controller
ct = "XHC"
port = pnum - xhc_start
ty = 3
elif pnum > eh2_start and pnum < eh1_start:
# EH02 Controller
ct = "EH02"
port = pnum - eh2_start
ty = 0
else:
# EH01 Controller
ct = "EH01"
port = pnum - eh1_start
ty = 0
As you can see, the script just checks the controller, and assigns a type of either 0 or 3 depending on whether it's EHCI or XHCI. I may see if there's a way that I can validate the type - but I don't know that it would show up in ioreg. In the meantime, I'll omit the type output during discovery to avoid confusion.
-CorpNewt
Having difficulty changing usb port type from 3 to 255 for my internal usb 2. I have a bluetooth pcie card plugged into one of the ports, so sleep doesn't work unless I unplug it or change the port type to 255.
I've built my plist and changed them to type 255: https://i.imgur.com/f7lveax.png
But after a reboot, I don't think the ports have been correctly changed, as sleep still doesn't work, and when I rediscover the ports it lists them as type 3: https://i.imgur.com/eLD1dCJ.png
Anything super obvious I'm missing?
Thanks again for an awesome script!
Copy of my plist: