Contribute
Register

[Guide] Intel Framebuffer patching using WhateverGreen

Joined
Apr 8, 2017
Messages
90
Motherboard
Asus Q170T
CPU
Intel Core i7-6700T
Graphics
HD 530
Mac
  1. iMac
  2. MacBook Pro
Classic Mac
  1. Power Mac
All good, followed the guide and got my HD 530 running with Whatevergreen!
 
Last edited:
Joined
Apr 19, 2012
Messages
43
Motherboard
Zotac ZBox MI551
CPU
i5-6400T/H170
Graphics
HD 530
Mac
  1. iMac
Mobile Phone
  1. iOS
Hello everyone! Great work you people do around here!
I successfully patched the audio, but I can't sort out my HD530. I cannot dump my Framebuffer (10.14.1)
If I use the 10.4 Framebuffer from FB-Patcher, I get the PlatformId 0x19120000 and put it on my config.plist.
I always get a KP. I can only boot if I put PlatformId 0x12345678. Any thoughts?
What am I doing wrong? What patches should I select on FB Patcher?
Thanks in advance

Screenshot 2018-11-29 at 20.31.45.png
 
Last edited:
Joined
Aug 28, 2018
Messages
18
Motherboard
Gigabyte H370M-D3H
CPU
i5-8400
Graphics
UHD 630 & GTX 980
I can't get any HDMI signal on my Gigabyte h370m D3H with a i5 8400. This is what I get when I boot with my platform-id set to
07009B3E using remote login. Should I change it to 0x3e92 ? Also, I cannot figure out how to identify which port is which on my motherboard. I have HDMI, DVI and VGA. Ideally I guess I would disable all other and set it correctly to HDMI but it appears they're all already set to HDMI, which is odd. Any hints appreciated...

upload_2018-11-30_17-4-40.png



upload_2018-11-30_17-3-31.png
 

Attachments

  • upload_2018-11-30_17-2-25.png
    upload_2018-11-30_17-2-25.png
    523.1 KB · Views: 75
  • upload_2018-11-30_17-3-23.png
    upload_2018-11-30_17-3-23.png
    523.1 KB · Views: 74
Joined
Aug 24, 2015
Messages
194
Motherboard
Asus ROG Z590-i Gaming
CPU
i9-11900K
Graphics
RX 6900XT
Mobile Phone
  1. iOS
Gen 8: Coffee Lake (Intel UHD Graphics 630)
- Support started with macOS 10.13.6 (17G2112) / 10.14 beta 4 (18A336e)
- Desktop: 0x3EA50000 (default), 0x3E9B0007 (recommended)
My system with desktop coffee lake UHD 630 + Vega not booting with those, with 0x3E920003 booting very well.
 
Joined
Dec 1, 2018
Messages
1
Motherboard
gigabyte z370n wifi
CPU
i5 9600k
Graphics
igfx intel uhd 630
Hi all. Good luck 4 all u guys. Can anyone help an old newbie to fix igfx intel uhd 630 from i5 9600k in Mojave 10.14.0? it only shows 7MB. I don't have space for one video card.
Mind is blowing in the wind with so many hard info, but i'm a bit little brave. Forgive me anything.
Gigabyte Z370N WIFI
i5 9600k
 

Attachments

  • Captura de Tela 2018-11-29 às 08.07.32.png
    Captura de Tela 2018-11-29 às 08.07.32.png
    223.5 KB · Views: 206
  • config.plist
    8.7 KB · Views: 114
Joined
Aug 28, 2018
Messages
18
Motherboard
Gigabyte H370M-D3H
CPU
i5-8400
Graphics
UHD 630 & GTX 980
I finally figure out how to get HDMI signal on my Gigabyte h370m D3H with a i5 8400. I used someone's properties from an ASUS prime h370m. There are a lot of changes which can be seen here.
Original:
upload_2018-11-30_23-53-50.png


applying current patches:

upload_2018-11-30_23-55-10.png


Lots of things changed. While I am very grateful to get this up and running I'm really curious how I could have debugged things to eventually get to this solution. If anyone could point me to the workflow that would be fantastic!
 

Attachments

  • upload_2018-11-30_23-54-19.png
    upload_2018-11-30_23-54-19.png
    45.6 KB · Views: 85
  • upload_2018-11-30_23-54-49.png
    upload_2018-11-30_23-54-49.png
    45.6 KB · Views: 71
Joined
Aug 23, 2017
Messages
92
Motherboard
ASUS S451LB
CPU
i3-4010U
Graphics
HD 4400 / GT 740M
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
Framebuffer patching in Mojave
Binary patching framebuffers using KextsToPatch in Clover is no longer a viable method in Mojave for Skylake and above. Now you need to use Lilu + WhateverGreen.

Not just for Mojave
This method of framebuffer patching is not only required for Mojave we recommend it for all previous and future releases of macOS.

Coffee Lake Users
Please note that the new WhateverGreen will not work with fake Kaby Lake platform-id's. You will need to have either macOS 10.14 Beta 4 (18A336e) or macOS High Sierra 10.13.6 (17G2112). The latter is a special build only available to MacBookPro15,1 or MacBookPro15,2 board id's. You can create a macOS High Sierra 10.13.6 (17G2112) installer by running installinstallmacos.py. (Update: vit9696 added back ability to fake Kaby Lake platform-id's)

Lilu + WhateverGreen
WhateverGreen is going to replace all the other video patching plugins for Lilu (it currently has merged WhateverGreen, IntelGraphicsFixup, NvidiaGraphicsFixup, Shiki and CoreDisplayFixup). Others will likely follow (such as AppleALC, HibernationFixup and IntelGraphicsDVMTFixup). This is aiming to be the all-in-one solution for video.

Beta Warning
Please note that it is currently in a "beta" state so use it at your own risk. I am just documenting this here for those of you who want to get framebuffer patching now.

Preliminary
1. Remove:
- FakePCIID_Intel_HD_Graphics
- IntelGraphicsFixup
- NvidiaGraphicsFixup
- CoreDisplayFixup
- Shiki
2. Turn off all graphics injections in Clover:
- config.plist/Graphics/Inject/ATI=NO
- config.plist/Graphics/Inject/Intel=NO
- config.plist/Graphics/Inject/NVidia=NO
- config.plist/Graphics/ig-platform-id=
- config.plist/Devices/FakeID/IntelGFX=
Hj02qx9.png

3. Disable DSDT Clover fixes:
- AddHDMI
- FixDisplay
- FixIntelGfx
- AddIMEI
4. Disable UseIntelHDMI
5. Remove boot argument: -disablegfxfirmware
6. Remove any IGPU and HDMI entries from:
- config.plist/Devices/Arbitrary
- config.plist/Devices/Properties
- config.plist/Devices/AddProperties
7. Remove any IGPU and HDMI related SSDT and DSDT from:
- CLOVER/ACPI/patched
8. Renaming GFX0 -> IGPU
- WhateverGreen will do this automatically (see caveat below)
- Be aware that WhateverGreen does not rename all instances of GFX0 -> IGPU but should be okay in most cases
- You may need to include Clover GFX0 -> IGPU rename for other kexts or ACPI patching that require it

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.

Having trouble compiling?
If you're having trouble compiling you can wait for the official binaries or download my (unsupported) build_lilu.sh shell script and run it in a folder to download and build Lilu + WhateverGreen using Xcode automatically. I recommend you try the debug versions first (place them into Clover's EFI/Clover/kexts/Other folder).

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)

ig-platform-id
For the AAPL,ig-platform-id (AAPL,snb-platform-id for Sandy Bridge) entry Clover requires this value to be in Data format so you need to reverse the bytes. So if you want your platform-id to be 0x3EA50009 first reverse the bytes (0900A53E) then use Xcode's plist editor to add the values to Clover's config.plist.
DvVuglJ.png


What ig-platform-id should I use for my system?
You should choose one that is the closest match to your system. I recommend you do some research on this before choosing one. See post #2 for available options.

You can determine the generation of your CPU by the first digit after the hyphen.
Examples:
- Intel(R) Core(TM) i5-2760QM (Gen 2)
- Intel(R) Core(TM) i7-5257U CPU @ 2.70GHz (Gen 5)
- Intel(R) Core(TM) m3-6Y30 (Gen 6)
- Intel(R) Core(TM) i5-8350U (Gen 8)

Here are some recommended frames:

Gen 2: Sandy Bridge (Intel HD Graphics 2000/3000)
- Support started with OS X 10.7.x and ended with macOS 10.13.6
- Metal support is not available
- Desktop: 0x00030010 (default)
- Laptop: 0x00010000 (default)

Gen 3: Ivy Bridge (Intel HD Graphics 2500/4000)
- Support started with OS X 10.8.x
- Desktop: 0x0166000A (default), 0x01620005
- Laptop: 0x01660003 (default), 0x01660009, 0x01660004

Gen 4: Haswell (Intel HD Graphics 4200-5200)
- Support started with OS X 10.9.x
- Desktop: 0x0D220003 (default)
- Laptop: 0x0A160000 (default), 0x0A260005 (recommended)

Gen 5: Broadwell (Intel HD Graphics 5300-6300)
- Support started with OS X 10.10.2
- Desktop: 0x16220007 (default)
- Laptop: 0x16260006 (default)

Gen 6: Skylake (Intel HD Graphics 510-580)
- Support started with OS X 10.11.4
- Desktop: 0x19120000 (default)
- Laptop: 0x19160000 (default)

Gen 7: Kaby Lake (Intel HD Graphics 610-650)
- Support started with macOS 10.12.6
- Desktop: 0x59160000 (default)
- Laptop: 0x591B0000 (default)

Gen 8: Coffee Lake (Intel UHD Graphics 630)
- Support started with macOS 10.13.6 (17G2112) / 10.14 beta 4 (18A336e)
- Desktop: 0x3EA50000 (default), 0x3E9B0007 (recommended)
- Laptop: 0x3EA50009 (default)

Framebuffer Patching
WhateverGreen does most of the work automatically for you and in most cases you do not need any extra Framebuffer Patching. At the minimum though you should choose an ig-platform-id suitable for your system and place it in config.plist/Devices/Properties like this:
oXCZva9.png

Here are some reasons why you might need extra Framebuffer Patching:
- Setting DVMT for those who can't set it above 32 MB in BIOS (framebuffer-stolenmem / framebuffer-fbmem)
- Setting higher VRAM (framebuffer-unifiedmem)
- Disabling eGPU (disable-external-gpu)
- Enable pixel clock patch for 4K support (enable-hdmi20)
- Disabling connectors to enable sleep (framebuffer-pipecount / framebuffer-portcount / framebuffer-conX-type=-1)
- Removing CNConnectorAlwaysConnected flag for eDP laptop screens on < 10.13.6 (framebuffer-con0-flags=0x00000090)
- Changing connector types to match your systems ports (framebuffer-conX-type)

Framebuffer Patching Types
We have three different types of patches:

1. Arbitrary (Recommended)
Code:
framebuffer-patch-enable (required to enable below)
framebuffer-framebufferid (optional; defaults to current platform-id)
(all below are optional)
framebuffer-mobile
framebuffer-pipecount
framebuffer-portcount
framebuffer-memorycount
framebuffer-stolenmem
framebuffer-fbmem
framebuffer-unifiedmem
framebuffer-cursormem (Haswell only)

framebuffer-conX-enable (required to enable below)
framebuffer-conX-index
framebuffer-conX-busid
framebuffer-conX-pipe
framebuffer-conX-type
framebuffer-conX-flags
2. All Data
Code:
framebuffer-conX-enable (required to enable below)
framebuffer-conX-alldata
3. Find / Replace
Code:
framebuffer-patchX-enable (required to enable below)
framebuffer-patchX-framebufferid (optional; defaults to current platform-id)
framebuffer-patchX-find
framebuffer-patchX-replace
framebuffer-patchX-count (optional; defaults to 1)

You should place your patches in config.plist/Devices/Properties in Clover config.plist.

Here are some example patches:
- 32MB BIOS, 19MB stolen (framebuffer) 9MB fbmem (cursor) 2048MB unifiedmem (vram)
QK4kfIi.png


- Pipe / Port Count 3 to 2
- Connector 1 DP to HDMI
- Connector 2 Disable
W4Pe0h9.png


Here is an example of the All Data method:
j7TxRLO.png


Here is an example of the Find / Replace method:
gDTGjBB.png


Framebuffer Dumps
There are two ways to dump your framebuffer data (both require WhateverGreen + Lilu debug versions):

1. Using -igfxdump boot flag to dump IGPU framebuffer kext to /AppleIntelFramebuffer_X_Y (root of your boot drive)

There are several ways of reading this dump:
- Using 010 Editor along with the IntelFramebuffer.bt template
- Using Intel FB-Patcher File->Open menu

2. Using -igfxfbdump boot flag to dump native and patched framebuffer table to ioreg at IOService:/IOResources/WhateverGreen

There are several ways of reading this dump:
- Using dump_platformlist.sh shell script
- Using Intel FB-Patcher File->Import->IOReg Dump menu

Debug Output
To get debug output from Lilu use the -liludbgall flag and for WhateverGreen use the -wegdbg boot flag. You will need to compile Lilu and WhateverGreen as debug for both of these flags to work.

To view debug paste the following into Terminal (weglog.txt will output to your home directory):
Code:
log show --predicate 'process == "kernel" AND (eventMessage CONTAINS "WhateverGreen" OR eventMessage CONTAINS "Lilu")' --style syslog --source --last boot >weglog.txt

Credits

- vit9696 and lvs1974 for WhateverGreen (Full Credits) and Lilu (Full Credits)
- Andrey1970 for his guide
- RehabMan for all data patching method, ioreg framebuffer dump and other contributions

My ihd 4400 by default its showing 1536 MB. If I apply framebuffer-unifiedmem to 00 00 00 80 and it change to 2048 MB. Is it a real performance or just a cosmetic (not increase the real performance) ?
 
Joined
Dec 5, 2011
Messages
10
Motherboard
Ga Z87MX-D3H
CPU
i5-4670K
Graphics
HD 4600
Mac
  1. iMac
  2. MacBook
Mobile Phone
  1. iOS
Any body can help to setup HD4600 in 4k mode?

Only have 2560 x 1440.

My setup:

CPU: Intel 4670K
MB: Gigabyte Z87MX-DH3
RAM: 24Gb
SO: 10.14

THX
 

Attachments

  • Captura de pantalla 2018-12-01 a las 16.44.06.png
    Captura de pantalla 2018-12-01 a las 16.44.06.png
    130.5 KB · Views: 118
Joined
Apr 19, 2012
Messages
43
Motherboard
Zotac ZBox MI551
CPU
i5-6400T/H170
Graphics
HD 530
Mac
  1. iMac
Mobile Phone
  1. iOS
Hello everyone. I'm getting frustrated. I cannot boot into High Sierra 10.13.6 ou Mojave 10.14.1 with my HD530 patched.
I'm on a zotac barebone with h170 board and a i5 6400T. When I apply the patch, I get a KP and reboot.
Help, anyone! :banghead::banghead::banghead:
 

Attachments

  • config.plist
    6.5 KB · Views: 120
  • Screen Shot 2018-12-01 at 20.41.30.png
    Screen Shot 2018-12-01 at 20.41.30.png
    257.1 KB · Views: 166
  • Screen Shot 2018-12-01 at 20.42.02.png
    Screen Shot 2018-12-01 at 20.42.02.png
    66.8 KB · Views: 202
  • Screen Shot 2018-12-01 at 20.42.13.png
    Screen Shot 2018-12-01 at 20.42.13.png
    75.7 KB · Views: 200
  • Screen Shot 2018-12-01 at 20.42.36.png
    Screen Shot 2018-12-01 at 20.42.36.png
    69.1 KB · Views: 199
  • Screen Shot 2018-12-01 at 20.42.57.png
    Screen Shot 2018-12-01 at 20.42.57.png
    86.6 KB · Views: 182
  • Screen Shot 2018-12-01 at 20.49.19.png
    Screen Shot 2018-12-01 at 20.49.19.png
    48.1 KB · Views: 179
  • Screen Shot 2018-12-01 at 20.49.29.png
    Screen Shot 2018-12-01 at 20.49.29.png
    52.6 KB · Views: 157
Top