Recently Browsing 0 members
No registered users viewing this page.
Framebuffer patching in Mojave
Binary patching framebuffers in Clover is no longer a viable method in Mojave. The good news is vit9696 and I have created a new framebuffer patching system for 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 or download a pre-created installer from here or here.
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.
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.
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.
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:
$ gfxutil -f IGPU DevicePath = PciRoot(0x0)/Pci(0x2,0x0) We have two different types of patches:
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-conX-enable (required to enable below) framebuffer-conX-index framebuffer-conX-busid framebuffer-conX-pipe framebuffer-conX-type framebuffer-conX-flags Find / Replace
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)
- NOTE: The values are in bytes so you should convert MB to bytes (you can use this online converter)
<key>Devices</key> <dict> <key>Properties</key> <dict> <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> </dict> </dict> - Pipe / Port Count 3 to 2
- Connector 1 (BusId 0x4) DP to HDMI
- Connector 2 (BusId 0x6) Disable
- NOTE: WhateverGreen will automatically set all connectors from DP->HDMI (you can use -igfxnohdmi boot flag to disable this)
<key>Devices</key> <dict> <key>Properties</key> <dict> <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-pipecount</key> <integer>2</integer> <key>framebuffer-portcount</key> <integer>2</integer> <key>framebuffer-con1-enable</key> <integer>1</integer> <key>framebuffer-con1-type</key> <integer>0x00000800</integer> <key>framebuffer-con2-enable</key> <integer>1</integer> <key>framebuffer-con2-type</key> <integer>-1</integer> </dict> </dict> </dict> Here is an example of the Find / Replace method:
<key>Devices</key> <dict> <key>Properties</key> <dict> <key>PciRoot(0x0)/Pci(0x2,0x0)</key> <dict> <key>AAPL,ig-platform-id</key> <data>CQClPg==</data> <key>framebuffer-patch0-enable</key> <integer>1</integer> <key>framebuffer-patch0-find</key> <data>AAAIAAIAAACYAAAA</data> <key>framebuffer-patch0-replace</key> <data>AAAIAAIAAACHAQAA</data> </dict> </dict> </dict> Debugging
If you need a dump of your framebuffers in binary use the boot flag -igfxdump. The output will be in /AppleIntelFramebuffer_GEN_KERNX_Y on your boot drive (Eg. AppleIntelFramebuffer_10_17.7). Intel FB-Patcher can open this file and generate a config.plist/Devices/Properties patch for Clover. 010 Editor can also parse this file using the IntelFramebuffer.bt template.
To get debug output from WhateverGreen please and use the -wegdbg boot flag. You will need to compile WhateverGreen as debug for both of these flags to work.
To view debug output use:
log show --predicate 'process == "kernel" AND (eventMessage CONTAINS "WhateverGreen" OR eventMessage CONTAINS "Lilu")' --style syslog --source --last boot Thanks
Big thanks to vit9696 for all his help implementing this and also writing the amazing Lilu and WhateverGreen plugin. Also thanks to all the other contributors.
What works? Everything. Sleep/Wake, NVMe, Airport, Spotlight, AMD-graphics
ASUS Prime B250M-C µATX-board
Intel Core i5 7500 (Kaby Lake)
Gigabyte Radeon RX560 4GB
Airport-compatible PCIe-Card for Wifi and Bluetooth (BCM943602CS)
2 NVMe drives: Samsung P961 with 1 TB and 256 GB
Installed mac OS: 10.13.2
Added new config.plist and ssdt for AMD injection (config_amd_ssdt_10133.zip). With this config and Intel IGPU activated you'll get Metal2 (macOS GPUFamily1 v3). What did I do? Had to fake Skylake graphics or to prevent apps like iMovie or FinalCut from crashing. With Kabylake kexts loaded and IGPU as secondary graphics card, the computer will hard reset whenever the Intel GPU is utilised. Only Skylake kexts and activated IGPU will give you working Metal2 for the RX560.
Since this update a new approach is advisable to get the RX560 up and running (works for 10.13.1 and GM as well). I've added a working SSDT and injector kext that gives you graphics and HDMI audio. Sleep works fine too if you add the DSDT I compiled.
Credits go to @Toledo @Mork vom Ork and @Mieze because their work made this possible.
*Update* I've added NEW config.plist and DSDT. For proper graphics power management you have to activate onboard graphics in BIOS but make PCIE the primary display. Furthermore you have to inject ig-platform-id 0x59120003 and let Clover patch GFX0 to IGPU. This is the only way to avoid crashes of iMovie, FinalCut or slowdowns after video playback.
This may be the smoothest Hackintosh of my life. It is easier than Sierra install due to native support for most of the used hardware in High Sierra. Not much to do, using an up-to-date Clover version like 4184. Make sure you have apfs.efi in /Clover/drivers64UEFI/ on your EFI partition and that you delete EmuVariableUEFi.efi (downside: iMessage doesn't work without it). Somehow Rehabman's SSDT in /Clover/ACPI/patched helps avoiding crashes in iTunes.
Needed kexts (on your EFI into /Clover/kexts/Other): FakeSMC, IntelMausiEthernet for ethernet, USBInjectAll and XHCI-200-series-injector for USB, Lilu and AppleALC for audio, Whatevergreen for AMD graphics, IntelGraphicsFixup and AMD9xxxControllerPatcher.kext.
DSDT and SSDT go into EFI/Clover/ACPI/patched.
Greetings! I've been wrestling with this build for about a week now and have it near golden, but I am struggling with the Nvidia graphics card; I purchased the GeForce Gtx 1060 6GB SSC because is was recommended as the go-to card by the TonyMacx86 community on all of their Customac builds, but there doesn't seem to be much support for the card itself. I understand that Nvidia web drivers are relatively new and come with their own issues but I am reaching out to see if anyone has managed to squash these bugs.
Asus ROG STRIX Z370-E Intel Core i7-8700k EVGA Nvidia GeForce GTX 1060 6GB SSC (3) Elite Display E221 (3 Display Port)
The setup is based on Glasgood's build with the following alterations:
BIOS SettingsPRIMARY DISPLAY = PCIE Clover Kexts Installed to EFI/Clover/Kexts/Other Lilu.kext 1.2.1 NvidiaGraphicsFixUp.kext 1.2.1 DSDT Z370-F (Near identical board to the Z370-E with the exception of the WIFI M.2, but I use a native apple wifi/bluetooth PCI-E card) Custom DSDT by @MaLd0n System Drivers Nvidia Web Driver 318.104.22.168.25.102 (17C88) 322.214.171.124.25.103 (17C89) 3126.96.36.199.25.104 (17C205) Nvidia CUDA387.99 ISSUES
[FIXED] System wont boot into GUI while multiple monitors are connected SOLUTION [bIOS] Update to v0606 [macOS] Update Nvidia Web Driver to 3188.8.131.52.25.103 (17C89) [FIXED] Glitching and Artifacts during system utilization, randomly SOLUTION See Issue 1 [bUG] Glitching and Artifacts when waking from sleep while one monitor is in use. WORKAROUNDS Turn the monitor OFF and then back ON again Log out and back in again (use the keyboard shortcut "Shift + Opt + Cmd + Q") [bUG] Black screens when waking from sleep while multiple monitors are in use; no recovery. NO SOLUTION [FIXED] Stuck at BIOS loading screen when booting up while multiple monitors are in use; no recovery. SOLUTION [bIOS] PRIMARY DISPLAY = PCIE [bUG] RehabMan's FakeSMC_GPUSensors.kext is not reporting correctly (static/maxed values) NO SOLUTION
ATTEMPTS MADE, NO SOLUTION
Custom DSDT Disable Hibernate sudo pmset -a hibernatemode 0 sudo rm /private/var/vm/sleepimage sudo touch /private/var/vm/sleepimage sudo chflags uchg /private/var/vm/sleepimage Updated to the latest version of macOS10.13.2 (17C205) Updated to the latest kexts NvidiaGraphicsFixUp.kext v1.2.1 Lilu.kext v1.2.1 Updated to the latest version of Nvidia Web Driver & Cuda Driver104 (17C205) config.plist.zip
My Laptop is using ALC 292 and it is runnning: AppleALC.kext, CodecCommander.kext. Thoese kexts work fine for me on MacOS 10.31.1/10.12.x
After update to 10.13.2 my headphone have no sound, The icon switched when jack plug-in but phone have no sound. The internal speaker and HDMI jack work fine for me.
Would you please help? Thank you in advance