Contribute
Register

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

CaseySJ

Moderator
Joined
Nov 11, 2018
Messages
20,080
Motherboard
Asus ProArt Z690-Creator
CPU
i7-12700K
Graphics
RX 6800 XT
Mac
  1. MacBook Air
  2. MacBook Pro
  3. Mac Pro
Classic Mac
  1. Quadra
Mobile Phone
  1. iOS
Joined
Oct 11, 2010
Messages
728
Motherboard
X299-WU8
CPU
i9-9880XE
Graphics
Vega 64
Mac
  1. iMac
  2. Mac Pro
Hello @nmano,

I can take a deeper look later in the day, but some quick questions and comments:
  • Have you tried “Monitor Control” app for screen brightness and monitor volume?
  • Are the USB ports properly mapped and limited to 15?
  • Are you running Big Sur 11.3?
I am running Big Sur 11.3
I just try now Monitor Control app Its work brightness but no slider in Display path.
I don't try port limit to this PC.I will try and replay.
Please take time look my EFI.
Thanks Friend.
 
Last edited:
Joined
Sep 7, 2011
Messages
3
Motherboard
Mac Pro 6,1
CPU
4,4GHz Intel Core i5 4690K
Graphics
AMD Radeon R9 290X
Mac
  1. MacBook Pro
Classic Mac
Mobile Phone
  1. Android
  2. iOS
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
1620127222764.png


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?
 
Joined
Jan 15, 2012
Messages
56
Motherboard
Gigabyte GA-Z370-HD3P
CPU
i7-8700K
Graphics
GTX 1070
Apologies for the late reply. Some questions and comments:
  • What is the name/model of the HP monitor?
  • Is it connected to computer via DP or HDMI cable?
  • Are there a video adapter being used such as DP to DVI, etc.?
  • If using straight DP to DP, is the monitor set to DP 1.1 or 1.2? It should be set to 1.1 first to see if the problem disappears. This can be done from the monitor’s on-board menu.
  • Are you using WhateverGreen to disable the nVidia GPU (-wegnoegpu)?
  • Is this a brand new build or did the overscan problem appear recently after months of normal operation?
1. HP Pavilion 27xi
2. HDMI
3. No Video adaptors
4. Straight HDMI to HDMI connection
5. Yes "whatevergreen" kext is present under kext folders, but no (-wegnoegpu) command is set
6. Brand new. Fresh install
 
Joined
May 5, 2021
Messages
2
Motherboard
NB.GE611.002
CPU
I5 6200U
Graphics
Intel HD Graphics 520 + Nvidia 940M
Mobile Phone
  1. Android
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: 55
Joined
May 5, 2021
Messages
2
Motherboard
NB.GE611.002
CPU
I5 6200U
Graphics
Intel HD Graphics 520 + Nvidia 940M
Mobile Phone
  1. Android
fixed myself! framebuffer-con1-type 00080000 , complete-modeset 01000000 , force-online 01000000
 
Joined
Sep 7, 2011
Messages
3
Motherboard
Mac Pro 6,1
CPU
4,4GHz Intel Core i5 4690K
Graphics
AMD Radeon R9 290X
Mac
  1. MacBook Pro
Classic Mac
Mobile Phone
  1. Android
  2. iOS
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"
 
Joined
Feb 28, 2014
Messages
32
Motherboard
Asus Z390-F Gaming
CPU
i9-9900K
Graphics
RX Vega 56
Mac
  1. iMac
  2. Mac Pro
Classic Mac
  1. Classic
  2. iMac
  3. Performa
  4. Power Mac
  5. SE/30
Mobile Phone
  1. iOS
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: 39
  • ioreg.zip
    989.3 KB · Views: 35
Last edited:
Joined
Nov 4, 2011
Messages
660
Motherboard
Gigabyte GA-Z170X-UD3 F23g
CPU
i7-6700K
Graphics
RX 580
Mac
  1. iMac
@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
 
Joined
Sep 22, 2011
Messages
1,528
Motherboard
HP EliteDesk 800 G5 Mini
CPU
i9-9900
Graphics
UHD 630
Mac
  1. Mac mini
Mobile Phone
  1. iOS
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?
 
Top