Jump to content
Mieze

Tracing back the AMD GPU wakeup issue to its origin

367 posts in this topic

Recommended Posts

apple patches it in another way it no longer needs that just be happy it works

 

 

Sent from my iPhone using Tapatalk

i now enable rx580 with only whatevergreen which renames gpu device to GFX0

Share this post


Link to post
Share on other sites
Advertisement

i now enable rx580 with only whatevergreen which renames gpu device to GFX0

switch to a ssdt for that im sure someone can help you

 

 

Sent from my iPhone using Tapatalk

Share this post


Link to post
Share on other sites

switch to a ssdt for that im sure someone can help you

 

 

Sent from my iPhone using Tapatalk

 i find no problems to use whatevergreen... :D

Share this post


Link to post
Share on other sites

i find no problems to use whatevergreen... :D

we dont need weg anymore thats the whole point.... lol

 

 

Sent from my iPhone using Tapatalk

Share this post


Link to post
Share on other sites
On 10/23/2017 at 10:04 PM, Slice said:

@Mieze

It's fantastic work!

Confirm working with my Radeon 6450 in Sierra.

I just made this patch as SSDT

SSDT-AMD.aml.zip

 

My Asus P5Q-Pro MB doesn't have integrated GPU, I have a Radeon HD 6870. Clover inserts device GFX0 and Gibba FB at the device path as shown by ioreg.

 

Accordingly, I have modified the SSDT-AMD.aml as in the snippet below (best guess after gathering information from several related threads). After making this change I forced sleep from the Apple menu. The machine seemed to have gone to sleep but immediately woke up (which is likely a separate issue). Important thing is that the display came back up which suggested that SSDT seems to be working.

 

However, when the machine went to sleep on its own after 30mins of inactivity, it did not come back on. Fans etc were running, but no display. I hit some keys and plugged/unplugged a USB drive, but no response. Could not even ssh into the machine from another machine, so had to do a hard reboot.

 

My question is if my SSDT edit is correct, or should the device path be _SB_.PCI0.P0P2.PEGP, or something else? Any pointers no the machine being unresponsive after auto sleep are much appreciated!

 

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

    Scope (\_SB.PCI0.P0P2.GFX0)
    {
        OperationRegion (PCIB, PCI_Config, Zero, 0x0100)
        Field (PCIB, AnyAcc, NoLock, Preserve)
        {
            Offset (0x10), 
            BAR0,   32, 
            BAR1,   32, 
            BAR2,   64, 
            BAR4,   32, 
            BAR5,   32
        }

 

 

IOReg Gibba.png

Edited by firefox-bin

Share this post


Link to post
Share on other sites

@Mieze

Would you please provide instructions on how to dump BARS, the  GPUs control register space, and how to change them.

This is my problem:
 

https://www.insanelymac.com/forum/topic/334965-amd-firepro-w4100-high-cinebench-r15-opengl-if-first-run-under-windows/


I believe that your generic method would be helpful in resolving my problem. The intention is to compare the Gpu's registers (BARs etc) between a soft Windows reboot, and a cold High Sierra boot. Then to patch the DSDT.

I've read the thread and am surprised that no one has inquired about the tools that you have used.

Thank you.
 

Share this post


Link to post
Share on other sites

It may be different tools.

RW-Everything in Windows.

RadeonDump in macOS.

Or somehow ACPI debugging.

You also may write your own kext for macOS to dump PCI and MMIO registers into IOLog in macOS.

You may modify Clover sources to dump PCI and MMIO registers into boot.log before any OS.

Share this post


Link to post
Share on other sites

Thank you Slice.

I will examine RadeonDump; it's included in DarwinDumper.

I know that this is off-topic.

At the moment I am using Windows 10 as a glorified graphics microcode loader (GuC). Is there anyway to capture the microcode that is loaded by Windows for the AMD Firepro W4100; then use Clover or macOS to write the microcode to the W4100?

The loading of the microcode is the key to unlocking the full 3D performance of the W4100.

Share this post


Link to post
Share on other sites

Since I replaced my my R9 270X with an RX570 a half year ago, I noticed that this strange kernel message was showing up after wakeup from sleep:

kernel: AppleHDAHDMI_DPDriver::setPowerState(0xdf0b895bf4bcbbf9, 0 -> 1) timed out after 10134 ms
kernel: AppleHDAHDMI_DPDriver::setPowerState(0xdf0b895bf4bcbbf9, 0 -> 1) timed out after 10134 ms

Although it doesn't seem to do much harm to the system, DisplayPort audio used to work well anyway, I'm curious like all cats ;) and decided to investigate the issue. As I'm using system definition iMac18,3 it was the most obvious step to take a look at the IOReg dump of an original Apple machine of that type and compared it with mine. Checking device HDEF, I noticed that the iMac18,3 doesn't have the "hda-gfx" property on that device anymore but instead of it a "No-hda-gfx" property so that I decided to edit my HDEF's method _DSM in order to adopt this change and it made the error message after wakeup disappear.

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

                Return (Package (0x06)
                {
                    "No-hda-gfx", 
                    Buffer (0x08)
                    {
                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 
                    }, 

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

                    "PinConfigurations", 
                    Buffer (Zero) {}
                })
            }

Mieze

Edited by Mieze

Share this post


Link to post
Share on other sites
On 8/1/2018 at 10:10 AM, Slice said:

It may be different tools.

RW-Everything in Windows.

RadeonDump in macOS.

Or somehow ACPI debugging.

You also may write your own kext for macOS to dump PCI and MMIO registers into IOLog in macOS.

You may modify Clover sources to dump PCI and MMIO registers into boot.log before any OS.

I just saw your post and wanted to share this piece of code which I used to dump the GPU's register space in order to investigate the wakeup issue. It adds the dump as property GBUF to the GPU's IORegistry entry while the system is booting so that it my be retrieved using IORegistryExplorer later. Have fun!

                Device (PEGP)
                {
                    Name (_ADR, Zero)  // _ADR: Address
                    OperationRegion (PCIB, PCI_Config, Zero, 0x0100)
                    Field (PCIB, AnyAcc, NoLock, Preserve)
                    {
                        Offset (0x04), 
                        CMDR,   16, 
                        Offset (0x10), 
                        BAR0,   32, 
                        BAR1,   32, 
                        BAR2,   64
                    }

                    OperationRegion (GREG, SystemMemory, And (BAR2, 0xFFFFFFFFFFFFFFF0), 0x8000)
                    Field (GREG, AnyAcc, NoLock, Preserve)
                    {
                        Offset (0x681C), 
                        SBS0,   32
                    }

                    OperationRegion (GREF, SystemMemory, And (BAR2, 0xFFFFFFFFFFFFFFF0), 0x00010000)
                    Field (GREF, AnyAcc, NoLock, Preserve)
                    {
                        GSRC,   524288
                    }

                    Name (GBUF, Buffer (0x00010000) {})
                    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                    {
                        Store (Or (CMDR, 0x02), CMDR)
                        Sleep (One)
                        CopyObject (GSRC, GBUF)
                        Store (Package (0x02)
                            {
                                "GBUF", 
                                GBUF
                            }, Local0)
                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                        Return (Local0)
                    }
                }

Mieze

Share this post


Link to post
Share on other sites
On 11/13/2018 at 12:11 PM, Mieze said:

Since I replaced my my R9 270X with an RX570 a half year ago, I noticed that this strange kernel message was showing up after wakeup from sleep:


kernel: AppleHDAHDMI_DPDriver::setPowerState(0xdf0b895bf4bcbbf9, 0 -> 1) timed out after 10134 ms
kernel: AppleHDAHDMI_DPDriver::setPowerState(0xdf0b895bf4bcbbf9, 0 -> 1) timed out after 10134 ms

Although it doesn't seem to do much harm to the system, DisplayPort audio used to work well anyway, I'm curious like all cats ;) and decided to investigate the issue. As I'm using system definition iMac18,3 it was the most obvious step to take a look at the IOReg dump of an original Apple machine of that type and compared it with mine. Checking device HDEF, I noticed that the iMac18,3 doesn't have the "hda-gfx" property on that device anymore but instead of it a "No-hda-gfx" property so that I decided to edit my HDEF's method _DSM in order to adopt this change and it made the error message after wakeup disappear.


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

                Return (Package (0x06)
                {
                    "No-hda-gfx", 
                    Buffer (0x08)
                    {
                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 
                    }, 

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

                    "PinConfigurations", 
                    Buffer (Zero) {}
                })
            }

Mieze

It can be done by clover's config.plist Device->Properties

	<key>PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x1)</key>
	<dict>
		<key>No-hda-gfx</key>
		<data>
		b25ib2FyZC0xAA==
		</data>

Yes?

Share this post


Link to post
Share on other sites
6 hours ago, Slice said:

It can be done by clover's config.plist Device->Properties


	<key>PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x1)</key>
	<dict>
		<key>No-hda-fgx</key>
		<data>
		b25ib2FyZC0xAA==
		</data>

Yes?

 

Typo?   fgx   is  really    no-hda-gfx   ?

Share this post


Link to post
Share on other sites
2 hours ago, Gigamaxx said:

 

Typo?   fgx   is  really    no-hda-gfx   ?

Of course it's a typo and it should read "No-hda-gfx" but apart from that it can be injected in the same way as other properties.

 

Mieze

Share this post


Link to post
Share on other sites
1 hour ago, Mieze said:

Of course it's a typo and it should read "No-hda-gfx" but apart from that it can be injected in the same way as other properties.

 

Mieze

 

In case someone copies and pastes it.   

Share this post


Link to post
Share on other sites
7 hours ago, Slice said:

I edited my post. Sorry for misprint.

Otherwise data should have other value? Or no matter?

 

Sorry for pointing it out, thanks for correcting.  

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 karthiksh1989
      can somebody walkthrough with the mojave installation guide?
      i have a mac high sierra 13.6 version on my macbook pro and want to install mojave on my desktop
      Exact config is Gigabyte gaming wifi 7 motherboard amy ryzen 7 2nd gen 2700X processor Gigabyte G1 8GB grapgic card VEGA 64
      running 2 nvme Samsung 256gb cards and 1 intel 180gb ssd internal and 1tb WD HDD, with 64 GB 3200Mhz Ram
       
      https://wa.me/919611736534 (whatsapp)
    • By yehia2amer
      Problem:
      When I Attempt to wake my Machine from sleep, the screen stays black, although the computer is obviously awake !
      This Machine has a 1300W Power Supply So Sleep is Very Useful.
       
      I Tried:
      1) FIX_WAK and FixShutdown as per Clover Wiki.
      2) Although I am using "SAPPHIRE Radeon PULSE RX 580 8GB GDDR5", which Should be completely Supported by Mojave, I Also changed the Part Number to "113-4E353BU-O4E" as per this Guide: http://www.xlr8yourmac.com/archives/feb18/RadeonRX-580_MacPro.html. The GPU is working GREAT without even Clover Inject
      3) Tried to Run this command: disablehibernate.command.zip
      4) Tried darkwake=0 to 10
      5) Disabled wake on USB & Wake on LAN (BIOS)
       
      Logs:
      sudo pmset -g
      System-wide power settings: Currently in use: hibernatemode 0 disksleep 10 womp 0 networkoversleep 0 sleep 0 Sleep On Power Button 1 ttyskeepawake 1 hibernatefile /var/vm/sleepimage autorestart 0 gpuswitch 2 displaysleep 10 pmset -g assertions
      2019-02-19 18:51:04 +0200 Assertion status system-wide: BackgroundTask 1 ApplePushServiceTask 0 UserIsActive 1 PreventUserIdleDisplaySleep 0 PreventSystemSleep 0 ExternalMedia 1 PreventUserIdleSystemSleep 0 NetworkClientActive 0 Listed by owning process: pid 56(powerd): [0x0000001700088000] 00:13:44 ExternalMedia named: "com.apple.powermanagement.externalmediamounted" pid 100(hidd): [0x00000025000980a7] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4294968578.17" Timeout will fire in 600 secs Action=TimeoutActionRelease pid 200(mds_stores): [0x0000034e000b8279] 00:00:00 BackgroundTask named: "com.apple.metadata.mds_stores.power" Kernel Assertions: 0x4=USB id=502 level=255 0x4=USB mod=1/1/70, 2:00 AM description=com.apple.usb.externaldevice.1d130000 owner=USB Keyboard id=503 level=255 0x4=USB mod=1/1/70, 2:00 AM description=com.apple.usb.externaldevice.1d120000 owner=Lenovo Optical Mouse Idle sleep preventers: IODisplayWrangler  
      Specs:
      CPU: 2x Xeon E5-2680 v2 2.8GHz Ten Core Processors
      RAM: 128 GB 1333 MHz DDR3 ECC Memory
      GPU: SAPPHIRE Radeon PULSE RX 580 8GB GDDR5
      Chipset: Intel C602
      Audio: Realtek ALC3220 (ALC280) High Definition Audio
      SAS Drive Controllers (RAID): LSI 2308 SATA/SAS 6Gb/s controller with host based RAID 0, 1, 10 (4  
      Network Controller 1: Intel 82579 Gigabit Ethernet controller with Remote Wake UP, PXE and Jumbo frames support
      Network Controller 2: Intel Ethernet Controller I210 
      NEC USB3.0 xHCI Controller: Renesas Electronics uPD720201 & uPD720202
       
      for more info:
       
      Any Help will be appreciated, Thanks !
       
      Send me Yehias-Mac-Pro.zip
    • 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
    • By JhonneR
      Good morning, everyone, I'm sorry if I was wrong in choosing the topic but I need help.
      I have found it extremely difficult to mount a Hackintosh in my acer.
      Setup;
      I5 2430m 2.4 6GB RAM
      Mobo P5we0 - Intel intel Graphics 3000
      At the moment I have not found out what my audio codecs are.
      but I'll leave the link on the motherboard.
      however, my real problem is several.
      I have already used the itakos image, I have already used several images that could be installed normally and that after installing the image I do not have internet via cable or wireless.
      And another, I already looked in other forums and I know that I will be called a donkey in the logical question but I have not been able to install the [url=&quot;http://www.insanelymac.com/forum/topic/279450-why-insanelymac-does-not-support-tonymacx86/&quot;]#####[/url] or clover to start from the Hard Disk, so I do not know what to do.At the moment I still do not know if there has already been someone who has already installed the High Sierra or just the Sierra in this notebook model and obtained permanent success.
      If anyone can help me, I'll be grateful.
      Installations without success, but with the system already installed in ACER;
      SIERRA
      HIGH SIERRA
      MOJAVE
      All with the same symptom. Starting only by the bootable USB stick and without internet connection via cable and wireless.
      Appreciate ! Acer 5750 Official Page
×