Jump to content
About Just Joined group Read more... ×
Mieze

Tracing back the AMD GPU wakeup issue to its origin

365 posts in this topic

Recommended Posts

Advertisement

Thanks a lot. Now system setting display AMD RX 580 8GB. But power draw hasn´t changed.

 

Complete system idle:

88 watt with a NVIDIA 1060 = approx. 8 watt for the GPU

116 watt with RX 580 = approx. 36 watt (!) for the GPU

 

For graphics power management to work properly make sure you have selected a system definition which matches your hardware, checked that the GPUs have proper names in your DSDT and checked that platform power management (ASPM) in BIOS setup is enabled.

 

Mieze

Share this post


Link to post
Share on other sites

Hi Mieze,

 

thanks for your answer. Just I don´t know what exactly to do.

 

My system runs as Mac Pro 6.1 with perfect speedsteps.

I use the kext patch "Rename AMD R9 xxx to AMD RX 580", in system infomation the GPU appears as RX580

I switched ASPM in BIOS, but there is no "enabled" settings, just Auto or "L1", whatever that means. This brought down power consumption from 116 watt to 113 watt idle - not bad.

 

So what is the easiest way to make shure the GPU has a proper name in DSDT? I don´t use a DSDT file, just some SSDT, Pikes speedsteps, audio and nvme patch.

Do I need a DSDT file or is there a way in clover?

Share this post


Link to post
Share on other sites

So what is the easiest way to make shure the GPU has a proper name in DSDT? I don´t use a DSDT file, just some SSDT, Pikes speedsteps, audio and nvme patch.

Do I need a DSDT file or is there a way in clover?

The MacPro6,1 has two GPUs which have the names GFX1 and GFX2. Take a look at IORegistry in order to find out which names your GPUs are using. Basically you can patch your DSDT manually or try to use Clover's ability to apply custom DSDT patches (which might not be possible in some cases).

 

By the way, are you injecting a framebuffer personality? I'm asking because some of these also influence graphics power management by selecting special configuration parameters for the GPU.

 

Mieze

Share this post


Link to post
Share on other sites

Hi Mieze,

 

thanks for your efforts - but I already fail to find out whether it is GFX1 or GFX 2. No GFX ist to be found in IORegistryExplorer.

 

The other thing: I use RedeonDeinit, which is kind of black box. How to patch GFX number or/and framebuffer exactly, and does this work together with RadeonDeinit or do I have to use a different approach?

 

Specialists like you can´t surely imagine the absolute basics problems a dummy like me has. I poke around until the system runs sufficient, and then I´m going to use the system for work for 2 years without changing something.

Share this post


Link to post
Share on other sites

Hi Mieze,

 

thanks for your efforts - but I already fail to find out whether it is GFX1 or GFX 2. No GFX ist to be found in IORegistryExplorer.

 

The other thing: I use RedeonDeinit, which is kind of black box. How to patch GFX number or/and framebuffer exactly, and does this work together with RadeonDeinit or do I have to use a different approach?

 

Specialists like you can´t surely imagine the absolute basics problems a dummy like me has. I poke around until the system runs sufficient, and then I´m going to use the system for work for 2 years without changing something.

GFX isn't showing up in IOReg because you probably aren't renaming your PEGx to GFX in your SSDT or DSDT.

Share this post


Link to post
Share on other sites

The MacPro6,1 has two GPUs which have the names GFX1 and GFX2. 

Outstanding work.  Suggestion, edit Post #1 dsdt patch to Device (GFX0) replacing Device (PEGP).  

 

PEGP/AGPM - threshhold GPM:

post-618506-0-78000200-1511386836_thumb.png

 

GFX0/AGPM - p-state GPM (imac18,3)

post-618506-0-80026200-1511387324_thumb.png

 

Desktop/Skylake/Polaris: imac18,3/Mac-BE088AF8C5EB4FA2

 

Otherwise,  a dummy AMD AGPM kext can be injected by adding the GFX0 (or PEGP/PEG0/H000, etc.) property to any board-id:

post-618506-0-86831000-1511388572_thumb.png

Share this post


Link to post
Share on other sites

Can someone explain to me why SSDT patching doesn't work unless you inject ATI using Clover?

Basically it boils down to the question: why do Apple's framebuffer drivers define dedicated framebuffer personalities although they are able to auto-generate a default personality for almost any graphics card we are using?

 

Well, I think that the answer is quite obvious. It's because the auto-generated connector data isn't meant to be a full replacement for a dedicated one but more as a fallback mechanism for situations in which a dedicated framebuffer personality for a certain graphics card is missing so that basic screen output can be provided even for unknown hardware. This is also the reason why auto-generated connector data is limited in functionality in a way that it doesn't support advanced feature like multi screen support, etc.

 

Mieze

Share this post


Link to post
Share on other sites

Basically it boils down to the question: why do Apple's framebuffer drivers define dedicated framebuffer personalities although they are able to auto-generate a default personality for almost any graphics card we are using?

 

Well, I think that the answer is quite obvious. It's because the auto-generated connector data isn't meant to be a full replacement for a dedicated one but more as a fallback mechanism for situations in which a dedicated framebuffer personality for a certain graphics card is missing so that basic screen output can be provided even for unknown hardware. This is also the reason why auto-generated connector data is limited in functionality in a way that it doesn't support advanced feature like multi screen support, etc.

 

Mieze

But I get multi-monitor perfectly fine with auto-generated connector data when I don't inject anything, still doesn't explain why SSDT/DSDT injection will only work when ATI injection is enabled only.

Share this post


Link to post
Share on other sites

But I get multi-monitor perfectly fine with auto-generated connector data when I don't inject anything, still doesn't explain why SSDT/DSDT injection will only work when ATI injection is enabled only.

Apple's algorithm for auto-generation of the connector data is defective. In case multi screen support is working for you, you might be one of the lucky few but this doesn't mean the the connector data is 100% correct. The hotplug id might be wrong causing display detection to fail after wakeup. There are several reports of limited functionality using the default framebuffer so that we must consider that as the normal state.

 

I only wonder if this is a driver bug or if Apple designed it that way intentionally?

 

Mieze

Share this post


Link to post
Share on other sites

Apple's algorithm for auto-generation of the connector data is defective. In case multi screen support is working for you, you might be one of the lucky few but this doesn't mean the the connector data is 100% correct. The hotplug id might be wrong causing display detection to fail after wakeup. There are several reports of limited functionality using the default framebuffer so that we must consider that as the normal state.

 

I only wonder if this is a driver bug or if Apple designed it that way intentionally?

 

Mieze

OK I can understand that, maybe I should re-phase the question then. What all info is needed in the SSDT/DSDT injected in order to not have to use Clover's ATI Inject enabled?

Share this post


Link to post
Share on other sites

Outstanding work.  Suggestion, edit Post #1 dsdt patch to Device (GFX0) replacing Device (PEGP).  

 

PEGP/AGPM - threshhold GPM:

attachicon.gifScreen Shot 2017-11-22 at 4.38.35 PM.png

 

GFX0/AGPM - p-state GPM (imac18,3)

attachicon.gifScreen Shot 2017-11-22 at 4.47.34 PM.png

 

Desktop/Skylake/Polaris: imac18,3/Mac-BE088AF8C5EB4FA2

 

Otherwise,  a dummy AMD AGPM kext can be injected by adding the GFX0 (or PEGP/PEG0/H000, etc.) property to any board-id:

attachicon.gifScreen Shot 2017-11-22 at 5.08.27 PM.png

Sir Ive Injected AGPM For my AMD Radeon HD 7650M via FakeSMC.

 

Sir I've used MBP 9,2 Board id for CPU and MBP 8,3 board id for  GPU PM, sir is it good way for getting PM !

 

Sir I've tried everything to get  AMD Radeon HD 7650M on 10.13.1 but no luck :(

sir can u guide me!

 

Want for u reply !

post-941217-0-68053400-1511426363_thumb.png

post-941217-0-32590900-1511426378_thumb.png

post-941217-0-30904500-1511426684_thumb.png

Share this post


Link to post
Share on other sites

OK I can understand that, maybe I should re-phase the question then. What all info is needed in the SSDT/DSDT injected in order to not have to use Clover's ATI Inject enabled?

Did you make  it as Device Properties injection or also DSDT Fix? Second place can explain why SSDT injection has or not has effect.

 

But I see something strange. If I set RadeonDeInit and inject Arbitrary properties then drivers ignore these properties, i.e. I can't inject model name.

It is very strange because I see the properties present in DeviceTree/Platform.

May be boot.efi thinks that the card is absent?

Share this post


Link to post
Share on other sites

Apple's algorithm for auto-generation of the connector data is defective. In case multi screen support is working for you, you might be one of the lucky few but this doesn't mean the the connector data is 100% correct. The hotplug id might be wrong causing display detection to fail after wakeup. There are several reports of limited functionality using the default framebuffer so that we must consider that as the normal state.

 

I only wonder if this is a driver bug or if Apple designed it that way intentionally?

 

Mieze

There are number of cards where connector data in video bios does not correlate with hardware. IMHO, apple software just fails there as result.

Share this post


Link to post
Share on other sites

Did you make  it as Device Properties injection or also DSDT Fix? Second place can explain why SSDT injection has or not has effect.

 

But I see something strange. If I set RadeonDeInit and inject Arbitrary properties then drivers ignore these properties, i.e. I can't inject model name.

It is very strange because I see the properties present in DeviceTree/Platform.

May be boot.efi thinks that the card is absent?

I think I injected as Device Properties, take a look.

SSDT-RX-480.aml.zip

Share this post


Link to post
Share on other sites

I've been trying to get my ASUS RX560 to work without Whatevergreen as per this thread but I'm not having luck.

 

Using:

GA-Z270-HD3, i7-7700k

 

On 10.13.1 using iMac18,3 with Clover 4297.

 

I tried RadeonDeInit with no whateverGreen. Black screen at login

 

Without RadeonDeInit I tried this SSDT patch... Black screen at login

DefinitionBlock ("", "SSDT", 2, "Apple", "Radeon", 0x00001000)
{
    External (_SB_.PCI0.GFX0.PEGP, DeviceObj)    // (from opcode)

    Scope (\_SB.PCI0.GFX0.PEGP)
    {
        OperationRegion (PCIB, PCI_Config, Zero, 0x0100)
        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)
        }
    }
}

I have these graphics related DSDT patches in my config file:

				<dict>
					<key>Comment</key>
					<string>Intel GPU PM. Rename GFX0 to IGPU</string>
					<key>Disabled</key>
					<false/>
					<key>Find</key>
					<data>
					R0ZYMA==
					</data>
					<key>Replace</key>
					<data>
					SUdQVQ==
					</data>
				</dict>
				<dict>
					<key>Comment</key>
					<string>Rename PEG0 to GFX0 (Graphics Card)</string>
					<key>Disabled</key>
					<false/>
					<key>Find</key>
					<data>
					UEVHMA==
					</data>
					<key>Replace</key>
					<data>
					R0ZYMA==
					</data>
				</dict>

Any suggestions? I'm attaching my F4 origin SSDT files and my ioreg (butting with Whatevergreen).

Thanks.

origin.zip

iMac.ioreg.zip

Share this post


Link to post
Share on other sites

I've been trying to get my ASUS RX560 to work without Whatevergreen as per this thread but I'm not having luck.

 

Using:

GA-Z270-HD3, i7-7700k

 

On 10.13.1 using iMac18,3 with Clover 4297.

 

I tried RadeonDeInit with no whateverGreen. Black screen at login

 

Without RadeonDeInit I tried this SSDT patch... Black screen at login

DefinitionBlock ("", "SSDT", 2, "Apple", "Radeon", 0x00001000)
{
    External (_SB_.PCI0.GFX0.PEGP, DeviceObj)    // (from opcode)

    Scope (\_SB.PCI0.GFX0.PEGP)
    {
        OperationRegion (PCIB, PCI_Config, Zero, 0x0100)
        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)
        }
    }
}

I have these graphics related DSDT patches in my config file:

				<dict>
					<key>Comment</key>
					<string>Intel GPU PM. Rename GFX0 to IGPU</string>
					<key>Disabled</key>
					<false/>
					<key>Find</key>
					<data>
					R0ZYMA==
					</data>
					<key>Replace</key>
					<data>
					SUdQVQ==
					</data>
				</dict>
				<dict>
					<key>Comment</key>
					<string>Rename PEG0 to GFX0 (Graphics Card)</string>
					<key>Disabled</key>
					<false/>
					<key>Find</key>
					<data>
					UEVHMA==
					</data>
					<key>Replace</key>
					<data>
					R0ZYMA==
					</data>
				</dict>

Any suggestions?

Thanks.

External (_SB_.PCI0.GFX0.PEGP, DeviceObj)

Should be 

External (_SB_.PCI0.PEG0.PEGP, DeviceObj)

or 

 External (_SB_.PCI0.PEG0.GFX0, DeviceObj)

You either use PEGP or GFX0 not both, if you are replacing PEGP with GFX0 in ACPI patching you don't want _SB_.PCI0.PEG0.GFX0 also in SSDT

Share this post


Link to post
Share on other sites

used MBP 9,2 Board id for CPU and MBP 8,3 board id for  GPU PM, sir is it good way for getting PM !

Not correct, MPB 8,3/HD 6xxxM, enables threshold GPM

Try MPB 11,5/R9 3xxM, enables pstate GPM

 

AMD HD 7xxx and newer use same APGM/.../GFX0 properties (ex, GFX1)

Edit: Except HD 7650M, actually 6xxx; credit: Slice/#249

Share this post


Link to post
Share on other sites
External (_SB_.PCI0.GFX0.PEGP, DeviceObj)

Should be 

External (_SB_.PCI0.PEG0.PEGP, DeviceObj)

or 

 External (_SB_.PCI0.PEG0.GFX0, DeviceObj)

You either use PEGP or GFX0 not both, if you are replacing PEGP with GFX0 in ACPI patching you don't want _SB_.PCI0.PEG0.GFX0 also in SSDT

 

 

Thanks for looking at this for me... I tried both approaches and in both cases black screen at boot.

 

Could I be missing something fundamental that is causing RadeonDeInit and even the SSDT method both fail? Like I said, WhateverGreen does work.

Share this post


Link to post
Share on other sites

Not correct, MPB 8,3/HD 6xxxM, enables threshold GPM

Try MPB 11,5/R9 3xxM, enables pstate GPM

 

AMD HD 7xxx and newer use same APGM/.../GFX0 properties (ex, GFX1)

Really 7650M is 6xxx family

{ 0x6841, CHIP_FAMILY_TURKS, "AMD Radeon HD 7650M Series",

Share this post


Link to post
Share on other sites

Really 7650M is 6xxx family

{ 0x6841, CHIP_FAMILY_TURKS, "AMD Radeon HD 7650M Series",

@slice @toleda sir,

 

i have this card AMD Radeon HD 7650M Series, how can i get it working in 10.13.1 natively  !

Share this post


Link to post
Share on other sites

Hi, can you please look at my attached ioreg screenshots and tell me if I set my radeon r9 290x GPU PM correctly. AGPM shows under ATY,AMD,RadeonFramebuffer@0 but my display is registered under ATY,AMD,RadeonFramebuffer@3. I have disabled IGPU in BIOS, set ASPM for PEG only and didn't use framebuffer injection or patching since i'm using only one LCD. Sorry if this is too much OT and thanks to all the developers for their priceless work

post-598874-0-32279700-1511573967_thumb.png

post-598874-0-33298000-1511574785_thumb.png

Share this post


Link to post
Share on other sites

Hi, can you please look at my attached ioreg screenshots and tell me if I set my radeon r9 290x GPU PM correctly. AGPM shows under ATY,AMD,RadeonFramebuffer@0 but my display is registered under ATY,AMD,RadeonFramebuffer@3. I have disabled IGPU in BIOS, set ASPM for PEG only and didn't use framebuffer injection or patching since i'm using only one LCD. Sorry if this is too much OT and thanks to all the developers for their priceless work

Yes AGPM will show up under the first ATY

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

Announcements

  • Similar Content

    • By kokozaurs
      Hi all,
       
      I'm using ESXI 7.0b (did use 6.7 to try but with no difference).
       
      Right now on Catalina but I can't seem to try to get GPU (RX580) working properly.
       
      I pass it through to the VM(tried with windows before with no problems) and it appeared just as pci-device with no name.
       
      After that, I've applied whatevergreen + lilu kexts and it does properly recognize it under system report however that's all there is. It's listed at GFX0. See attached images.
       
      No hardware acceleration. Monitor also not turning on using either DP/HDMI. 
       
      Since it is being passed through to the VM, it seems that the problem is not on ESXi side but on macOS side. 
       
      Has anyone has been able to pass through an AMD GPU to ESXI VM? Can anyone suggest some pointers as to where I could find some solutions to this problem?
       
      Thanks! 
       
       



    • By b2550
      Currently my install is 100% working except that so far I have only been able to get one of my 1080p monitors working with a MiniDP to HDMI cable. I currently am getting a second MiniDP to HDMI cable but for now I am stuck with a DVI to HDMI cable.

      The monitor that is working is plugged in via the MiniDP to HDMI. The monitor that isn't working is using the DVI cable. However I also tried switching it to HDMI to HDMI which had the same result. The monitor wakes up but it's black. However for whatever reason, both monitors are still recognized in system preferences and hackintool.

      I know all my cables are good and work because I updated from an install of El Capitan (which I still have on it's original SSD just in case this install fails) as well as a Windows install. Both monitors worked fine on El Capitan for literally years. El Capitan is just too old now and I need to update to keep up with software updates.

      Problem reporting files should provide needed info about how I've configured this install. Build is in my signature.
      debug_22725.zip
    • By autantpourmoi
      I'm an happy user of a x99 built hackintosch since 6/7 years using it mainly for photoshop and fcpx ... Using new camera with better resolution and video in ProResRaw , my built start to struggle a bit 
      I'm thinking of making a new built and seeking for advices for this new built that I want evolutive and last at least as long as my previous built 
      I'll use a SSD M2 forth Generation so I need at least 2 to 3 SSD M2 PCI x4 slots
      then which proc to use , I was thinking about the AMD Ryzen 9 3900xt or the Intel I9 10900k ( don't have the money for AMD threadripper ) if you have better idea I'm really open to it as long as you explain it to me 
      then which chipset should I use:
      for Intel  , should I go to Z490 or X299 or W480
      For AMD , I think I have only the choice of X570
      I always used Gigabyte motherboard so it will be naturally my first choice but again I'm open to any suggestion
      I need at least usb 3,1 Gen 2 and TB3 is not necessary but an option and can be add later on with a PCI Card I think
      So I'll be pleased o read your opinion and the choices that you'll do for the purpose of this built 
      thanks in advance 
       
       
    • By asheenlevrai
      Hi
       
      I recently built my 1st ryzentosh.
      I also used Opencore (0.6.1) for the 1st time and followed the install guides on Dortania.
       
      Now I need to map my USB ports and apparently it's not achieved the same way on AMD platforms compared to what I was "used to" on Intel platforms.
       
      The guide on Dortania is a bit confusing to me since there is information that is not clearly labelled as "for Intel" or "for AMD" and I thus don't understand very well what I should and shouldn't do.
       
      Can anyone give me advice or point towards as comprehensive tutorial intended for AMD-based builds.
       
      Thank you very much in advance for your help.
       
      Best,
      -a-
×