Contribute
Register

[Guide] Intel Framebuffer patching using WhateverGreen

Attached is a shell script you can run which will download and compile the latest Lilu + WhateverGreen and place the kexts into a folder called Debug and Release.

Thanks.
I found both Kexts in the root of boot drive in Release folder.

Also do I need to change the values obtained from my framebuffer with Intel FB Patcher: stolenmem=57MB, fbmem=0MB, unifiedmem=1536MB for different patched values?

My BIOS DVMT-prealloc =64MB. I actually need 128MB or 192 MB to make UHD 4K internal display working.
Thanks.
 
Last edited:
Kudos to all devs who keeps improving Hackintosh.

I can't quite understand this guide maybe because I 'am not a programmer. I think the guide is written for people who are intermediate to hackintoshing. I would really appreciate if someone could provide a step-by-step procedures just like some other guides here.

The only step I was able to understand and do is
Framebuffer patching in Mojave

Compile Lilu + WhateverGreen
Download WhateverGreen. Make sure you place the debug version of Lilu into the root of WhateverGreen before you compile. Install Lilu and WhateverGreen kext's into the usual place. Compile WhateverGreen as debug if you want to view debug output.

Can't Compile?
If you can't compile your own please wait for the official binaries to be released soon.

Get the device path of your IGPU:
Download and use the gfxutil tool like so:
Code:
$ gfxutil -f IGPU
DevicePath = PciRoot(0x0)/Pci(0x2,0x0)

From there I don't really understand what to do next. What should I do with the output of gfxutil? There's examples but how would I know the values I would put?

Still, thanks for all the hard work. I do wish it would be written so people like me can easily follow.
 
Kudos to all devs who keeps improving Hackintosh.

I can't quite understand this guide maybe because I 'am not a programmer. I think the guide is written for people who are intermediate to hackintoshing. I would really appreciate if someone could provide a step-by-step procedures just like some other guides here.

The only step I was able to understand and do is


From there I don't really understand what to do next. What should I do with the output of gfxutil? There's examples but how would I know the values I would put?

Still, thanks for all the hard work. I do wish it would be written so people like me can easily follow.

Take easy :)
You don't need compile any kext.
Download latest version of lilu and whatevergreen kext and edit config.plist for use framebuffer from new kext.
That's all !!
 
Thanks.
I found both Kexts in the root of boot drive in Release folder.

Also do I need to change the values obtained from my framebuffer with Intel FB Patcher: stolenmem=57MB, fbmem=0MB, unifiedmem=1536MB for different patched values?

My BIOS DVMT-prealloc =64MB. I actually need 128MB or 192 MB to make UHD 4K internal display working.
Thanks.
Also looking for this since I have a 144hz display
 
I did managed to compile the kexts. Like I said my understanding of the guide was only up to there.
The way to add the patches on the config.plist is what I cannot understand.
Could you help with this?

In config.plist section Properties of Devices you add this:


<key>PciRoot(0x0)/Pci(0x2,0x0)</key>
<dict>
<key>AAPL,ig-platform-id</key>
<data>CQClPg==</data>
<key>framebuffer-patch-enable</key>
<integer>1</integer>
<key>framebuffer-stolenmem</key>
<integer>19922944</integer>
<key>framebuffer-fbmem</key>
<integer>9437184</integer>
<key>framebuffer-unifiedmem</key>
<integer>2147483648</integer>
</dict>

In my case I don't add AAPL,ig-platform-id line but maybe in yours is necessary.
Don't use Clover Configurator for that - is mess plist file !
I use textwrangler editor. Or Xcode, it's best :)
 
The guide is incomplete.

The guide assumes you know what framebuffer patching is. The technique has changed but the principle is the same. For example RehabMan's [Guide] Alternative to the minStolenSize patch with 32mb DVMT-prealloc.

This patch:
Code:
Comment: 0x591b0000, 32MB BIOS, 19MB framebuffer 9MB cursor bytes (credit RehabMan)
Name: com.apple.driver.AppleIntelKBLGraphicsFramebuffer
Find: 00006002 00005001
Replace: 00003001 00009000
Now looks like this:
Code:
<key>framebuffer-patch-enable</key>
<integer>1</integer>
<key>framebuffer-stolenmem</key>
<integer>19922944</integer>
<key>framebuffer-fbmem</key>
<integer>9437184</integer>
So we have framebuffer-stolenmem=19MB and framebuffer-fbmem=9MB (yes the names have changed). So let's go to MB to Bytes Conversion and enter these values. 19 MB = 19922944 Bytes (in binary) and 9 MB = 9437184 Bytes (in binary). That is how we come to these values.

As for audio patching (DP->HDMI) this is no longer necessary as it is automatically done by WhateverGreen. Note that this auto patching only occurs if you don't apply any other patches for WhateverGreen.

There are very few other framebuffer patches you will need. For my desktop I need to turn off connector 3 or it doesn't go to sleep properly. So you may need to patch framebuffer-pipecount / framebuffer-portcount.

In post #2 I list the platform-id's but choosing an ig-platform-id for your system is out of the scope of this guide. I have updated post #1 on how to calculate the ig-platform-id entry.
 
Last edited:
Keep in mind you must configure the kext patches correctly.
Contrary to post #1, I would use config.plist/Devices/AddProperties to set the required properties that drive the patching.
Hi RehabMan,
Can you please help?
Trying to get working Intel HD 540 4K UHD laptop. I checked through EFI Shell BIOS DVMT-Prealloc is 64MB. Cannot change it.
I use FB Patcher to extract data from my AppleIntelFramebuffer dump. For 0x19260002, I get StolenMemorySize=57 MB, CursorSize=0 MB and VRAM 1536 MB.
I used these parameters in config.plist/Devices/Add Properties. Would you recommend decrease
StolenMemorySize ?

Now the system is booting with ig-platform-id = 0x19260002.

1. After screen gets black, it takes about 15 minutes to get into login screen ????
Looks like 4K working, but I am not sure about acceleration.
Can you please check QE/CI also Power Management from my IOReg. file?
2. As soon as I try to open Display Properties, my computer reboots ???? It's weird, working fine with fake ig-platform-id = 0x12345678 !!!
3. Also Brightness level is low and No full Shutdown.

I attach IOReg. and kextstat files.
Thank you
 

Attachments

  • VAL’s MacBook Pro.zip
    615.2 KB · Views: 144
  • Terminal Saved Output.txt
    368 bytes · Views: 282
<key>framebuffer-con2-type</key>
<integer>-1</integer>

Aren't integers supposed to be unsigned?
 
Updated post #2 to include framebuffer info for Sandy Bridge, Ivy Bridge, Haswell, Broadwell, Skylake, Kaby Lake, Coffee Lake, Cannon Lake and Ice Lake.

Also Intel FB-Patcher has been updated to support the above. Again big thanks to vit9696 for all his work without which this would not be possible.
 
Back
Top