Jump to content
Mieze

Tracing back the AMD GPU wakeup issue to its origin

365 posts in this topic

Recommended Posts

Ive tried everything but no luck, Everyitme ATI is inject i get panic on 10.13.1, its working gr8 on 10.11.6.

N if i ignore ATI Inject, AMD6000 n AMD3000 controller load but no QE/CI.

 

1.FakeID

2.Mieze DSDT Patch

3.DeInit

4.AMD6000 Controller Patch

5.WhateverGreen 

6.replacing 4 kext as @slice said in one thread..

7.Directly patching Farmebuffer in AMD6000Controller 

 

m using AMDFrameBufferUtility App

 

The panic is regarding Legacy AMD ...

 

Share this post


Link to post
Share on other sites
Advertisement

Ive tried everything but no luck, Everyitme ATI is inject i get panic on 10.13.1, its working gr8 on 10.11.6.

N if i ignore ATI Inject, AMD6000 n AMD3000 controller load but no QE/CI.

 

1.FakeID

2.Mieze DSDT Patch

3.DeInit

4.AMD6000 Controller Patch

5.WhateverGreen 

6.replacing 4 kext as @slice said in one thread..

7.Directly patching Farmebuffer in AMD6000Controller 

 

m using AMDFrameBufferUtility App

 

The panic is regarding Legacy AMD ...

 

Looks like system can not extract EDID of the monitor. You should help it, by injecting EDID.

Share this post


Link to post
Share on other sites

Ive tried everything but no luck, Everyitme ATI is inject i get panic on 10.13.1, its working gr8 on 10.11.6.

N if i ignore ATI Inject, AMD6000 n AMD3000 controller load but no QE/CI.

 

1.FakeID

2.Mieze DSDT Patch

3.DeInit

4.AMD6000 Controller Patch

5.WhateverGreen 

6.replacing 4 kext as @slice said in one thread..

7.Directly patching Farmebuffer in AMD6000Controller 

 

m using AMDFrameBufferUtility App

 

The panic is regarding Legacy AMD ...

 

 

 

 

Try this kext. AMDRadeonX4000HWServiceskext.  It had ID 0x66411002, edited to 0x68411002, also edited the 0x68401002.   This new metal2 for High Sierra has 3 device IDs required for the AMD graphics kext bundles.   

AMDRadeonX4000HWServices.kext.zip

Share this post


Link to post
Share on other sites

Hi,

 

finally everything is almost working! Multimonitor is working perfectly now for my XFX RX 580 8GB ... with DeInit in Clover (v.4297) and Mieze's code in form of SSDT! Thanks Mieze, Slice, CyberDevs and Von Morks!  :thumbsup_anim: 

 

 

The problem is audio HDMI ... for some strange reason is not working while it was with WhatEverGreen kext... anyone has any hint? 

SSDT_RX580_XFX.zip

Share this post


Link to post
Share on other sites

Hi,

 

finally everything is almost working! Multimonitor is working perfectly now for my XFX RX 580 8GB ... with DeInit in Clover (v.4297) and Mieze's code in form of SSDT! Thanks Mieze, Slice, CyberDevs and Von Morks!  :thumbsup_anim:

 

 

The problem is audio HDMI ... for some strange reason is not working while it was with WhatEverGreen kext... anyone has any hint? 

Which value does the "hda-gfx" property of device HDEF have?

 

Mieze

Share this post


Link to post
Share on other sites

Your video card connector is: 3DP+1HDMI+1DVI, Orinoco FB definition connector is 2DP+2HDMI+1DVI, can work properly? Sorry for my poor english.

yeah, I know. I'm trying also with Dayman FB... but no luck...

Share this post


Link to post
Share on other sites

@hackaro: It's "onboard-1" but it should be "onboard-2" in case you use "onboard-1" for device HDAU and the AMD GPU because this property links the graphics device to the audio device.

 

Mieze

Share this post


Link to post
Share on other sites

@hackaro: It's "onboard-1" but it should be "onboard-2" in case you use "onboard-1" for device HDAU and the AMD GPU because this property links the graphics device to the audio device.

 

Mieze

still not working even with "onboard-2" in SSDT... do you need some more files?

Another thing that I feel to point out is that no matter what FB you specify in the SSDT it seems to me that it loads the AMDframebuffer one. That's to say the generic one... that's leading to have only 2 DP ports working out of 3... I didn't test the HDMI yet, but I will soon with 3 monitors attached... 

https://www.dropbox.com/s/nluayy5qzvc27hg/Screenshot%202017-11-17%2003.07.15.png?dl=0

 

here is the generic FB... 

Share this post


Link to post
Share on other sites

still not working even with "onboard-2" in SSDT... do you need some more files?

Another thing that I feel to point out is that no matter what FB you specify in the SSDT it seems to me that it loads the AMDframebuffer one. That's to say the generic one... that's leading to have only 2 DP ports working out of 3... I didn't test the HDMI yet, but I will soon with 3 monitors attached... 

This indicates that there is a problem with the SSDT regarding the GPU. Take a look at device GFX0's method _DSM. The lines

                        If (LEqual (Arg2, Zero))
                        {
                            Return (Buffer (One)
                            {
                                 0x03                                           
                            })
                        }

are missing. Without them it won't work. I must have missed that at first glance.

 

Mieze

Share this post


Link to post
Share on other sites

This indicates that there is a problem with the SSDT regarding the GPU. Take a look at device GFX0's method _DSM. The lines

                        If (LEqual (Arg2, Zero))
                        {
                            Return (Buffer (One)
                            {
                                 0x03                                           
                            })
                        }

are missing. Without them it won't work. I must have missed that at first glance.

 

Mieze

hi, no need to use ssdt if adding Radeondeinit=true in config.plist. right?

Share this post


Link to post
Share on other sites

This indicates that there is a problem with the SSDT regarding the GPU. Take a look at device GFX0's method _DSM. The lines

                        If (LEqual (Arg2, Zero))
                        {
                            Return (Buffer (One)
                            {
                                 0x03                                           
                            })
                        }

are missing. Without them it won't work. I must have missed that at first glance.

 

Mieze

 

ok, I modified as follow:

/*
 * Intel ACPI Component Architecture
 * AML/ASL+ Disassembler version 20161210-64(RM)
 * Copyright (c) 2000 - 2016 Intel Corporation
 * 
 * Disassembling to non-symbolic legacy ASL operators
 *
 * Disassembly of iASLneKcV3.aml, Thu Nov  9 19:45:36 2017
 *
 * Original Table Header:
 *     Signature        "SSDT"
 *     Length           0x000026B7 (9911)
 *     Revision         0x02
 *     Checksum         0xD4
 *     OEM ID           "PegSsd"
 *     OEM Table ID     "PegSsdt"
 *     OEM Revision     0x00001000 (4096)
 *     Compiler ID      "INTL"
 *     Compiler Version 0x20161210 (538317328)
 */
DefinitionBlock ("", "SSDT", 2, "PegSsd", "PegSsdt", 0x00001000)
{
    External (_SB_.GGOV, MethodObj)    // 1 Arguments (from opcode)
    External (_SB_.ISME, MethodObj)    // 1 Arguments (from opcode)
    External (_SB_.PCI0, DeviceObj)    // (from opcode)
    External (_SB_.PCI0.PEG0, DeviceObj)    // (from opcode)
    External (_SB_.PCI0.PEG0.PEGP, DeviceObj)    // (from opcode)
    External (_SB_.PCI0.PEG1, DeviceObj)    // (from opcode)
    External (_SB_.PCI0.PEG1.PEGP, DeviceObj)    // (from opcode)
    External (_SB_.PCI0.PEG2, DeviceObj)    // (from opcode)
    External (_SB_.PCI0.PEG2.PEGP, DeviceObj)    // (from opcode)
    External (_SB_.SGOV, MethodObj)    // 2 Arguments (from opcode)
    External (_SB_.SHPO, MethodObj)    // 2 Arguments (from opcode)
    External (GPRW, MethodObj)    // 2 Arguments (from opcode)

   If (CondRefOf (\_SB.PCI0.PEG0.PEGP))
    {
        Scope (\_SB.PCI0.PEG0.PEGP)
        {
            Device (AMD0)
            {
                Name (_ADR, 0x00080000)  // _ADR: Address
                Device (GFX0)
                {
                    Name (_ADR, Zero)  // _ADR: Address
                    OperationRegion (PCIB, PCI_Config, Zero, 0x0100) // <--- from here...
                    Field (PCIB, AnyAcc, NoLock, Preserve)
                    {
                        Offset (0x10), 
                        BAR0,   32, 
                        BAR1,   32, 
                        BAR2,   64, 
                        BAR4,   32, 
                        BAR5,   32
                    }

                    Method (_INI, 0, NotSerialized)  // _INI: Initialize
                    {
                        If (LEqual (BAR5, Zero))
                        {
                            Store (BAR2, Local0)
                        }
                        Else
                        {
                            Store (BAR5, Local0)
                        }

                        OperationRegion (GREG, SystemMemory, And (Local0, 0xFFFFFFFFFFFFFFF0), 0x8000)
                        Field (GREG, AnyAcc, NoLock, Preserve)
                        {
                            Offset (0x6800), 
                            GENA,   32, 
                            GCTL,   32, 
                            LTBC,   32, 
                            Offset (0x6810), 
                            PSBL,   32, 
                            SSBL,   32, 
                            PTCH,   32, 
                            PSBH,   32, 
                            SSBH,   32, 
                            Offset (0x6848), 
                            FCTL,   32, 
                            Offset (0x6EF8), 
                            MUMD,   32
                        }

                        Store (Zero, FCTL)
                        Store (Zero, PSBH)
                        Store (Zero, SSBH)
                        Store (Zero, LTBC)
                        Store (One, GENA)
                        Store (Zero, MUMD)
                    } // <--- to here is MIEZEs code to get it work w/o LILU and WhatEverGreen

                    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method  // <--- from here...
                    {
                        If (LEqual (Arg2, Zero))
                {
                    Return (Buffer (One)
                    {
                         0x03                                           
                    })
                }

                        Return (Package (0x14)
                {
                    "AAPL,slot-name", 
                    Buffer (0x07)
                    {
                        "Slot-1"
                    }, 

                    "@0,AAPL,boot-display", 
                    Buffer (One)
                    {
                         0x00                                           
                    }, 

                    "@0,name", 
                    Buffer (0x0C)
                    {
                        "ATY,Orinoco"
                    }, 

                    "@1,name", 
                    Buffer (0x0C)
                    {
                        "ATY,Orinoco"
                    }, 

                    "@2,name", 
                    Buffer (0x0C)
                    {
                        "ATY,Orinoco"
                    }, 

                    "@3,name", 
                    Buffer (0x0C)
                    {
                        "ATY,Orinoco"
                    }, 

                    "ATY,VendorID", 
                    Buffer (0x02)
                    {
                         0x02, 0x10                                     
                    }, 

                    "ATY,DeviceID", 
                    Buffer (0x02)
                    {
                         0xD7, 0x67                                     
                    }, 

                    "model", 
                    Buffer (0x12)
                    {
                        "AMD Radeon RX 580"
                    }, 

                    "hda-gfx", 
                    Buffer (0x0A)
                    {
                        "onboard-2"
                    }
                })
            }
        }

                Device (HDAU)
                {
                    Name (_ADR, One)  // _ADR: Address
                    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                    {
                        If (LEqual (Arg2, Zero))
                        {
                            Return (Buffer (One)
                            {
                                 0x03                                           
                            })
                        }

                        Return (Package (0x04)
                        {
                            "layout-id", 
                            Buffer (0x04)
                            {
                                 0x01, 0x00, 0x00, 0x00                         
                            }, 

                            "hda-gfx", 
                            Buffer (0x0A)
                            {
                                "onboard-2"
                            }
                        })
                    }
                }
            } // <--- to here your specific GFX-Card values to be used

            Method (DTGP, 5, NotSerialized)
            {
                If (LEqual (Arg0, ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d")))
                {
                    If (LEqual (Arg1, One))
                    {
                        If (LEqual (Arg2, Zero))
                        {
                            Store (Buffer (One)
                                {
                                     0x03                                           
                                }, Arg4)
                            Return (One)
                        }

                        If (LEqual (Arg2, One))
                        {
                            Return (One)
                        }
                    }
                }

                Store (Buffer (One)
                    {
                         0x00                                           
                    }, Arg4)
                Return (Zero)
            }

            Name (LTRE, Zero)
            OperationRegion (PCIS, PCI_Config, Zero, 0x0100)
            Field (PCIS, AnyAcc, NoLock, Preserve)
            {
                PVID,   16, 
                PDID,   16
            }

            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x69, 0x04))
            }
        }
    }
}

but still no success. No HDMI audio and generic FB...

Share this post


Link to post
Share on other sites

but still no success. No HDMI audio and generic FB...

Use Clover to inject the framebuffer. This is the easy way. First, get the correct framebuffer working and, after that, fix the audio.

 

Mieze

Share this post


Link to post
Share on other sites

Use Clover to inject the framebuffer. This is the easy way. First, get the correct framebuffer working and, after that, fix the audio.

 

Mieze

 

Not possible, because the "RadeonDeInit" flag implies you have the ATI inject not ticked, therefore Clover won't load any frame buffer no matter what you specify. 

Share this post


Link to post
Share on other sites

Not possible, because the "RadeonDeInit" flag implies you have the ATI inject not ticked, therefore Clover won't load any frame buffer no matter what you specify. 

You can use Clover to inject the framebuffer and use the DSDT-patch/SSDT to fix the wakeup issue. That's the method I'm using.

 

Mieze

Share this post


Link to post
Share on other sites

You can use Clover to inject the framebuffer and use the DSDT-patch/SSDT to fix the wakeup issue. That's the method I'm using.

 

Mieze

https://www.dropbox.com/s/1el03q5chp2bl16/Screenshot%202017-11-17%2003.43.05.png?dl=0

 

probably not working with all the configurations ... because now it loads the FB but it says RX480 when it's 580 and there is still no sound ... I guess this method needs more work... 

@Mieze

 

Making a summary:

 

  • method works in solving black screen and wake/sleep issues
  • method works (partially) in multi monitor configurations. 2 DP ports working out of 3, HDMI not tested yet.
  • method is not working in loading the chosen FB
  • method is not working in giving HDMI output

if you need more files or dumps for investigating, I'm available. Thank for all your efforts! 

 

 

goodnight   :)

Share this post


Link to post
Share on other sites

@mieze 

This is mr ROM can u patch it for me plzzzzz

AMD Radeon HD 7650M 

 

N were should i put ur DSDT patch, should i make a new SSDT on add in My Native DSDT !

Archive.zip

Share this post


Link to post
Share on other sites

Not possible, because the "RadeonDeInit" flag implies you have the ATI inject not ticked, therefore Clover won't load any frame buffer no matter what you specify. 

No, RadeonDeInit works regardless of other conditions. You may set or not ATI inject.

Share this post


Link to post
Share on other sites

No, RadeonDeInit works regardless of other conditions. You may set or not ATI inject.

I mean a different thing: is you don't set ATI injection Clover won't load any FB.

Share this post


Link to post
Share on other sites

I mean a different thing: is you don't set ATI injection Clover won't load any FB.

Just ATY,AMD,RadeonFramebuffer which works almost perfect.

Share this post


Link to post
Share on other sites

if we are now working on connectors the 290x could use the biggest fix only dual monitors at a time when it can do 4 monitors would be greatful to anyone who gets me 3 screens not even WEG could fix this issues

Share this post


Link to post
Share on other sites

@Mieze @vit9696

I'm following with a lot of interest this thread. Maybe this will sound a bit naive, but I wonder how come the wathevergreen.kext could make HDMI audio working and Mieze's method  in some cases (like the hackaro's one) not. Is something missing there?

Besides that, this is really something. Thank you guys!

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 t0mmenhansen
      I havent used my hackintosh in a while. I wanted to boot to my mac drive. This error comes up when i try to boot. Ive tryed using explorer++ and update the lilu kext and whatevergreen kext, no luck yet. Any ideas?
       
      9700k
      16GB corsair
      1080 nvidia card
      z370-f mobo
      mac drive is an SSD from kingston
      Display port outpoot
       
    • By Coddyx
      Hi,
       
      I followed the AMD OSX Vanilla Guide and managed to successfully build my first hackingtosh.
      Everything works great EXCEPT for my MSI - Radeon RX 580 8 GB GAMING X.
      I ran some benchmarks (and tried World of Warcraft) and I am getting ~50% of the performance I am usually getting in Windows 10.
      Unigine Heaven reports ~950 vs 1750 in Windows and World of Warcraft runs @ 30 fps lowest settings vs 60 fps ultra settings in Windows.
       
      Here are the kexts I am using:
      AppleALC Lilu NullCPUPowerManagement RealtekRTL811 VirtualSMC WhateverGreen  
      I should mention that this is an AMD hackingtosh running on Ryzen 5 1600 3.2 GHz 6-Core Processor.
       
      I read and I completely understand that I should not expect 100% performance. But I believe a 50% drop is out of the ordinary.
       
      If anyone has ideas on what I could try to up the performance it would be greatly appreciated.
       
      Thank you!
       
       
    • By fusion71au
      Clover r4961 ISO compiled with GCC and minimal config.plist compatible for use in VMWare Workstation.
       
      Tested with unlocked Workstation 15 running OSX 10.9 -->10.14 guest in Windows X64 host.
       
      Installation
      1. Download and unzip "EFI_Clover_r4961 for VMware.zip". Mount Clover-v2.4k-4961-X64.iso by double clicking on it.
      2. Mount your VM's EFI System Partition eg in terminal
      sudo diskutil mount disk0s1   3. Copy EFI folder from step 1 into the EFI partition
      4. Shutdown the VM, add bios.bootDelay = "3000" to your VM's vmx file
      5. Reboot your VM, press <F2> to access the VMware Boot Manager and add CLOVERX64.efi to the boot menu.
       
      Substitute your own unique and valid MLB and ROM variables in the /EFI/CLOVER/config.plist (Rt Variables section) to activate iMessage/Facetime on your VM.
×