Jump to content
Mieze

Tracing back the AMD GPU wakeup issue to its origin

367 posts in this topic

Recommended Posts

Advertisement

Now all we need is a multi monitor fix for more then 2 monitors 

Share this post


Link to post
Share on other sites

awesome work.

Would this work for an RX 580 in an Egpu?

Yes, it should work with the Polaris GPUs too.

 

PS: It would be helpful if someone with a Polaris GPU could send me a dump of the GPU's PCI config space created with lspci (or RW-everything under Windows, etc.) so that I can verify the Base Address Register layout.

 

Mieze

Share this post


Link to post
Share on other sites

Yes, it should work with the Polaris GPUs too.

 

PS: It would be helpful if someone with a Polaris GPU could send me a dump of the GPU's PCI config space created with lspci (or RW-everything under Windows, etc.) so that I can verify the Base Address Register layout.

 

Mieze

Hello Mieze!

Good work you began!

This dump contains lspci dump and more for Polaris GPU   #35  

 

We have three issues with Radeon drivers in HackOS

1. Bad GPU registers initialisation. Hope you resolved this.

2. Bad connectors in PC Videocard compared to Apple's framebuffer. If we set Inject=NO then Apple's driver calculates connectors by itself. But not enough for multimonitors.

3. Bad AMDRadeonX4000GLDriver.bundle (not for Hack). It can't be patched by Clover because it is loaded from user space. I may propose to create better bundle with name like AMDRadeonX4001GLDriver.bundle and patch the name somewhere it used.

Share this post


Link to post
Share on other sites

Great work, Mieze

Thank you for sharing your findings

The patch works perfectly on Sapphire Radeon RX580 Nitro+!!

I don't even need to disable IGPU in BIOS, disabling CSM and setting the IGPU as a primary display is enough

The 4K screen is connected to the  Radeon card and I can boot with all debug messages shown on the screen+ Apple Logo  :hysterical:

I can go to sleep - and wake up. 

:thumbsup_anim:

Share this post


Link to post
Share on other sites

Yes, it should work with the Polaris GPUs too.

 

PS: It would be helpful if someone with a Polaris GPU could send me a dump of the GPU's PCI config space created with lspci (or RW-everything under Windows, etc.) so that I can verify the Base Address Register layout.

 

Mieze

Tell me how you do it and I can dump it for you on my MP5,1 with RX 480

Hope this helps

DarwinDumper_3.0.3_21.10_21.46.29_MacPro5,1_Apple_X64_Unknown_17A405_henrybrock.zip

Share this post


Link to post
Share on other sites

Tell me how you do it and I can dump it for you on my MP5,1 with RX 480

Hope this helps

Hello Pavo,

 

thank you for your friendly offer and the link but Slice already posted a link to this dump a few days ago.

 

Mieze

Share this post


Link to post
Share on other sites

I make little and cosmetic modification of your patch to add correct name, apply correct framebuffer and load custom rom. 

 

For rx 580

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

                    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                    {
                        Store (Package (0x1C)
                            {
                                "AAPL,slot-name", 
                                Buffer (0x07)
                                {
                                    "Slot-4"
                                }, 

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

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

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

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

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

                                "ATY,Card#", 
                                Buffer (0x0C)
                                {
                                    "113-4E3531U"
                                }, 

                                "ATY,Copyright", 
                                Buffer (0x33)
                                {
                                    "(C) 1988-2017, AMD Technologies Inc."
                                }, 

                                "ATY,Rom#", 
                                Buffer (0x1D)
                                {
                                    "GV-RX580GAMING-8GD/F10/058AE"
                                }, 

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

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

                                "device_type", 
                                Buffer (0x12)
                                {
                                    "ATY,OrinocoParent"
                                }, 

                                "model", 
                                Buffer (0x13)
                                {
                                    "RX 580 G1 GIGABYTE"
                                }, 

                                "hda-gfx", 
                                Buffer (0x0A)
                                {
                                    "onboard-1"
                                }
                            }, Local0)
                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                        Return (Local0)
                    }

                    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)
                    }
                }

                Device (HDAU)
                {
                    Name (_ADR, One)  // _ADR: Address
                    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                    {
                        Store (Package (0x02)
                            {
                                "hda-gfx", 
                                Buffer (0x0A)
                                {
                                    "onboard-1"
                                }
                            }, Local0)
                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                        Return (Local0)
                    }
                }

for r9 290x

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

                    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                    {
                        Store (Package (0x1A)
                            {
                                "AAPL,slot-name", 
                                Buffer (0x07)
                                {
                                    "Slot-1"
                                }, 

                                "@0,name", 
                                Buffer (0x0B)
                                {
                                    "ATY,Baladi"
                                }, 

                                "@1,name", 
                                Buffer (0x0B)
                                {
                                    "ATY,Baladi"
                                }, 

                                "@2,name", 
                                Buffer (0x0B)
                                {
                                    "ATY,Baladi"
                                }, 

                                "@3,name", 
                                Buffer (0x0B)
                                {
                                    "ATY,Baladi"
                                }, 

                                "ATY,Card#", 
                                Buffer (0x11)
                                {
                                    "113-C6710101-100"
                                }, 

                                "ATY,Copyright", 
                                Buffer (0x25)
                                {
                                    "(C) 1988-2017, AMD Technologies Inc."
                                }, 

                                "ATY,Rom#", 
                                Buffer (0x36)
                                {
                                    "C67101 HAWAII XT A0 GDDR5 4GB 64MX32 STILT MLU +37.5M"
                                }, 

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

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

                                "device_type", 
                                Buffer (0x11)
                                {
                                    "ATY,BaladiParent"
                                }, 

                                "model", 
                                Buffer (0x14)
                                {
                                    "R9 290X Asus MATRIX"
                                }, 

                                "hda-gfx", 
                                Buffer (0x0A)
                                {
                                    "onboard-1"
                                }
                            }, Local0)
                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                        Return (Local0)
                    }

                    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)
                    }
                }

                Device (HDAU)
                {
                    Name (_ADR, One)  // _ADR: Address
                    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                    {
                        Store (Package (0x02)
                            {
                                "hda-gfx", 
                                Buffer (0x0A)
                                {
                                    "onboard-1"
                                }
                            }, Local0)
                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                        Return (Local0)
                    }
                }

post-916820-0-24004600-1508706389_thumb.png

post-916820-0-42508500-1508706414_thumb.png post-916820-0-13936000-1508706431_thumb.png

post-916820-0-29941900-1508706475_thumb.png

Share this post


Link to post
Share on other sites

I make little and cosmetic modification of your patch to add correct name, apply correct framebuffer and load custom rom. 

 

Yes, iIt can be done this way but it's also possible to let Clover inject these properties. In the end, both methods lead to the same result. Nevertheless, thank you!

 

Mieze

Share this post


Link to post
Share on other sites

Yes, iIt can be done this way but it's also possible to let Clover inject these properties. In the end, both methods lead to the same result. Nevertheless, thank you!

 

Mieze

True, but clover can not load two defriend framebuffer selected by me.  

Share this post


Link to post
Share on other sites

Thank you Mieze

My RX 580 work fine

CSM disable, RX 580 Primary

Only one more thinks - add HDAU in DSDT for HDMI Audio

All great work! :)

Share this post


Link to post
Share on other sites

Just want to confirm, that Miezes patch from first post is working on my config as well. IGPU and CSM completely disabled in BIOS.

just have to make some "preperations" to make a tripple-monitor-setup working and some cosmetic changes as well,

as already Matthew82 has documented.

 

So now, i no longer nee LILU and WhatEverGreen kexts.

Thanx for another incredible work. Love it. Makes my Hackintosh so much easier.

Share this post


Link to post
Share on other sites

Really great, I'm working with two GPU r9 270x and r9 270, on an AMD fx platform, with InjectAti and Framebuffer Futomaki in Clover, and with LILU and WhatEverGreen in kexts 10.12/10.13

 

 

I do not have a selection for IGPU,

but only enable CSM and legacy Vbios,\and inserted inject Ati and Fbuffer into Clover

Mac Pro di carlo.zip

Schermata 2017-10-23 alle 00.19.21.png

Schermata 2017-10-23 alle 00.19.28.png

Schermata 2017-10-23 alle 00.19.28.png

Share this post


Link to post
Share on other sites

@Mieze

 

Thanks a lot for this great solution.

 

Does this method work on Legacy BIOS as well or it only applies to UEFI? 

 

I have an old GA-EP45-DS3R and a Sapphire 7790 GPU which was working with WheteverGreen and Lilu, but ever since macOS High Sierra it's not working anymore. I get the black screen.

 

Thanks again

Share this post


Link to post
Share on other sites

Confirmed working without Whatevergreen.kext on Sapphire Nitro+ RX 580 4GB, High Sierra (10.13). Used SSDT aml provided by slice in clover patched folder. With clover injection System information looks better (shows as RX 480). Without clover injection still works and shows as AMD R9 XXX. Might need some cosmetic DSDT patch to show correct information. Sleep works. I have:

 

1. CSM Disabled

2. IGPU enabled

3. Primary Display PEG

4. ig-platform-id for HD 630 as 0x59120003 for quicksync

5. Lilu.kext and IntelGraphicsFixup.kext for quicksync

 

Everything works fine including hardware decoding by HD 630. SMBIOS used iMac18,3

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 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="http://www.insanelymac.com/forum/topic/279450-why-insanelymac-does-not-support-tonymacx86/"]#####[/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
    • By manmo71
      I am a novice in the field of Hackintosh, and this is my first post here.
       
      I have managed to setup and install my hackintosh and it is perfectly working other than this one issue.
      I am unable to figure the exact cause of this issue. My Hackintosh is unable to go into sleep mode after the set time. This is what happens (see the attached video file).
       
       

      mojavesleep.mp4  
      You can see that the screen turns off, then I see the power on the graphics card and fans turn off.
      Immediately it comes back ON and the screen TURN's ON.
       
      I have followed various threads in several forums trying various options suggested for sleep related issue, but have been un-successful.
      If anyone is able to guide me through in resolving this issue, I would appreciate that.
       
      I am unsure what files need to be attached for you people to help me, feel free to ask and I shall upload the necessary files.
    • By fantomas1
      Hi InsanelyMacaholics   

      Use this thread to link / talk about of the future Nvidia Web Driver updates for macOS Sierra.
       
      10.12.6
      Nvidia Web Driver - 378.05.05.25f13 --> build 16G1815 (thanks to flowrider) New!
      Nvidia Web Driver - 378.05.05.25f12 --> build 16G1710 (thanks to BreBo)
      Nvidia Web Driver - 378.05.05.25f11 --> build 16G1618 (thanks to Frank Nitty)
      Nvidia Web Driver - 378.05.05.25f10 --> build 16G1510 (thanks to BreBo) 
      Nvidia Web Driver - 378.05.05.25f09 --> build 16G1408 (thanks to BreBo)
      Nvidia Web Driver - 378.05.05.25f08 --> build 16G1314 (thanks to BreBo)
      Nvidia Web Driver - 378.05.05.25f07 --> build 16G1314 (thanks to haring)
      Nvidia Web Driver - 378.05.05.25f06 --> build 16G1212 (thanks to WeBeRiO)
      Nvidia Web Driver - 378.05.05.25f04 --> build 16G1114 (thanks to lukazm)
      Nvidia Web Driver - 378.05.05.25f03 --> build 16G1036 (thanks to Gradou)
      Nvidia Web Driver - 378.05.05.25f01 --> build 16G29 (thanks to Badruzeus)
       
       
      10.12.5
      Nvidia Web Driver - 378.05.05.15f01 --> build 16F73 (see this post)
       
       
      10.12.4
      Nvidia Web Driver - 378.05.05.05f02 --> build 16E195(thanks to crachmaster4999)
      Nvidia Web Driver - 378.05.05.05f01 --> build 16E195 (thanks to Moviemakergr)  Pascal support!!!
      Nvidia Web Driver - 367.15.10.45f01 --> build 16E195 (thanks to Lanc)
       
       
      10.12.3

      Nvidia Web Driver - 367.15.10.35f01 --> build 16D32 (thanks to shatterhenner)
       
       
      10.12.2
      Nvidia Web Driver - 367.15.10.25f02 --> build 16C68 (see this post)
      Nvidia Web Driver - 367.15.10.25f01 --> build 16C67 (see this post)
      Nvidia Web Driver - 367.15.10.25b06 --> build 16C60b/16C63a (see this post)
       
       
      10.12.1
      Nvidia Web Driver - 367.15.10.15f03 --> build 16B2657/16B2659 (thanks to Moviemakergr).
      Nvidia Web Driver - 367.15.10.15f01 --> build 16B2555 (thanks to Moviemakergr)
       
       
      10.12.0
      Nvidia Web Driver - 367.15.10.05f01 --> build 16A323 (thanks to phi777)
       
       
      GM
      Nvidia Web Driver - 367.10.10.05b01 --> build 16A323 (same driver since DP4/PB3)
      Nvidia Web Driver - 367.10.10.05b01 --> build 16A322 (see this post)
      Nvidia Web Driver - 367.10.10.05b01 --> build 16A320 (see this post)
       
       
      DP/PB
      Nvidia Web Driver - 367.10.10.05b01 --> build 16A313a (DP8 & PB7) (see this post)
      Nvidia Web Driver - 367.10.10.05b01 --> build 16A304a (DP7 & PB6) (see this post)
      Nvidia Web Driver - 367.10.10.05b01 --> build 16A294a (DP6 & PB5) (see this post)
      Nvidia Web Driver - 367.10.10.05b01 --> build 16A286a (DP5 & PB4) (see this post)
      Nvidia Web Driver - 367.10.10.05b01 --> build 16A270f (DP4 & PB3) (thanks to TheRacerMaster)
      Nvidia Web Driver - 367.05.10.05b07 --> build 16A254g (DP3 & PB2) (see this post)
      Nvidia Web Driver - 367.05.10.05b07 --> build 16A238m (PB1) (thanks to Faun) 
      Nvidia Web Driver - 367.05.10.05b07 --> build 16A239j (DP2) (thanks to Faun)
      Nvidia Web Driver - 367.05.10.05b03 --> build 16A201w (DP1) (thanks to Xmedik)
       
    • By Fede1132
      Hi guys i have a problem install macOs Mojave on my PC, I have this configuration:

      CPU: Ryzen 7 2700X;
      GPU1: GTX 970 Strix(For game rendering and 144Hz Monitor);
      GPU2: GTX 750ti Strix(For 2nd monitor rendering to get 100% performances from 1st 144Hz Monitor);
      MotherBoard: MSI x470 GAMING PLUS
      Hard Disk 1 (Windows 10): Samsung EVO M.2;
      Hard Disk 2 (For Storage): RAID (1) between two hard disks;
      Hard Disk 3 (For Mojave): Kingston SSD 120GB;

      I have created my USB with this:
       
      Create Bootable USB Code: sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/USB -- /Applications/Install\ macOS\ Mojave.app -- nointeract && say Done. Clover Settings: Boot: Verbose; dart=0; nv_disable=0; kext-dev-mode=1; GraphicsEnabler=No; XMPDetection = No. Cpu: C6. Devices: (Not Enabled = [ ] - Enabled = [-] - Full Enabled [✓]) Inject (Full Enabled); Add ClockID (Full Enabled); FixOwnership (Full Enabled); Gui: (Not Enabled = [ ] - Enabled = [-] - Full Enabled [✓]) Enabled (Full Enabled); Screen Resolution: 1920x1080; Kernel and Kext Patches: (Not Enabled = [ ] - Enabled = [-] - Full Enabled [✓]) Apple RTC (Full Enabled); KernelPm (Full Enabled); SMBIOS: iMac(18,3); System Parameters: Inject Kexts = Yes; Inject System ID; Used Kexts: FakeSMC FakePCIID NVIDIA WEB LILU BIOS: VT-d = Disabled; XHCI Hand-Off = Enabled; Legacy USB Support: Enabled; Hard Disk: AHCI Mode; Selection Mode: Legacy + EUFI; Clover Install Log:
      Full Error Log:
       
×