question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IONameMatch wrong for AMD matisse chipset USB controller

See original GitHub issue

The name of the controller does not match the name of its container (not sure if that’s the correct term), so IONameMatch tries to insert ports (and also the power settings I included) at the wrong spot, and fails. A simple hack for my simple setup was to change the IONameMatch string to AppleUSBXHCIPCI from the name of the controller pci1022,149c. I’m sure you’ll know of a more elegant way to fix this in your script!

USBMap.kext (with above tweak already applied)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleGetInfoString</key>
	<string>v1.0</string>
	<key>CFBundleIdentifier</key>
	<string>com.corpnewt.USBMap</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>USBMap</string>
	<key>CFBundlePackageType</key>
	<string>KEXT</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1.0</string>
	<key>IOKitPersonalities</key>
	<dict>
		<key>iMacPro1,1-AppleUSBXHCIPCI</key>
		<dict>
			<key>CFBundleIdentifier</key>
			<string>com.apple.driver.AppleUSBMergeNub</string>
			<key>IOClass</key>
			<string>AppleUSBMergeNub</string>
			<key>IONameMatch</key>
			<string>AppleUSBXHCIPCI</string>
			<key>IOProviderClass</key>
			<string>AppleUSBXHCIPCI</string>
			<key>IOProviderMergeProperties</key>
			<dict>
				<key>kUSBMuxEnabled</key>
				<true/>
				<key>kUSBSleepPortCurrentLimit</key>
				<integer>2100</integer>
				<key>kUSBSleepPowerSupply</key>
				<integer>5100</integer>
				<key>kUSBWakePortCurrentLimit</key>
				<integer>2100</integer>
				<key>kUSBWakePowerSupply</key>
				<integer>5100</integer>
				<key>port-count</key>
				<data>CAAAAA==</data>
				<key>ports</key>
				<dict>
					<key>HS01</key>
					<dict>
						<key>Comment</key>
						<string>3HS</string>
						<key>UsbConnector</key>
						<integer>3</integer>
						<key>port</key>
						<data>AQAAAA==</data>
					</dict>
					<key>HS02</key>
					<dict>
						<key>Comment</key>
						<string>4HS</string>
						<key>UsbConnector</key>
						<integer>3</integer>
						<key>port</key>
						<data>AgAAAA==</data>
					</dict>
					<key>HS03</key>
					<dict>
						<key>Comment</key>
						<string>1HS</string>
						<key>UsbConnector</key>
						<integer>3</integer>
						<key>port</key>
						<data>AwAAAA==</data>
					</dict>
					<key>HS04</key>
					<dict>
						<key>Comment</key>
						<string>2HS</string>
						<key>UsbConnector</key>
						<integer>3</integer>
						<key>port</key>
						<data>BAAAAA==</data>
					</dict>
					<key>SS01</key>
					<dict>
						<key>Comment</key>
						<string>3SS</string>
						<key>UsbConnector</key>
						<integer>3</integer>
						<key>port</key>
						<data>BQAAAA==</data>
					</dict>
					<key>SS02</key>
					<dict>
						<key>Comment</key>
						<string>4SS</string>
						<key>UsbConnector</key>
						<integer>3</integer>
						<key>port</key>
						<data>BgAAAA==</data>
					</dict>
					<key>SS03</key>
					<dict>
						<key>Comment</key>
						<string>1SS</string>
						<key>UsbConnector</key>
						<integer>3</integer>
						<key>port</key>
						<data>BwAAAA==</data>
					</dict>
					<key>SS04</key>
					<dict>
						<key>Comment</key>
						<string>2SS</string>
						<key>UsbConnector</key>
						<integer>3</integer>
						<key>port</key>
						<data>CAAAAA==</data>
					</dict>
				</dict>
			</dict>
			<key>model</key>
			<string>iMacPro1,1</string>
		</dict>
	</dict>
	<key>OSBundleRequired</key>
	<string>Root</string>
</dict>
</plist>

screenshot (original as output by USBMap.py, with power settings added, without above tweak):

image

Before

image2 image

After

image image

Thanks for the great work!!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
corpnewtcommented, Dec 24, 2020

I recently migrated USBMap to leverage IOPathMatch over IONameMatch - which should hopefully alleviate some issues with more exotic setups. The commit that added that functionality is here - but I’ve added some other fixes and etc since.

-CorpNewt

1reaction
corpnewtcommented, Dec 24, 2020

The issue with using a generic class match for IONameMatch is that it will apply to all controllers with that name - which, in your example is fine, as you are using the same ports for both of the ASMedia controllers - but for those with different types and ports, it won’t work. I suppose the search shall continue for a more reliable way - however, the IOPathMatch works fine for my ASMedia controllers (of which I have two, with different numbers of ports and different types), so I’m inclined to continue toward a solution that works with them individually over a blanket solution. If you make any other headway on the topic, please update me, but for now I won’t use the class as the IONameMatch.

-CorpNewt

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Guide] 'Fixing' Windows 7 USB support on Matisse / Ryzen ...
Hosting the guide I made a while earlier here. My Ryzen 9 3900X works fine on Windows 7 in my old x370 board,...
Read more >
Zen 3 processors/chipsets have HUGE issues with USB ports
I recently built a new PC with a 5900x (B550 MB - Gigabyte Aorus Pro) and I started noticing very soon many issues...
Read more >
OpenCore on the Mac Pro | Page 248
IONameMatch wrong for AMD matisse chipset USB controller · Issue #20 · corpnewt/USBMap. The name of the controller does not match the name ......
Read more >
AMD Ryzen 3000 "Matisse" I/O Controller Die 12nm, Not ...
For me though 4 USB ports are enough. If there is a LAN and SATA contoller chip onboard, then there would be 2...
Read more >
List of AMD chipsets
Contents ; 2 Fusion controller hubs (FCH) ; 3 AM4 chipsets ; 4 TR4 chipsets ; 5 sTRX4 chipsets ; 6 sWRX8 chipsets...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found