Jump to content

Tracing back the AMD GPU wakeup issue to its origin


Mieze
368 posts in this topic

Recommended Posts

I found an interesting find.

I’m on ryzen 10.13.2 beta 5 and what happened is I always updated my clover and even my fakesmc.kext

I used the latest lilu and whatevergreen. When I wanted to put the computer to sleep it would turn off the monitor and reboot.

 

So I went my old hard drive (10.13.1) using this efi and was getting the same results. Reboot on sleep. Which was very odd for me because steep worked at great when I was in 10.13.1

 

I played around with a lot of files and ended up using my old efi which contained and older version of clover and fakesmc.kext.

Using this old efi and the latest lilu and whatevergreen sleep worked again!!!

 

I’m still playing around with the files I will try on 10.13.2 beta which gave me reboot when I put it to sleep.

 

I’ll report back

I have the same issue after the 10.13.2, did you  get sleep working with lastest Clover?

Link to comment
Share on other sites

Reading the latest commit from Whatevergreen, the developer says "Starting with 10.13.2 AAPL hardcodes framebuffer limit in certain kexts"

So I add:

 

"CFG,CFG_FB_LIMIT",

0x06,

 

And now it sleeps fine.

good to know thanks! 

Link to comment
Share on other sites

Reading the latest commit from Whatevergreen, the developer says "Starting with 10.13.2 AAPL hardcodes framebuffer limit in certain kexts"

So I add:

 

"CFG,CFG_FB_LIMIT",

0x06,

 

And now it sleeps fine.

 

I just saw a similar fix using Clover Arbitrary injection in devices section.

  • Like 1
Link to comment
Share on other sites

hi. amd rx 580 can use fb of dayman or oricnoc to boot into system sucessfully...so which fb can i use ?

Mork uses Orinoco, he has 5 ports, I use Baladi it depends on which OS, Sierra or High Sierra? I think Dayman works ok for Sierra but for HS Orinoco.

Link to comment
Share on other sites

How to fix it in Clover config.plist for RX-560 or AMD Radeon HD 6870 ?

 

Here it is test it and report back please, it goes in Clover "Devices" section in Arbitrary.

 

post-1753549-0-61211100-1513723643_thumb.png

is  AMDRadeonX4000HWServices come from 10.13.2 or 10.13.1 ?

I get wake issues after sleep from 10.13.1 .

 

It is a new addition to High Sierra, there are device IDs in the info.plist.    In Sierra there were only device IDs 0x68101002 (example) in the controlerkext and AMDX000kext.     Now in HS there are 3 IDs, one in Controllerkext, one in X000kext, and now one in the AMDRadeonx4000HWkext and AMDRadeonx5000HWkext.    The vAMD3000kext seems to be like the older Sierra layout.     Maybe this is the new Metal2 kext layout.

 

Its really weird, the 4100, 4150, 4200, and 4250 kexts have device IDs in them for the same cards in many cases ie... 0x67ef, 0x67ff, 0x67df but only one kext gets assigned.

  • Like 1
Link to comment
Share on other sites

Hi @Gigamaxx thanks for the explanation, btw how to change the "value" from CFG, CFG_LIMIT_FB

in my case HD 7790 I get wake problem too

 

ioreg -lw0 | grep CFG_FB_LIMIT

 

 

ioreg -lw0 | grep CFG_FB_LIMIT
| | | | | "CFG_FB_LIMIT" = 0
| | | | | "ATY,Exmoor" = {"aty_config"={"CFG_USE_AGDC"=Yes,"CFG_DEF_DITH"=0,"CFG_DIAG_LED"=1,"CFG_PTPL2_TBL"=<5a000000520000004c00000047000000430000003f0000003b00000037000000330000002f0000002b00000027000000230000001f0000001b00000017000000>,"CFG_NVV"=2,"CFG_FB_LIMIT"=6}}
| | | | | "aty_config" = {"CFG_PTPL2_MIN"=30,"CFG_FORCE_HDMI"=No,"CFG_NO_MST"=No,"CFG_FORCE_MAX_DPS"=No,"CFG_USE_DPT"=Yes,"CFG_NO_HDCP"=No,"CFG_CAA"=0,"CFG_APER_MODE"=1,"CFG_PULSE_INT"=Yes,"CFG_PTPL2_MAX"=150,"CFG_USE_STUTTER"=No,"CFG_FB_LIMIT"=0,"CFG_USE_FEDS"=Yes,"CFG_USE_FBC"=No,"DALUseUrgencyWaterMarkOffset"=0,"CFG_NODM"=Yes,"DALReadDelayStutterOff"=4,"CFG_USE_REGAMMA"=Yes,"CFG_USE_AGDC"=No,"CFG_GEN_FLAGS"=0,"CFG_INT_SSPC"=25,"CFG_TRANS_WSRV"=Yes,"CFG_NO_SLS"=No,"CFG_USE_TCON"=No}


 

Link to comment
Share on other sites

Hi @Gigamaxx thanks for the explanation, btw how to change the "value" from CFG, CFG_LIMIT_FB

in my case HD 7790 I get wake problem too

 

ioreg -lw0 | grep CFG_FB_LIMIT

 

 

ioreg -lw0 | grep CFG_FB_LIMIT

| | | | | "CFG_FB_LIMIT" = 0

| | | | | "ATY,Exmoor" = {"aty_config"={"CFG_USE_AGDC"=Yes,"CFG_DEF_DITH"=0,"CFG_DIAG_LED"=1,"CFG_PTPL2_TBL"=<5a000000520000004c00000047000000430000003f0000003b00000037000000330000002f0000002b00000027000000230000001f0000001b00000017000000>,"CFG_NVV"=2,"CFG_FB_LIMIT"=6}}

| | | | | "aty_config" = {"CFG_PTPL2_MIN"=30,"CFG_FORCE_HDMI"=No,"CFG_NO_MST"=No,"CFG_FORCE_MAX_DPS"=No,"CFG_USE_DPT"=Yes,"CFG_NO_HDCP"=No,"CFG_CAA"=0,"CFG_APER_MODE"=1,"CFG_PULSE_INT"=Yes,"CFG_PTPL2_MAX"=150,"CFG_USE_STUTTER"=No,"CFG_FB_LIMIT"=0,"CFG_USE_FEDS"=Yes,"CFG_USE_FBC"=No,"DALUseUrgencyWaterMarkOffset"=0,"CFG_NODM"=Yes,"DALReadDelayStutterOff"=4,"CFG_USE_REGAMMA"=Yes,"CFG_USE_AGDC"=No,"CFG_GEN_FLAGS"=0,"CFG_INT_SSPC"=25,"CFG_TRANS_WSRV"=Yes,"CFG_NO_SLS"=No,"CFG_USE_TCON"=No}

 

 

 

 

 

 

Using Clover Configurator in the Devices section, thats where the Arbitrary injection can be placed.    Try the example above in the pic to see if it works for sleep, it was reported to work on RX 580.

  • Like 1
Link to comment
Share on other sites

Yes I know how to inject but the value = 5 why 5

 

Picos-Mac-Pro:~ pico$ /Users/pico/Downloads/lsframebuffer-master/lsframebuffer-ati
Prt Conect CtrFlg Conect Display
 0. 0x0400 0x0304 DP     NONE
 1. 0x0800 0x0204 HDMI   LCD
 2. 0x0004 0x0004 DL-DVI NONE
 3. 0x0004 0x0014 DL-DVI NONE
 4. 0x0400 0x0100 DP     NONE
 5. 0x0400 0x0100 DP     NONE

 

its mean I use 5 too or 4 cause my card only 4 (1 HDMI, 2 DVI, 1 DP)

thanks for advance

Link to comment
Share on other sites

Using Clover Configurator in the Devices section, thats where the Arbitrary injection can be placed.    Try the example above in the pic to see if it works for sleep, it was reported to work on RX 580.

hi ,, i find there is no difference between using orinoco and dayman..

Link to comment
Share on other sites

Yes I know how to inject but the value = 5 why 5

 

Picos-Mac-Pro:~ pico$ /Users/pico/Downloads/lsframebuffer-master/lsframebuffer-ati

Prt Conect CtrFlg Conect Display

 0. 0x0400 0x0304 DP     NONE

 1. 0x0800 0x0204 HDMI   LCD

 2. 0x0004 0x0004 DL-DVI NONE

 3. 0x0004 0x0014 DL-DVI NONE

 4. 0x0400 0x0100 DP     NONE

 5. 0x0400 0x0100 DP     NONE

 

its mean I use 5 too or 4 cause my card only 4 (1 HDMI, 2 DVI, 1 DP)

thanks for advance

 

 

Yes just edit it to 4 instead of 5.    this example was for a RXD 580 Saphire Nitro with 5 IO ports.

  • Like 1
Link to comment
Share on other sites

Here it is test it and report back please, it goes in Clover "Devices" section in Arbitrary.

 

attachicon.gifupload_2017-12-11_23-12-28.png

 

It is a new addition to High Sierra, there are device IDs in the info.plist.    In Sierra there were only device IDs 0x68101002 (example) in the controlerkext and AMDX000kext.     Now in HS there are 3 IDs, one in Controllerkext, one in X000kext, and now one in the AMDRadeonx4000HWkext and AMDRadeonx5000HWkext.    The vAMD3000kext seems to be like the older Sierra layout.     Maybe this is the new Metal2 kext layout.

 

Its really weird, the 4100, 4150, 4200, and 4250 kexts have device IDs in them for the same cards in many cases ie... 0x67ef, 0x67ff, 0x67df but only one kext gets assigned.

Do you mean that I need edit the value according to GPU's port number ?

For example there are 4 ports (2 DP, 1 HDMI & 1 DVI) need edit it to 4 .

Link to comment
Share on other sites

Do you mean that I need edit the value according to GPU's port number ?

For example there are 4 ports (2 DP, 1 HDMI & 1 DVI) need edit it to 4 .

 

Yes, that is what I meant.

hi ,, i find there is no difference between using orinoco and dayman..

 

There are many others to try.    see here the AMD9250Controller with the 67DF and 67EF IDs.   There are more kexts too look at and try to find the best fit for frame buffer.   Look at the data for CARONI, ELQUI and FLORIN.     These may be for Apple specific cards and you may stumble onto a fit for your card.

 

post-1753549-0-84736000-1513742450_thumb.pngpost-1753549-0-39206800-1513742489_thumb.png

  • Like 3
Link to comment
Share on other sites

Here it is test it and report back please, it goes in Clover "Devices" section in Arbitrary.

 

attachicon.gifupload_2017-12-11_23-12-28.png

 

It is a new addition to High Sierra, there are device IDs in the info.plist.    In Sierra there were only device IDs 0x68101002 (example) in the controlerkext and AMDX000kext.     Now in HS there are 3 IDs, one in Controllerkext, one in X000kext, and now one in the AMDRadeonx4000HWkext and AMDRadeonx5000HWkext.    The vAMD3000kext seems to be like the older Sierra layout.     Maybe this is the new Metal2 kext layout.

 

Its really weird, the 4100, 4150, 4200, and 4250 kexts have device IDs in them for the same cards in many cases ie... 0x67ef, 0x67ff, 0x67df but only one kext gets assigned.

Can we do the same thing to disable AGDC? For fixing black screen after wake. How do I fill up those boxes?

 

"CFG,CFG_USE_AGDC", Buffer () {

0x00

}

  • Like 1
Link to comment
Share on other sites

Yes, that is what I meant.

 

Thanks for this patch which works for RX-560 at 10.13.3 DB2 (17D25b) with value=03 in Intel Z87 hackintosh.

It also works for Radeon HD 6870 at 10.13.2 (17C88) & 10.13.3 DB2 (17D25b) with value=05 in AMD FX-6300 hackintosh.

  • Like 1
Link to comment
Share on other sites

On XFX R9 280X 10.12.6 Clover r439. Checked RadeonDeinit in Clover Configurator and deleted WhateverGreen from Kexts/Other. Graphics working but have lost Display Port audio.

DP/HDMI audio requires either Lilu+Whatevergreen or customized SSDT, note with a SSDT it is also required to have ATIInject=yes in Clover config.

  • Like 2
Link to comment
Share on other sites

×
×
  • Create New...