Contribute
Register

[GUIDE] General Framebuffer Patching Guide (HDMI Black Screen Problem)

Hello everyone!
I'm having a really hard time to fix the hdmi behavior and for the love of everything hackintosh i simply can't seem to fully understand the framebuffer patching process!
Attached you'll see my EFI + IOREG
My situation is the following:
My Laptop Display goes Black but with backlight working AFTER i put the HDMI cable.
Normally how it's setup in the EFI attached the port is detected as DP so if i set con-1-type 00080000 it gets correctly mapped as HDMI and also audio over HDMI works too but Laptop screen still goes black !
Now randomly if I'm lucky by closing the Lid and reopening of my laptop i get both screen working!
Sometimes happens like this, sometimes everything freezes and sometimes display goes up only on external monitor!
Any help to fix this strange behavior?
DVMT modified manually from BIOS and set to 64 so acceleration working correctly
Acer 574g I5 6200u Intel 520HD + Nvidia 940M, Bigsur
 

Attachments

  • EFI IOREG DPCI haseo 17.02.zip
    22.1 MB · Views: 67
fixed myself! framebuffer-con1-type 00080000 , complete-modeset 01000000 , force-online 01000000
 
Hi all,

I'm currently facing a weird problem with my Dell Latitude 5411.

The UHD 630 works fine, two external displays too.
The Notebook has Thunderbolt 3 and a HDMI 2.0 port via LSPCON.

The block diagram says 4 display outputs:
1x eDP (Internal Display)
2x DP to the Thunderbolt Controller
1x DP to HDMI 2.0 Converter
View attachment 517470

Until a few weeks ago, I was using an Asus monitor with 2560x1440@165Hz via an USB-C to DP adapter.
Now I bought a LG Ultra Wide 38GN350 which has 3840x1600@160Hz. The new monitor does only work with 1080p as a maximum resolution.
I already tried a workaround with SwitchResX. The maximum custom resolution that works is 3000x1600@100Hz.
Any higher resolution is flagged as invalid after reboot.

Device Properties
Code:
<key>PciRoot(0x0)/Pci(0x2,0x0)</key>
    <dict>
        <key>AAPL,ig-platform-id</key>
        <data>
        CQClPg==
        </data>
        <key>AAPL,slot-name</key>
        <string>Internal@0,2,0</string>
        <key>device_type</key>
        <string>VGA compatible controller</string>
        <key>enable-lspcon-support</key>
        <data>
        AQAAAA==
        </data>
        <key>framebuffer-con1-enable</key>
        <data>
        AQAAAA==
        </data>
        <key>framebuffer-con1-busid</key>
        <data>
        BQAAAA==
        </data>
        <key>framebuffer-con1-index</key>
        <data>
        AQAAAA==
        </data>
        <key>framebuffer-con1-pipe</key>
        <data>
        EgAAAA==
        </data>
        <key>framebuffer-con1-type</key>
        <data>
        AAQAAA==
        </data>
        <key>framebuffer-con2-enable</key>
        <data>
        AQAAAA==
        </data>
        <key>framebuffer-con2-busid</key>
        <data>
        BAAAAA==
        </data>
        <key>framebuffer-con2-index</key>
        <data>
        AwAAAA==
        </data>
        <key>framebuffer-con2-pipe</key>
        <data>
        EgAAAA==
        </data>
        <key>framebuffer-con2-type</key>
        <data>
        AAQAAA==
        </data>
        <key>framebuffer-fbmem</key>
        <data>
        AACQAA==
        </data>
        <key>framebuffer-patch-enable</key>
        <data>
        AQAAAA==
        </data>
        <key>framebuffer-stolenmem</key>
        <data>
        AAAwAQ==
        </data>
        <key>framebuffer-unifiedmem</key>
        <data>
        AAAAgA==
        </data>
        <key>hda-gfx</key>
        <string>onboard-1</string>
        <key>model</key>
        <string>Intel UHD Graphics 630</string>
        <key>enable-max-pixel-clock-override</key>
        <data>
        AQAAAA==
        </data>
        <key>disable-agdc</key>
        <data>
        AQAAAA==
        </data>
        <key>force-online</key>
        <data>
        AQAAAA==
        </data>
    </dict>

In addition, I tried different framebuffer settings, enable-hdmi20 and/or pixel-clock-override

Approach via UEFI variable:

I also checked the UEFI variables. There is no option for values higher than 64MB.

Content of Section_PE32_image_Setup IFR.txt
Code:
One Of: DVMT Pre-Allocated, VarStoreInfo (VarOffset/VarName): 0xF5, VarStore: 0x16, QuestionId: 0x274E, Size: 1, Min: 0x0, Max 0xFE, Step: 0x0 {05 91 92 06 A5 06 4E 27 16 00 F5 00 10 10 00 FE 00}
0x4BEC8             Default: DefaultId: 0x0, Value (8 bit): 0x1 {5B 06 00 00 00 01}
0x4BECE             One Of Option: 0M, Value (8 bit): 0x0 {09 07 93 06 00 00 00}
0x4BED5             One Of Option: 32M, Value (8 bit): 0x1 {09 07 94 06 00 00 01}
0x4BEDC             One Of Option: 64M, Value (8 bit): 0x2 {09 07 95 06 00 00 02}
0x4BEE3             One Of Option: 4M, Value (8 bit): 0xF0 {09 07 96 06 00 00 F0}
0x4BEEA             One Of Option: 8M, Value (8 bit): 0xF1 {09 07 97 06 00 00 F1}
0x4BEF1             One Of Option: 12M, Value (8 bit): 0xF2 {09 07 98 06 00 00 F2}
0x4BEF8             One Of Option: 16M, Value (8 bit): 0xF3 {09 07 99 06 00 00 F3}
0x4BEFF             One Of Option: 20M, Value (8 bit): 0xF4 {09 07 9A 06 00 00 F4}
0x4BF06             One Of Option: 24M, Value (8 bit): 0xF5 {09 07 9B 06 00 00 F5}
0x4BF0D             One Of Option: 28M, Value (8 bit): 0xF6 {09 07 9C 06 00 00 F6}
0x4BF14             One Of Option: 32M/F7, Value (8 bit): 0xF7 {09 07 9D 06 00 00 F7}
0x4BF1B             One Of Option: 36M, Value (8 bit): 0xF8 {09 07 9E 06 00 00 F8}
0x4BF22             One Of Option: 40M, Value (8 bit): 0xF9 {09 07 9F 06 00 00 F9}
0x4BF29             One Of Option: 44M, Value (8 bit): 0xFA {09 07 A0 06 00 00 FA}
0x4BF30             One Of Option: 48M, Value (8 bit): 0xFB {09 07 A1 06 00 00 FB}
0x4BF37             One Of Option: 52M, Value (8 bit): 0xFC {09 07 A2 06 00 00 FC}
0x4BF3E             One Of Option: 56M, Value (8 bit): 0xFD {09 07 A3 06 00 00 FD}
0x4BF45             One Of Option: 60M, Value (8 bit): 0xFE {09 07 A4 06 00 00 FE}
0x4BF4C         End One Of {29 02}
The Dell BIOS says 64MB which might be wrong.
If I boot without the WEG 32MB patch, I am stuck at Graphics Init and getting a Kernel Panic.

Unfortunately, I cannot set the DVMT size via setup_var or ru.efi because the Setup variable does not contain valid data.
For instance: If I change the SATA settings to AHCI or Disabled in the Dell BIOS, the assigned value will stay 0x2 for RAID:
Code:
One Of: SATA Operation, VarStoreInfo (VarOffset/VarName): 0x44, VarStore: 0x17, QuestionId: 0x1C4, Size: 1, Min: 0x1, Max 0xFF, Step: 0x0 {05 91 6C 1F 6E 1F C4 01 17 00 44 00 10 10 01 FF 00}
0x3C99F                 One Of Option: Disabled, Value (8 bit): 0xFF {09 07 71 1F 00 00 FF}
0x3C9A6                 One Of Option: AHCI, Value (8 bit): 0x1 {09 07 6F 1F 00 00 01}
0x3C9AD                 One Of Option: RAID On, Value (8 bit): 0x2 (default) {09 07 70 1F 10 00 02}
0x3C9B4             End One Of {29 02}

So changing the UEFI setup variable has absolutely no effect.
Therefore, I might use the wrong variable. Are there any other places than "Setup" to store data?

Additional info: My UEFI is password protected because it is my office computer.


I also tried the monitor with a Dell XPS 9500 and it works fine at 3840x1600@75Hz also with HiDPI settings in control panel.
So I think, this is a DVMT related issue, because the XPS does not need the stolenmem patch for 32MB. The other configuration is identical to my 5411.


Any ideas on how to get 4K@60Hz working?
Fixed by setting DVMT to 64MB.

The related setting was in "SaSetup" and not in Setup.
Also disabling CFG was fine via "CpuSetup"
 
Hi @CaseySJ and everybody else.

Thanks to you and the community here I have a build that I think is running perfectly.
Asus ROG Strix Z390-F Gaming 3 -i9 9900k -Sapphire Pulse RX Vega 56 -Asus pce-ac68u wifi card. SMBios 19,1. Headless igpu UHD 630 with full support according to VideoProc. Bootloader OC 0.7.0 running Big Sur 11.3

As I like to fiddle around in my computer I have been trying to get correct name on framebuffers for my Sapphire Pulse RX Vega 56. Trying all sorts of SSDT from contributors here, but it has never worked 100% correctly. So I started to edit SSDT-Kamarang found in one of the threads here and just kept the first part that is renaming " _SB_.PCI0.PEG0.PEGP.**** ". Putting INIO in place of **** which is correct name for my Asus ROG Strix z390 according to MaciASL. Trying to inject framebuffers via DeviceProperties in OC starting with "@0,name Kamarang" up to "@3,name" as I have 4 ports on my card. Also injecting "device_type ATY,Kamarang" I got the naming in ioReg but the ports was not correct any longer . Running dual monitors one would go black or main screen would be showing up on wrong monitor. Then I found when I was looking at GFX0@0 in ioReg that I had two properties that was named @4,name and @5,name AMDFramebuffer and when I added those to my config and gave name Kamarang to those everything works correctly.
I wonder if you could tell me if this is a good way to go?

excuses for misspelling etc


Kind regards

Solved my @4,name @5,name. By injecting AAPL,slotname Slot-1 the two properties in GFX0 disappeared.
Sorry for cluttering the thread
 

Attachments

  • config.plist.zip
    5.3 KB · Views: 59
  • ioreg.zip
    989.3 KB · Views: 52
Last edited:
@CaseySJ I am trying to follow your guide but find it extremely hard because Hackintool used in your guide does not even closely resemble the one I am using which is version 3.5.7 After many hours trying without making any headway, I have given up on this one.
Would appreciate a link which demonstrates all this based on a later version of Hackintool.
My patching is actually working somehow, except that I have to plug in my 2nd monitor after my Skylake build has booted into a single monitor, before both will display any output together, each one on its own is however working well.

Greetings Henties
 
Does anyone know the difference between a "mobile" framebuffer and a "desktop" framebuffer? Details below...

When I first starting hacking my rig here, framebuffer patching guides (including this one) warned against using video adapters (I was attempting to use DP->DVI adapters). Using a brute-force, trial and error patching methodology here, I got lucky and determined that I could enable DP->DVI adapters with UHD 630 framebuffer 0x3e920000 and framebuffer patches that changed busID, index, type and flags (framebuffer 0x3e9b0007 would not work).

Now that I know enough about framebuffer patching to be dangerous, I'd like to figure out why one framebuffer works but the other does not (even if I apply patches to change busIDs, types, flags, indices..., framebuffer 0x3e9b0007 will not work with DP->DVI adapters on my rig). The major difference that I see between the two framebuffers (defined here) is that 0x3e9b0007 (the non-working framebuffer) is "desktop" and 0x3e920000 (the working framebuffer) is "mobile."

Does anyone know the logical difference (including byte sequence in AppleIntelCFLGraphicsFramebuffer) between "mobile" and "desktop" framebuffers?
 
@CaseySJ I am trying to follow your guide but find it extremely hard because Hackintool used in your guide does not even closely resemble the one I am using which is version 3.5.7 After many hours trying without making any headway, I have given up on this one.
Would appreciate a link which demonstrates all this based on a later version of Hackintool.
My patching is actually working somehow, except that I have to plug in my 2nd monitor after my Skylake build has booted into a single monitor, before both will display any output together, each one on its own is however working well.

Greetings Henties
Your signature includes RX580. Are you trying to use your HD 530 iGPU even though you have an RX580?
 
@deeveedee Yes indeed all my iGPU's work in headless mode without any problems whatsoever.

Greetings Henties
 
@Henties Ok - if you're trying to get your RX580 to work while your iGPU is in headless mode, I think this isn't the thread for you. This thread is for iGPU framebuffer patching without dGPU. Sorry if I'm misunderstanding your request for help.
 
No @deeveedee I am NOT trying get my iGPU's to work because when I run my rigs with a DGPU all my iGPU's are indeed working in headless mode precisely the way I answered your question and exactly in line with how your text was phrased.

Your question:
"Your signature includes RX580. Are you trying to use your HD 530 iGPU even though you have an RX580?"

My original response:
Yes indeed all my iGPU's work in headless mode without any problems whatsoever

My original posting #1,625 and addressed to @CaseySJ starts with:
@CaseySJ I am trying to follow your guide.....

@deeveedee I believe that had you been familiar with the contents of my #1,625 posting, which was attempting to clarify some "gaps" in my understanding of framebuffer patching in general, and for some build I was contemplating to embark on in the future, you would not have jumped on the bandwagon with your incorrect assumption and confuse even me.

At that particular stage I used my Skylake build for experimental purposes, only to gain some knowledge regarding framebuffer patching in general, and after I had duly removed the RX 580 XT from that particular Skylake based hack.

Suggest you first familiarise yourself with ALL the postings of a particular hacker, relating to the topic he is requesting assistance for, before you actually join with your own endeavour to assist.

Greetings Henties
 
Back
Top