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 Tushark2
      Hello,
      1st my laptop spec. 
      CPU - 2.53 GHz Intel Core i3 380m
      RAM - 6 GB 1333 MHz DDR3
      GPU -  1st gen Intel HD Graphics 288 MB
      Laptop - Dell Vostro 3500 series
      BT/WIFI - AzureWave BCM94352HMB
       
      I installed Olarila Mojave 10.14.6 and managed to install 1st gen intel HD graphics but it was bit laggy bcos this gnu doest support metal and its a old machine, so I decided to move to Olarila High Sierra.
      I installed it with most of things working fine expect some issues, for that I want to make SSDT and DSDT to make it run without glitches.
       
      I am atteching my sendme.zip , can some take a look to my current settings and suggest me some changes  
      (Olarila down from few days for me )
       
      Send me MacBook-Pro.zip
    • By superdooper71
      Hi I wonder if you can help me out guys.
      I have few issues here
      • First
      when I boot the clover entry screen do not show the disk icons until i press enter
      (If I disconnect the keybord all is smooth, clover start, shows disk icons and boot from Mojave)
      • Second
      Randomly the keyboard and mouse become pretty unstable. The mouse cursor start flashing or the keyboard start to type repetedly <<<<<<<<<<< when i Press the spacebar or some other button
      (this behaviour is applied to all keyboard I have tried, actually 3 different ones)
      --------------------------------------------------------------------
      KB and Mouse are plugged on a USB 3.0 ports
      I have tried to reset the keyboard Pref but NO LUCK
      I have changed Keyboard - Same error
      --------------------------------------------------------------------
      I enclose IOREGregistry and config.plist
       
      MY CURRENT BUILD
      ASROCK Z270 PRO4
      i7 7700K
      32GB DDR4
      Gigabyte GTX 760
       
      I believe that there is some code conflict but I have no idea what is wrong
       
      Please HELP
      Cheers
      Franco
      config.plist
      iMac di imac27.ioreg.zip
    • By soumaxetuirk
      If you have a working Brightness Slider and you might be using Brightness slider or manual hotkeys to control brightness then this guide may help you to use your Native hotkeys of laptop.
       
      (All the Credits goes to @RehabMan     For OS-X-ACPI-Debug Kext and DSDT Patches.)
       
       
      This step assumes that you are using RehabMan's VoodooPS2Controller or Acidanthera's PS2Controller
      Install the kext: https://github.com/RehabMan/OS-X-ACPI-Debug Open MaciASL and click on patch.(Add rehab man repo) Apply "Add DSDT Debug Methods" and "Instrument EC Queries" that are under Brightness Fix. Save the DSDT and restart Look in Syslog as you press the key corresponding to brightness to determine which _QXX methods handle the keys (UPDATE: From Sierra Apple changed logging process. So you won't find ACPIdebug result using syslog command. Instead use following command )
      log show --last 5 | grep ACPIDebug 6. Then patch DSDT:
      into method label _Q1D replace_content begin // Brightness Down\n Notify(\_SB.PCI0.LPCB.PS2M, 0x0205)\n Notify(\_SB.PCI0.LPCB.PS2M, 0x0285)\n end; into method label _Q1C replace_content begin // Brightness Up\n Notify(\_SB.PCI0.LPCB.PS2M, 0x0206)\n Notify(\_SB.PCI0.LPCB.PS2M, 0x0286)\n end; Change the variable _Q1D/_Q1C as per the log. 

      7. Try compiling and check if it generates errors
      8. If it does, then change the PS2M to PS2X according to the one found in your DSDT
      9. Save and place the compiled DSDT.
      10. Now you should see that you have your corresponding keys to change your brightness 
       
       
       FOR  more detail and Queries,Check Out original Post of @RehabMan Here;
      http://www.insanelym...18#entry1997112
      Get Latest Version of  OS-X-ACPI-Debug kext here:
      https://bitbucket.org/RehabMan/os-x-acpi-debug/downloads
    • By kushwavez
      Hi!

      Could anyone help me installing High Sierra on this system?
      I succesfully installed Sierra before on this system with help of Jake Lo (thanks!!), I just wondering if could High sierra possible to installed on this system?
      Boot stopped at this. I'll attach my Clover folder and a picture from boot.
      UEFI enabled, and for skylake I used IntelGraphicsDVMTfixup and IntelGraphicsFixup kexts. My bios is very limited and does not have any option to change dvmt prealloc or anything else.
      Everything works fine on Sierra.
      Here is my system:
       
      THIS TOPIC IS OUTDATED AND WILL NO LONGER UPDATED.
      PLEASE GO TO THIS LINK FOR GUIDE & UPDATED FILES:
      https://osxlatitude.com/forums/topic/11355-acer-aspire-v-15-v5-591g-catalina-windows-10/
       


      Acer Aspire V15 V5-591G-55TU
       
      (Note: Bootpack works fine with another versions of 591G, for example: V5-591G-71K2, -764Z, -59PU, etc.)

      Mobo: Skylake USOPP_SLS
      Bios: Insyde corp latest version
      CPU: Intel Core i5-6300HQ 2.30 GHz (Skylake)
      GPU: Geforce GTX 950M 2 GB (optimus, disabled), Intel HD 530
      Ram: 8 GB DDR4 (4+4 GB)
      Wifi: Qualcomm Atheros QCNFA344A, Replaced to BCM94352Z
      Ethernet: Realtek 8168B/8111B
      Audio: ALC 255 (layout-3 fix)
      Card Reader: Realtek
      HDD: 1 TB
      Dual-boot with Windows 10

      Any help appreciated!

      UPDATE! (2017.10.30)
      UPDATE! (2017.11.09)
      UPDATE! (2018.02.01)

      Successfully installed High Sierra 10.13, 10.13.1, 10.13.3
      SEE THIS POST: #49 IF YOU THINK YOUR CPU IS HOT (60+°C) OR NOT GOING UNDER 1.3GHz FREQUENCY WHEN IDLE
      (Original OSXLatitude post link: https://osxlatitude.com/forums/topic/11355-acer-aspire-v-15-v5-591g-catalina-windows-10/)
      Working:
      Wi-Fi and Bluetooth with BCM94352z: (enabled with BrcmFirmwareRepo.kext, BrcmPatchRAM2, FakePCIID.kext, FakePCIID_Broadcom_WiFi.kext, install them with Kext Utility or another kext installer) (Original WiFi is Qualcomm Atheros, unsupported but BT works) Hand-off with BCM94352z Full Graphics enabled on HD 530, HDMI, VGA. ALC 255 Audio: (Internal Speakers, Internal Microphone, Headphone jack (microphone not tested) with layout-3 fix (you can use AppleHDAPatcher) Ethernet Realtek 8168B/8111B App Store, Messages, FaceTime, Siri, iCloud (native) Integrated webcam (native) 3.0 USB (native) Touchpad and Keyboard: Fn keys are good, the weird thing is the Brightness key. On my keyboard it's Pause Break:Br-up, Fn+F12:Br-dwn. (VoodoPS2Controller.kext) Battery info: Install ACPIBatteryManager.kext with kext utility or other installer. Sleep Mode: In High Sierra sleep mode not worked for me natively. Inject custom EDID to fix the blank screen after wake from sleep
      See here for instruction (thanks black.dragon74 and Jake Lo !!) Please add these 2 patches to ACPI\DSDT\Patches in your config.plist in order to avoid not responding applications after sleep: (added in "v5_591g_55tu_updated_CLOVER.zip") HECI to IMEI 48454349 494d4549 EC0 to EC 4543305f 45435f5f Before updating to a new version of High Sierra please update kexts to new versions to avoid kernel panics Note: No need for "IntelGraphicsDVMTFixup.kext" so you should delete it. Not working:
      Original Wi-Fi: Qualcomm Atheros QCNFA344A unsupported, you need switch to BCM94352Z or just use a mini usb wifi dongle. NVIDIA GTX 950M: Optimus not supported. Card Reader: Unsupported For WiFi:
      You can choose an external USB wifi dongle (I used tp-link Archer T1U (5GHz support), Tp-link have official macOS drivers, you just need to install it (OR)Replace your M.2 Qualcomm Card with a compatible BCM94352Z card (you will have hand-off Bluetooth too), just install the kext I wrote above I'll attach my EFI folder for anyone who want to install High Sierra (acer_aspire_v5_591g_55tu_hs.zip).
      *REUPLOADED updated CLOVER folder, attached as "v5_591g_55tu_updated_CLOVER.zip" (uploaded to OSXLatitude forum, can't upload here).
       
      I'm using High Sierra in Dual-boot with Windows 8.1. To do this in a clean install or with Windows installed first try my little minimal guide:
       
      Dual-boot clean install (on one drive):
      1. Boot into your Mac installer, Create 2 partitions in GUID table (1 for Win (I used FAT32 but I think it's no matter what), 1 for Mac), 
      2. Install Mac, boot with your USB, *mount your EFI partition (use terminal or an EFI mounter app), create an EFI folder, copy the CLOVER folder I attached to the EFI folder, restart,
      3. Boot into your Win installer, Format the partition you created for Win, install. 
      4. Now, it's automatically booting into Windows. To use Clover open cmd in administrator, type:
      bcdedit /set {bootmgr} path \EFI\CLOVER\CLOVERX64.efi 5. You're done! It will booting into Clover when you start the system, and you can select Win or Mac (or another OS if installed on a 3rd partition).
       
      Dual-boot with Windows installed first (on one drive):
      If you already have Windows and you don't want to lose all your data there is a hope:
      You need bootable Mac Installer and a full system restore image (you can search for it).
      (You may see errors if your EFI partition is not 200 MB)
      1. Boot into your Windows, resize your partition or create one for Mac.
      2. Boot into your Mac installer and in Disk Utility format the partition you created.
      3. Restore from image: select your full system restore image.
      4. When it's finished restoring you just need to restart, then boot to the system with your usb.
      5. Do Step 2. from "*" from clean install dual-boot above. but KEEP "Microsoft" FOLDER IN IT!
      6. Do Step 4. from clean install dual-boot above.
      7. You're done! You can select your old Windows and your new macOS!
      (I only tried with Windows 8/8.1/10. I don't know Windows 7,etc.)
       
      IF YOU GETTING ERRORS DURING MAC RESTORE:
      Make sure you have partitions in GPT The best version for restore method is Windows 8.1. It's using 200 MB EFI. Windows 10 using 100 MB EFI and will annoy the Mac restore. You can use with Windows 10, just ignore the errors IF YOU GETTING ERRORS DURING WINDOWS INSTALLATION (could not be formatted, etc):
      Make sure you have GPT partitions, and GPT installer IF YOU USED RESTORE METHOD THEN CAN'T MOUNT YOUR EFI PARTITION (No EFI partition found)
      It's because your EFI is not 200 MB or not an "Apple" original EFI,  but do not worry, try another EFI mounter, or mount from terminal (I used EFI mounter v3: Getting errors, but you can mount and use without problem) You also could "mount" the EFI from windows, for that open cmd and type: diskpart list vol (Now select the "System" volume,(FAT 32) For example I select 4) sel vol 4 list part (Select System type partition, for example 2) sel part 2 assign letter=b (This will "mount" your EFI partition, to manage files download totalcmd or explorer++ (run as admin)) remove letter=b (This will "unmount" your EFI) Here is a video from dual-boot with Windows installed first (on one drive):
      https://www.youtube.com/watch?v=0_Q8uPkwcWQ
      Here some pictures:




×