Jump to content
rio2

[SSDT] [High Sierra] Native USB on Ryzen without GenericUSBXHCI or injector kexts

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

Share this post


Link to post
Share on other sites
Advertisement

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:

 

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By midi-sama
      After a long time of cooking this computer up with a lot of stuff, I'm finally releasing my guide for this P50 with OpenCore.
       
      Lenovo ThinkPad P50 macOS Install with OpenCore
       
      This thread may be used for questions/corrections/additions. Good Luck.
    • By Vyzantion
      I have just re-made the Catalina installer, with the updated OS. It could not install from it, like it could not copy. Then I have tried to reinstall Mojave, it worked pretty cleary last year the exact pen drive. It failed as well, saying something like: not package found, contact the system administrator. I was able to boot from USB pen drive Linux and install Windows from DVD. But no macOS from the pen drive, even from what worked fine before. I have reseted the BIOS several times, no succes. The first sign of something wrong was this: When I first tried to boot Catalina, it said something about BIOS (BIOS, not UEFI) reset and enter setup. I hapenned several times on my attempts. If something screwed in my hardware? The USB ports? The BIOS perhaps?
    • By kylon
      A big thanks to wegface for teaching me a lot of things.
       
       
      Tested on Catalina 10.15.4 and Clover EFI 5104 (Catalina Patcher)
       
      Not Working:
      - realtek sd card reader (pm me if you have a fix)
       
      Notes:
      **CPU patches are disabled, if you are using a locked BIOS you must enable them**
       
      Clover EFI:
      - Install it in UEFI Mode and change your hdd partition table to GPT.
      - You will be able to install ANY OS in EFI mode, even if this pc does not support EFI at all! (No guide available for this)
       
      You will need:
      My unlocked BIOS (OPTIONAL) (here) Latest Clover config from CCE Bank (here) (asus k53sj-kylon) Rehabman Voodoo PS2 Controller (here) acidanthera AppleALC (here) acidanthera Lilu (here) acidanthera VirtualSMC (here) acidanthera SMCBatteryManager (here) acidanthera SMCLightSensor (here) acidanthera WhateverGreen (here) Mieze Realtek RTL8111 (here)
    • By Rohan20
      Opencore is running really really slow on Catalina 10.15.4. So It was running perfectly before I put the ssdt-pnlf for enabling Brightness control. it is running really slow and I verified my config with the sanity checker and its all correct. can someone please help. I am attaching my oc folder.

       
      https://www.dropbox.com/s/drkek0eaz19ina5/OC.zip?dl=0
       
    • By RyzenDude
      Hi everyone,
      Today I finished my High Sierra install with OpenCore. I got everything up and running but I can't seem te get rid of this text on te boot screen while booting up. Does anyone have a solution to this?
      Thanks in advance!
      Hardware:
      CPU: Ryzen 5 1600
      GPU: GTX 980
      RAM: 16 GB DDR4 2666 MHz
      Motherboard: ASUS EX-A320M-GAMING
      Audio Codec: AppleALC
      Ethernet Card: Realtek RTL8111
      Bootloader: OpenCore 0.5.5

×