Jump to content
Sign in to follow this  
Followers 0
rio2

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

7 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

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By h2onions
      Hey all,
       
      First Hackintosh that I think I have completed! I've been working on it on and off for a month, but just grinded it this past weekend. I just have a small QOL issue. I have posted in the r/Hackintosh reddit, but have not gotten a reply to this specific issue, but did for other issues I was having. I also posted at tonymacx86 and was getting replies for other issues I was having, but got banned because I said, "used VM, but didn't work" in my OP I think ...
       
      I followed a PC vanilla guide from r/Hackintosh that I found as I did not have an Apple system. One monitor connected to a GTX 1080, CPU: i7-8700, Coffee Lake. Motherboard is Alienware specific 0VDT73, with chipset Z370.
       
      The issue is every time High Sierra boots up and gets to the login screen, my keyboard and mouse do not work. I only have to reseat both and then they work the whole time until I restart. They are both plugged into USB2.0 ports. I do have Lilu, WhateverGreen, USBInjectAll, and VoodooPS2 installed in my /Library/Extensions folder using #####. Mouse and Keyboard work fine each time I boot to Clover (USB). Any ideas?
       
      Thank you!
      Working: NVIDIA using (One) DisplayPort, USB3.0 (rear), USB-C (rear), USB2.0 (rear), Audio, Ethernet
       
      EDIT: Did some more testing, and it looks like my Keyboard works fine after each reboot, the only issue is that my mouse has to continuously be reseated. Any ideas? Could it just be the mouse?It's an old Inland USB mouse: 337451
    • By STLVNUB
      No sense re-inventing the wheel.
       
    • By Utku
      Hi guys, I have a big problem for VT -x. I tried any things for example: dark=0 or already bios option is virtualization is enable. I don't understand this problem.
       
      Thanks guys!! And yes I have intel Q8400 quad core cpu, motherboard is Asus asus p5g41c-m lx.
       


    • By TheAngryYeti
      First, my build:
       
      Asus ROG Strix H370-I mobo
      i5 8400 cpu
      32gb ddr 4 2133
      1tb samsung evo 860 ssd
       
      Ive finally gotten to the point where the installation of HS loads to the language selection screen, but then i lose all usage of every USB port.
       
      Im at a loss of what to do from here.
       
      According to others, i have the proper files in the kexts/other folder as well as the drivers64UEFI folder.
       
      Does anyone have any suggestions as to what i can do? Im getting kinda desperate as ive been at it for a week now and this is as far as ive gotten.
       
      -Sin
       
       
    • By NoEnd
      Hi team,
       
      I have tried to update to security update 2019-001 multiple time with no luck, today I've booted the update with -verbose and attached videos shows the details.
       
      Appreciate your help
       
      Thanks
      Untitled.mov
×