Contribute
Register

[Guide] Intel Framebuffer patching using WhateverGreen

Joined
Dec 26, 2015
Messages
38
Motherboard
MSI H310M Pro - VH
CPU
i3 8100
Graphics
UHD 630 / GT 610
Mac
  1. iMac
Mobile Phone
  1. iOS
Hello everyone,
I installed Mojave in DELL DESKTOP INSPIRON 3470
(i3-8100, RAM 4GB, UHD 630) - 2 connectors VGA and HDMI
- can not set DVMT
- worked: realtek erthenet, audio (sometimes work and not work), CPU, usb...
----
I try to patch my UHD 630 with lastest Lilu and WEG.
when BOOT seem iGPU loaded but no signal for connector (HDMI).
black screen show with sound when click keyboard (seem loaded to login form but no signal to HDMI)
I tried some config file but not work
----
hackintool show headless device id


Try using the VGA. If that port works and has acceleration, it means you need connector patching. You can try the connector patches in my config.plist but before that I would suggest you download latest LILU and WateverGreen first and see if that does it. If hackintosh is booting, you are halfway there. Otherwise if you cant get acceleration on HDMI you can find a cheap Rx 470/570 on ebay for 100$ which will pretty much work for a long time.
 
Joined
Jan 11, 2018
Messages
126
Motherboard
Razer Blade Stealth 2019
CPU
i7-8565U
Graphics
UHD 630/ MX 150
Mac
  1. iMac
  2. Mac mini
Mobile Phone
  1. Android
  2. iOS
You will have to download an older version of the BIOS and flash that. That may be risky and might brick it.

What I would suggest to try is pickup a cheap HDD (like a 5$ 20GB HDD would do it) and use the HDD to boot using SATA. This way you can use the latest BIOS too and get around the USB issue hopefully. Its sad MSI has decided to do this because this will break any USB booting for hackintosh I believe. There must be a setting on higher end boards but there is nothing for H310. Or you could order an m.2 SATA if you can find one for cheap on ebay since your board has that support.

The suggestion to use an SSD to boot off of is genius, but I don’t think thats going to make too much of a difference. I had a working hack installed on the boot SSD. I flashed the BIOS thinking an update would address my framebuffer issues, and I found that after the flash booting was painfully slow. The progress bar below the Apple logo was crawling like I was booting off a USB and when it finally hits the end it just stays there and wont continue on to macOS.

Is it possible that the latest BIOS version conflicts with any of the UEFI drivers? Up to this point it was pretty much a sure thing to use osxaptio free and emuvariable when using MSI B360m boards but maybe that's no longer the case after the update?

Im just throwing around random ideas here though, I'm not an experienced at hackintoshing.
 
Joined
Dec 10, 2014
Messages
39
Motherboard
Lenovo ideapad 700-15ISK-Clover
CPU
i7-6700HQ/HM170
Graphics
HD530 + GTX 950M, 1920x1080
Mobile Phone
  1. iOS
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.

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 download the official release 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)

Spoofing Intel CPU Gen
If you need to spoof a different Intel CPU generation you can use the lilucpu=N boot flag. The N refers to the following Intel generations:
Code:
4    Sandy Bridge
5    Ivy Bridge
6    Haswell
7    Broadwell
8    Skylake
9    Kaby Lake
10    Coffee Lake

To spoof a CPU you will need to set a valid device-id in your GPU entry in Devices/Properties for the appropriate Intel generation.

Eg. Spoofing Skylake (lilucpu=8 boot flag with device-id=0x16190000), Kaby Lake (lilucpu=9 boot flag with device-id=0x12590000).

Here are some recommended frames:

Gen 2: Sandy Bridge (Intel HD Graphics 2000/3000)
- S/L/E/AppleIntelSNBGraphicsFB.kext
- Support started with OS X 10.7.x and ended with macOS 10.13.6
- Metal support is not available
- device-id: 0x0102 0x0106 0x010A 0x0112 0x0116 0x0122 0x0126
- AAPL,snb-platform-id (desktop): 0x00030010 (default)
- AAPL,snb-platform-id (laptop): 0x00010000 (default)

Gen 3: Ivy Bridge (Intel HD Graphics 2500/4000)
- S/L/E/AppleIntelFramebufferCapri.kext
- Support started with OS X 10.8.x
- device-id: 0x0152 0x0156 0x0162 0x0166
- AAPL,ig-platform-id (desktop): 0x0166000A (default), 0x01620005
- AAPL,ig-platform-id (laptop): 0x01660003 (default), 0x01660009, 0x01660004

Gen 4: Haswell (Intel HD Graphics 4200-5200)
- S/L/E/AppleIntelFramebufferAzul.kext
- Support started with OS X 10.9.x
- device-id: 0x0D26 0x0A26 0x0A2E 0x0D22 0x0412
- AAPL,ig-platform-id (desktop): 0x0D220003 (default)
- AAPL,ig-platform-id (laptop): 0x0A160000 (default), 0x0A260005 (recommended)

Gen 5: Broadwell (Intel HD Graphics 5300-6300)
- S/L/E/AppleIntelBDWGraphicsFramebuffer.kext
- Support started with OS X 10.10.2
- device-id: 0x0BD1 0x0BD2 0x0BD3 0x1606 0x160E 0x1616 0x161E 0x1626 0x1622 0x1612 0x162B
- AAPL,ig-platform-id (desktop): 0x16220007 (default)
- AAPL,ig-platform-id (laptop): 0x16260006 (default)

Gen 6: Skylake (Intel HD Graphics 510-580)
- S/L/E/AppleIntelSKLGraphicsFramebuffer.kext
- Support started with OS X 10.11.4
- device-id: 0x1916 0x191E 0x1926 0x1927 0x1912 0x1932 0x1902 0x1917 0x193B 0x191B
- AAPL,ig-platform-id (desktop): 0x19120000 (default)
- AAPL,ig-platform-id (laptop): 0x19160000 (default)

Gen 7: Kaby Lake (Intel HD Graphics 610-650)
- S/L/E/AppleIntelKBLGraphicsFramebuffer.kext
- Support started with macOS 10.12.6
- device-id: 0x5912 0x5916 0x591B 0x591C 0x591E 0x5926 0x5927 0x5923 0x87C0
- AAPL,ig-platform-id (desktop): 0x59160000 (default)
- AAPL,ig-platform-id (laptop): 0x591B0000 (default)

Gen 8: Coffee Lake (Intel UHD Graphics 630)
- S/L/E/AppleIntelCFLGraphicsFramebuffer.kext
- Support started with macOS 10.13.6 (17G2112) / 10.14 beta 4 (18A336e)
- device-id: 0x3E9B 0x3EA5 0x3E92 0x3E91
- AAPL,ig-platform-id (desktop): 0x3EA50000 (default), 0x3E9B0007 (recommended)
- AAPL,ig-platform-id (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 for 4K users who experience graphical glitches (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-camellia
framebuffer-flags

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 Hackintool 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 Hackintool File->Import->IOReg Dump menu

3. Using Hackintool Framebuffer->macOS 10.14 menu

Debug Output
To get debug output from Lilu use the -liludbgall liludump=60 boot flags. You will need to compile Lilu and WhateverGreen as debug for both of these flags to work. Log files should be located at /var/log/Lilu_*.

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

Getting Help
To help the users of this forum diagnose issues with your configuration please generate a Lilu debug log and then run gen_debug.sh to generate a folder of debug files you can attach to a forum post requesting help.

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

Hi there.
I'm trying to fix graphics for my fresh-installed macOS Mojave.
I did everything according to the guide but get stuck at the first boot screen (stuck at the line with plus characters, see attachments).

I have an Intel HD 530 with device-id: "0x191b" (from the system report of my current 10.13.6 hack).
I also attached my clover folder.
Am I missing something?

I'll appreciate your help.
Thanks.
 

Attachments

  • system_report.png
    system_report.png
    256.6 KB · Views: 104
  • config_devices.png
    config_devices.png
    76.8 KB · Views: 104
  • stuck_at_boot.JPG
    stuck_at_boot.JPG
    1.8 MB · Views: 116
  • CLOVER.zip
    7.8 MB · Views: 66
Joined
Jan 11, 2018
Messages
126
Motherboard
Razer Blade Stealth 2019
CPU
i7-8565U
Graphics
UHD 630/ MX 150
Mac
  1. iMac
  2. Mac mini
Mobile Phone
  1. Android
  2. iOS
Can you upload your config.plist? Be sure to remove serial numbers from SMBIOS section of the file.

I didn't know that removing serial numbers from the SMBIOs section was a step and can't find it in the instructions either. Is that something you discovered while tinkering?

Anyways I gave up on trying to get the iGPU working with full acceleration via this framebuffer method. I foudn a good deal on an rx 550 and installed it instead.
 
Joined
Dec 26, 2015
Messages
38
Motherboard
MSI H310M Pro - VH
CPU
i3 8100
Graphics
UHD 630 / GT 610
Mac
  1. iMac
Mobile Phone
  1. iOS
I didn't know that removing serial numbers from the SMBIOs section was a step and can't find it in the instructions either. Is that something you discovered while tinkering?

Anyways I gave up on trying to get the iGPU working with full acceleration via this framebuffer method. I foudn a good deal on an rx 550 and installed it instead.


Good for you. If you have gotten it to work now, it wasn't the BIOS ... Somewhere I read MSI boards no longer need the 2000 efi and instead osxaptiofix3drv works now ... not sure haven't tried it yet but will do that .... however USB boot still remains the issue so having an extra SSD/HDD is now a must for MSI boards with that issue if using the latest BIOS , I hope MSI fixes that , because the release notes specifically say they made changes to USB functionality ... I am hoping its a bug and not a feature ...
 
Joined
Nov 10, 2018
Messages
15
Motherboard
ASRock B360M-ITX/ac
CPU
i5-8400
Graphics
HD 630
Mac
  1. MacBook Pro
I didn't know that removing serial numbers from the SMBIOs section was a step and can't find it in the instructions either. Is that something you discovered while tinkering?

It's not, it's just a precaution to make sure noone else uses your serial number.

Anyways I gave up on trying to get the iGPU working with full acceleration via this framebuffer method. I foudn a good deal on an rx 550 and installed it instead.

And you got that to work? Only the RX560 should work as far as I know, because the 550 hasn't been used in a real Mac.
 
Joined
Jan 11, 2018
Messages
126
Motherboard
Razer Blade Stealth 2019
CPU
i7-8565U
Graphics
UHD 630/ MX 150
Mac
  1. iMac
  2. Mac mini
Mobile Phone
  1. Android
  2. iOS
Good for you. If you have gotten it to work now, it wasn't the BIOS ... Somewhere I read MSI boards no longer need the 2000 efi and instead osxaptiofix3drv works now ... not sure haven't tried it yet but will do that .... however USB boot still remains the issue so having an extra SSD/HDD is now a must for MSI boards with that issue if using the latest BIOS , I hope MSI fixes that , because the release notes specifically say they made changes to USB functionality ... I am hoping its a bug and not a feature ...

Sorry I confused you with my 2 posts. I have 2 boards one I updated to the latest Bios which I have kept in windows the other I left in its OOB Bios which is what I decided to just use with an rx580.

I might try installing Mojave on the board with the updated Bios again but probably not til I find a cheap boot drive. I still don't think it had issues with USB since clover loads and I get to the loading screen albeit progressing unbelievably slow...
 
Joined
Jan 11, 2018
Messages
126
Motherboard
Razer Blade Stealth 2019
CPU
i7-8565U
Graphics
UHD 630/ MX 150
Mac
  1. iMac
  2. Mac mini
Mobile Phone
  1. Android
  2. iOS
It's not, it's just a precaution to make sure noone else uses your serial number.



And you got that to work? Only the RX560 should work as far as I know, because the 550 hasn't been used in a real Mac.

Mistyped its an RX 580 Sapphire Nitro+ forgive my fat fingers :(
 
Joined
Dec 10, 2014
Messages
39
Motherboard
Lenovo ideapad 700-15ISK-Clover
CPU
i7-6700HQ/HM170
Graphics
HD530 + GTX 950M, 1920x1080
Mobile Phone
  1. iOS
Hi there.
I'm trying to fix graphics for my fresh-installed macOS Mojave.
I did everything according to the guide but get stuck at the first boot screen (stuck at the line with plus characters, see attachments).

I have an Intel HD 530 with device-id: "0x191b" (from the system report of my current 10.13.6 hack).
I also attached my clover folder.
Am I missing something?

I'll appreciate your help.
Thanks.
I also tried with 19MB stolen and 9MB fbmem (both with 0x19160000 & 0x0191b0000) but no luck (it stuck at boot).
This graphic problem took me many hours of work without any success :'(
I tried almost every possible way, but still no luck to get full graphics (QE/CI) to work.
Can someone please check my previous post (that I quoted in this post) and help me?
Did anybody successfully applied this patch?
 

CaseySJ

Moderator
Joined
Nov 11, 2018
Messages
20,681
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
Hi there.
I'm trying to fix graphics for my fresh-installed macOS Mojave.
I did everything according to the guide but get stuck at the first boot screen (stuck at the line with plus characters, see attachments).

I have an Intel HD 530 with device-id: "0x191b" (from the system report of my current 10.13.6 hack).
I also attached my clover folder.
Am I missing something?

I'll appreciate your help.
Thanks.
I also tried with 19MB stolen and 9MB fbmem (both with 0x19160000 & 0x0191b0000) but no luck (it stuck at boot).
This graphic problem took me many hours of work without any success :'(
I tried almost every possible way, but still no luck to get full graphics (QE/CI) to work.
Can someone please check my previous post (that I quoted in this post) and help me?
Did anybody successfully applied this patch?
If you are experiencing a freeze at "End Randomseed" then it's most likely fixable as follows:

Option 1:
  • In BIOS, enable "Above 4G Decoding".
  • Does the system boot up now?
  • If not, try Option 2.
Option 2:
  1. Open the driversUefi64 folder on the EFI partition of your Mojave SSD (not USB install disk).
  2. Which memory fix driver are you using?
    • AptioMemoryFix-64?
    • OsxAptioFixdrv?
    • OsxAptioFix2drv?
    • OsxAptioFix3drv?
    • OsxAptioFix2Drv-free2000? <-- this one can be downloaded from bullet #3 here.
  3. First, make sure only 1 of these drivers is in the folder. If you have 2 or more, delete all but 1.
  4. Run Clover Configurator, open your config.plist, go to the Boot section and check-on slide=0
  5. Save the file and reboot.
  6. Does the system boot up now?
  7. If not, repeat steps 1-6, but use a different memory fix driver. And try each one with and without slide=0.
 
Top