Jump to content
10 posts in this topic

Recommended Posts

I recently installed High Sierra on my Ryzen system, just to find out how crappy the USB situation really is on AMD systems. The only choice is basically most of your ports flat out not working or GenericUSBXHCI crashing every time you pull out a thumbdrive. So after some trial and error here are my findings.

The USB ports controlled by the XHCI controller on the SoC worked fine, but the ones attached to the chipset XHCI controller didn't.

That's when I looked at the log and saw these lines:

PTXH@00000000: AppleUSBXHCIPCI::createPorts: port 1 unsupported protocol USB  03.10
PTXH@00000000: AppleUSBXHCIPCI::createPorts: failed to allocate port 1

It turns out that for some reason the AppleXHCIPCI driver doesn't support the first two ports on the B350 chipset (made by ASMedia) USB controller. And after the driver fails to allocate port 1 it just stops and doesn't even look at the rest of the ports. So I first tried commenting out the first two ports from the DSDT and that worked and made all the other ports show app in the IOService tree. Than I quickly tested all the USB ports and it turns out that the 2 problematic ports aren't even wired to anything. But instead of editing the DSDT I wanted a cleaner solution, because I don't want to re-edit my DSDT every time I update the BIOS or change some BIOS settings.

 

So here is my small SSDT that disables the stock PTXH device and adds a new device XHCI, that has all the ports needed for my board (ASUS PRIME B350-PLUS).

DefinitionBlock ("SSDT-PRIME-B350-PLUS.aml", "SSDT", 1, "APPLE", "tinySSDT", 0x00000006)
{
    External (\_SB_.PCI0.GPP2, DeviceObj)
    External (\_SB_.PCI0.GPP2.PTXH, DeviceObj)

    Scope (\_SB_.PCI0.GPP2.PTXH)
    {
        Name (_STA, Zero)
    }

    Scope (\_SB_.PCI0.GPP2)
    {
        Device (XHCI)
        {
            Name (_ADR, Zero)
            
            Device (RHUB)
            {
                Name (_ADR, Zero)
                
                // USB3.1 back panel
                Device (PRT1)
                {
                    Name (_ADR, 0x5)
                            
                    Name (_UPC, Package (0x04)
                    {
                        0xFF, 
                        0x03, 
                        Zero, 
                        Zero
                    })
                }
                Device (PRT2)
                {
                    Name (_ADR, 0x6)
                            
                    Name (_UPC, Package (0x04)
                    {
                        0xFF, 
                        0x03, 
                        Zero, 
                        Zero
                    })
                }
                
                // USB3.0 front panel
                Device (PRT3)
                {
                    Name (_ADR, 0x7)
                            
                    Name (_UPC, Package (0x04)
                    {
                        0xFF, 
                        0x03, 
                        Zero, 
                        Zero
                    })
                }
                Device (PRT4)
                {
                    Name (_ADR, 0x8)
                            
                    Name (_UPC, Package (0x04)
                    {
                        0xFF, 
                        0x03, 
                        Zero, 
                        Zero
                    })
                }
                
                // USB2.0
                Device (PRT5)
                {
                    Name (_ADR, 0x9)
                            
                    Name (_UPC, Package (0x04)
                    {
                        0xFF, 
                        Zero, 
                        Zero, 
                        Zero
                    })
                }
                Device (PRT6)
                {
                    Name (_ADR, 0xa)
                            
                    Name (_UPC, Package (0x04)
                    {
                        0xFF, 
                        Zero, 
                        Zero, 
                        Zero
                    })
                }
                Device (PRT7)
                {
                    Name (_ADR, 0xb)
                            
                    Name (_UPC, Package (0x04)
                    {
                        0xFF, 
                        Zero, 
                        Zero, 
                        Zero
                    })
                }
                Device (PRT8)
                {
                    Name (_ADR, 0xc)
                            
                    Name (_UPC, Package (0x04)
                    {
                        0xFF, 
                        Zero, 
                        Zero, 
                        Zero
                    })
                }
                Device (PRT9)
                {
                    Name (_ADR, 0xd)
                            
                    Name (_UPC, Package (0x04)
                    {
                        0xFF, 
                        Zero, 
                        Zero, 
                        Zero
                    })
                }
                Device (PRTA)
                {
                    Name (_ADR, 0xe)
                            
                    Name (_UPC, Package (0x04)
                    {
                        0xFF, 
                        Zero, 
                        Zero, 
                        Zero
                    })
                }
            }    

        }
    }
}

Please note that this is just an example and it most likely needs to be changed for your board.

Edited by rio2
Added board name
  • Like 2

Nice work. Could you help me test this on my board. It's the Gigabyte AB350-Gaming 3. Attached is the IOReg with GenericUSBXHCI injected.

 

https://www.dropbox.com/s/7778f7h93xz4n2w/Shaneee’s Mac Pro.ioreg.zip?dl=0 

 

Edit: got it working by changing GPP2 to GPP1. USB ports don't show in System Profiler till something is plugged in and USB 3.0 speed isn't what it should be. This is a 3.0 device in a 3.0 port,

 

Ultra:

  Product ID:	0x5581
  Vendor ID:	0x0781  (SanDisk Corporation)
  Version:	1.00
  Serial Number:	4C531001600421108303
  Speed:	Up to 480 Mb/sec
  Manufacturer:	SanDisk
  Location ID:	0x00200000 / 2
  Current Available (mA):	500
  Current Required (mA):	Unknown (Device has not been configured)
  Capacity:	62.11 GB (62,109,253,632 bytes)
  Removable Media:	Yes
  Detachable Drive:	Yes
  BSD Name:	disk5
  Built-In:	Yes
  Partition Map Type:	GPT (GUID Partition Table)
  Volumes:

 

On 5/30/2018 at 10:51 AM, Shaneee said:

Nice work. Could you help me test this on my board. It's the Gigabyte AB350-Gaming 3. Attached is the IOReg with GenericUSBXHCI injected.

 

https://www.dropbox.com/s/7778f7h93xz4n2w/Shaneee’s Mac Pro.ioreg.zip?dl=0 

 

Edit: got it working by changing GPP2 to GPP1. USB ports don't show in System Profiler till something is plugged in and USB 3.0 speed isn't what it should be. This is a 3.0 device in a 3.0 port,

 


Ultra:

  Product ID:	0x5581
  Vendor ID:	0x0781  (SanDisk Corporation)
  Version:	1.00
  Serial Number:	4C531001600421108303
  Speed:	Up to 480 Mb/sec
  Manufacturer:	SanDisk
  Location ID:	0x00200000 / 2
  Current Available (mA):	500
  Current Required (mA):	Unknown (Device has not been configured)
  Capacity:	62.11 GB (62,109,253,632 bytes)
  Removable Media:	Yes
  Detachable Drive:	Yes
  BSD Name:	disk5
  Built-In:	Yes
  Partition Map Type:	GPT (GUID Partition Table)
  Volumes:

I can't open your IOReg dump, please use IORegistryExplorer 2.1. But if all ports show up in IOReg and work without GenericUSBXHCI and/or injector kexts than it's working and yes I just found out about the speed issue yesterday, but I couldn't figure out what is cousing it yet. It's normal if the ports don't show in the system profiles if the root hub does show up.

IORegistryExplorer.app_2.1.zip

  • 4 months later...
On 5/31/2018 at 10:08 PM, Shaneee said:

My bad I normally just use IOJones but I know not everyone does,

 

 

Shaneee’s Mac Pro.ioreg.zip

Hi.. My usb devices only work if they are usb-drive, webcam, usb-sata for hdd, usb wi-fi, bluetooth etc. nothing works, but IORegistryExplorer has recognized these devices. Can you help me please .. ??

many thanks

Usb status.png

Edited by newer71
On 31/5/2018 at 12:37, rio2 said:

Ciao .. I miei dispositivi USB funzionano solo se sono usb-drive, webcam, usb-sata per hdd, usb wi-fi, bluetooth ecc. Non funziona nulla, ma IORegistryExplorer ha riconosciuto questi dispositivi. Mi potete aiutare per favore .. ??

grazie molto

Usb status.png

On 10/29/2018 at 3:24 PM, newer71 said:

Hi.. My usb devices only work if they are usb-drive, webcam, usb-sata for hdd, usb wi-fi, bluetooth etc. nothing works, but IORegistryExplorer has recognized these devices. Can you help me please .. ??

many thanks

 

 

See here, https://forum.amd-osx.com/viewtopic.php?f=24&t=4986

  • 6 months later...
  • 5 months later...

How to do this on a ryzen laptop, I don't see any PTXH in my dsdt? My usb camera is detected, but usb modem and tethering does not work when I use GenericXHCI kext, and I can't boot without it, though sometimes I can boot without it, and when that happens all usb devices show up in system info and work normally. But, the problem is there is that I haven't been able to find how I am able to boot sometimes without this kext.

On 10/28/2019 at 3:40 AM, arshavin69ru said:

How to do this on a ryzen laptop, I don't see any PTXH in my dsdt? My usb camera is detected, but usb modem and tethering does not work when I use GenericXHCI kext, and I can't boot without it, though sometimes I can boot without it, and when that happens all usb devices show up in system info and work normally. But, the problem is there is that I haven't been able to find how I am able to boot sometimes without this kext.

 

Would it benefit the community to have a DSDT dedicated thread?

×
×
  • Create New...