Contribute
Register

An iDiot's Guide To Lilu and its Plug-ins

oops! I forgot to check that...
I DLed the file (no extension) but I'm not sure how to use it :oops:

Right-click or Ctrl-click on it and select Open With ... Terminal :thumbup:

The result is third line down and hopefully says: "Hardware acceleration is fully supported"

:)
 
View attachment 350539
An iDiot's Guide To Lilu and its Plug-in's
Last Update: 29th January 2019 (Correct typo's in DRM section)

Warning:
Make sure to use the latest version of Lilu and all plug-in's.



About this Guide

This guide is written as a helping hand to those users who have some understanding of using legacy hackingtosh methods but are considering using Lilu as a means to migrate to Mojave or using Lilu in place of traditional/legacy MacOS patching methods.

Before we go any further I should state for the record that I have no direct affiliation with Lilu, my first encounter with it was in early 2017 when i needed to resolve an issue with the refresh rate of the 4K display on my laptop. Since then I've followed its development and progress and I now consider Lilu to be one of the most useful tools in the Hackingtosh community toolbox.



What is Lilu ?

Lilu is a MacOS "Patching Engine " that allows for on-the-fly patching of the kernel and system extensions, Lilu offers a number of benefits over more traditional hackingtosh methods, in summary these are :-
  • Does not depend on a bootloader
  • Works in Recovery mode and the MacOS Installer
  • Supports a symbolic patching engine
  • Enables API access to the kernel and system extensions
  • Allows modification of running processes
Lilu has been around for a few years and much like when Clover first appeared on the scene it has taken a while for it to become mature and stable enough for mainstream use. On its own Lilu does nothing, it needs to be used with plug-in's.

Lilu has its own SDK meaning that anyone with the right skills can write a plug-in, as such it has gained a following of dedicated developers and users and has become the preferred 'Patching Engine' for many Hackingtosh gurus.

The three most popular Lilu plug-in's which we will discuss in this guide are:-
  • WhateverGreen --> Deals with patching the kernel and system extensions for GPU support (Intel/AMD/Nvidia)
  • AppleALC --> Dynamic patching of AppleHDA for non officially supported codecs
  • AirportBrcmFixup --> Various patches for Broadcom Airport Wi-Fi cards
Tip: Click on the above links to jump directly to the appropriate chapter in the guide.

Each of these plug-in's is covered in detail in its own section of this guide below, for a for a full list of all the available Lilu plug-ins and where to get them you can use this link.

Important Note: All of the above Lilu plug-in's are fully self contained solutions and will (in most cases) replace all legacy Clover patches and Injection/Enabler kext's for a plug-in's given purpose, as such you should remove any existing Clover patches and kext's that have been already installed for a plug-in's purpose ... for example when installing AppleALC you should remove (or disable) all Clover AppleHDA patches and uninstall any HDA Enabler, patching or dummy kext's. Failure to remove associated patches and kext's can result in unpredictable and often unstable results.

Each plugin has its own documentation and linked support threads that are usually detailed in the readme.md file or the Wiki on a plug-in's Git-Hub project page. You should familiarise yourself with these resources as they list the best places to get more specific help.

Binary releases of Lilu and plug-in's are downloaded by visiting the appropriate Git-Hub project and clicking on the Releases tab, you'll be shown the release history with the most recent version available at the top of page. Most users should download the latest Release version, in some rare cases you may need to download the Debug version or an earlier release.

In some very rare cases you may need to download Lilu's or a plug-in's source code and compile it yourself using Xcode, this will only need to be done when a specific fix or support for a new device has been added to the project and a public binary release is not yet available. When compiling a Plug-in you will need to copy the latest Debug version of Lilu into the project resources folder as all plugins need to be compiled against Lilu's API.

Lilu and its plug-in's can be used on any Hackingtosh system running MacOS Sierra or later and is recommended for MacOS Mojave.



How to Install

Lilu and it's plug-in's are provided as MacOS kext's and should all be installed in /Library/Extensions folder, you may read in some of the support threads of people installing everything in Clovers Kexts/Other folder but this should only be done for testing or development purposes. Installing them in /Library/Extensions will ensure that they are cached by the kernel and available to MacOS, this is the preferred and Apple endorsed location for all 3rd party MacOS kext's including FakeSMC. For a more detailed explanation of why we should install kexts in /Library/Extensions and not use Clover to Inject all the kexts see this guide.

Note: You should also have FakeSMC installed in Clovers Kexts/Other folder so that clover can inject FakeSMC if you need to boot the installer or MacOS recovery, this is the only kext you really need in Clovers Kexts/Other folder all other 3rd party kext's should be installed in /Library/Extensions.

You can download Lilu and the Plug-in's you need using the following links :-
Each link will take you to the appropriate Git-Hub page, click on "Releases" on the main page and download the latest release version, unzip each archive and copy all of the kexts into one place.

First we need to make sure that MacOS is allowed to load unsigned kexts/drivers ...

1. Make sure you have the boot argument kext-dev-mode=1 :-

386312

2. And that you set BooterConfig and CsrActiveConfig in Clover RTVariables section to the following values :-

386314

If your not familiar with using terminal/console commands to install kext's into the /Library/Extensions folder and rebuilding the caches then I recommend using the following method:-

Download KextBeast which is available in the downloads section, copy all the kext's you want to install onto the desktop and run the KextBeast pkg file, click on continue a few times, enter your admin password if prompted and accept the usual notices until you get the option to select the install target. Select /Library/Extensions and click on Continue.

View attachment 350155

KextBeast will install the kext's that you placed on the desktop into the target Extensions folder. Once KextBeast has done its work it will offer you the option of keeping the pkg or deleting it. I generally click on keep as i'm always trying new and different versions of kext's and KextBeast is a quick and easy way to do the job.

Once KextBeast has finished I recommend running version 2.6.6 of cVad's Kext Utility (click here to download) which will repair any broken kext permissions and rebuild the caches. Simply run the app and enter your admin password when prompted, then wait while Kext Utility does it's work. You will know when it's finished once you see "Quit" in black text at the bottom of the app window.

View attachment 359368
Note: Do not use Kext Utility to install Lilu and its plug-in's as it does not support installing kext's into /Library/Extensions, it does however do a much better job of repairing the kext permissions and rebuilding the caches than KextBeast.

Once Kext Utility has finished reboot your system.

For more information on installing kexts and why we use /L/E see the Install Kexts Guide.



WhatEverGreen

When it was first released WhatEverGreen only supported AMD GPU's, other GPU types such as Nvidia and Intel IGPU's along with some other display related patches where supported by Lilu using separate specific plug-ins. However, as of mid 2018 WhatEverGreen merges the existing AMD GPU Support with all of the following plugins:-
As such WhatEverGreen (WEG) is now the one-stop solution for all GPU and Display related MacOS patching.

Important: It should be noted that as of July 2018 all of the above plug-in's are depreciated and are no longer supported. Use of them in conjunction with WhatEverGreen or the current version of Lilu could result in Kernel Panics or abnormal MacOS behaviour.

For AMD and Nvidia users, WhatEverGreen contains a number of default fixes and patches such as the common black screen on boot up issue, simply installing WhatEverGreen should be enough to enable the DGPU and get things working, for more experienced users there are a number of optional boot arguments that can be used with AMD and Nvidia GPU's which are detailed in the WhatEverGreen readme.md and manual.

For IGPU only or mixed GPU (DGPU + IGPU) systems, WhatEverGreen offers us a quick and easy method of enabling and customising the IGPU for MacOS than the legacy methods of using Clover or customised Intel driver/framebuffer kext's.

Important: If you have a laptop with dual GPU's (DGPU + IGPU) with switched graphics, IE the DGPU is routed through the IGPU then you must disable the DGPU first before continuing, see RehabMans guide for more info.

Prerequisites

Installing WhatEverGreen will take care of renaming all of the required ACPI identities for us so if you have any of the following Clover ACPI Fixes/Renames in your config.plist you should remove or disable them:-
  • Change/Rename GFX0 to IGPU
  • Change/Rename PEG0 to GFX0
  • Change/Rename HECI to IMEI
The above Clover ACPI Fixes/Renames use a global/generic method of renaming the ACPI identities in the DSDT that can cause problems for us later on. WhatEverGreen finds the DSDT code that requires new ACPI identities using device specific identifiers and thus does a much better job.

Note: There is one exception to the above rule, if you have a laptop and are using @rehabmans method to enable the backlight control then you should keep the Change/Rename GFX0 to IGPU ACPI fix in place otherwise the code in the hot-patch SSDT-PNLF.aml will not work correctly.

WhatEverGreen Configuration

WhatEverGreen is configured using Device Properties, this is a relatively new method of defining custom properties in a devices ioreg directory tree using Clover and was added specifically at the request of the Lilu developers who work closely with the Clover developers.

For a bit more information on Device Properties see this post in the Clover dev blog.

A Device Property is defined in Clover's config.plist "Devices" section, a property consists of a name and a data value assigned against a device's PCI path. Both the PCI path and the property name(s) are defined as <key> types, the value of a property is defined as a base64 <data> type . You can add Device Properties by directly editing your config.plist file using a code or text editor, or you can use a plist editor such as Xcode or PlistEdit-Pro. Clover Configurator now also supports Device Properties, use whichever method you are most familiar with.

Getting the IGPU Device Properties

In order to find out which Device Properties and values are needed @headkaze has written a very handy little app for us called Hackingtool (formally called Intel FB-Patcher) that will generate the IGPU Device Properties patch code for you. Simply download, unzip and run Hackingtool, the first and most important thing to do is to check that the PlatformID is correct for your Intel IGPU.

View attachment 350131

Note-1: If Hackingtool correctly identifies your CPU Generation but the PlatformID drop down menu is empty and the Framebuffer and Connector tabs show no data then you should click on "FrameBuffer" in Hackingtool top menu and select the MacOS version you are using.

View attachment 355437

Note-2: If Hackingtool is unable to identify your CPU Generation automatically and you see ??? next to 'IntelGen' or Hackingtool incorrectly selects the wrong type of CPU then you can manually select the correct CPU Generation using the dropdown menu :-
View attachment 378880

Important: Hacking tool has recently gone through a change to its user interface, the examples in this guide are from the previous version of the UI. The only real difference is the top icon/menu now selects the mode for Hackingtool and the lower menu bar selects the sub-function of the mode. In the following examples you should use Hackingtool in the Intel IGPU mode which is the first icon on the top icon icon/menu and the sub function is now selected using the bottom menu (where as in the previous version the sub-function menu was at the top of the UI.
View attachment 384720
The first time you run Hackingtool it will detect your IGPU and select the default PlatformID for it, in many cases this will be wrong so we need to manually select the correct one. With the General tab selected, the type of IGPU detected will be displayed next to GPU Info and details of the the selected PlatformID and matching System Definitions (SMBIOS) will be displayed next to to Framebuffer Info. For example if I run the latest build of Hackingtool on my 2017 HP Spectre X360 laptop by default Hackingtool selects 0x591B0000 as a PlatformID and suggests MacBookPro 14,3 as the System Definition (SMBIOS) to use.

View attachment 361324
This shows conflicting information, the IGPU is correctly detected and displayed as a HD 620 IGPU in the GPU Info section but the Framebuffer Info shows that 0x591B0000 is for a HD 630 IGPU so we know that the default of 0x591B0000 would be a poor choice, we can change this by using the PlatformID dropdown menu to select the correct one, if you don't already know the PlatformID you need then select each one in turn from the drop down menu until you find one that matches your systems specification. For my HP Spectre X360 laptop I already know that I need 0x59160000 so i select it using the dropdown menu.

View attachment 361325
We can now see that the Framebuffer Info matches the GPU Info which in the case of my HP Spectre X360 laptop is a Mobile HD620 IGPU, and that the recommended System Definition (SMBIOS) is MacBookPro 14,2 which i'm already using.

Pro Tip: I recommend using Post#2 of @headkaze's guide which lists the complete details of each PlatformID along with IGPU specifics grouped in CPU Generation order. This will help you choose the correct PlatformID for your system, once you have identified the PlatformID you need you can select it using the Hackingtool PlatformID drop down menu.

Important: Always use the correct System Definition (SMBIOS) for the selected PlatformID, Hackingtool will in many cases display the recommended SMBIOS in the lower section of the General tab. Use of a non matching PlatformID and System Definition (SMBIOS) can result in abnormal MacOS behaviour.

Note: There are a few PlatformID's where Hackingtool will not list any recommend System Definitions (SMBIOS) or show "Unknown" next to "Model(s)" in the lower section of the General tab, this means that there are no matching Mac Models using that combination of CPU, IGPU & PlatformID however the IGPU PlatformID is still valid and should work. If possible I recommend selecting an alternative PlatformID that has a framebuffer that matches your IGPU and also has a recommended/matching System Definition (SMBIOS).

View attachment 362188View attachment 362189
If you can't find a PlatformID that matches your IGPU with a recommended System Definition (SMBIOS) it does not mean that things wont work, it just means that you'll have to take your best guess at finding the nearest matching SMBIOS to your Hackintosh hardware, a good tool that can help you make this decision is MacTracker or use Post#2 of @headkaze's guide.



Headless PlatformID's

Another reason that desktop users with dual (DGPU + IGPU) systems my want to over-ride Hackingtool suggested PlatformID is if you want to use your IGPU in headless mode.

Genuine desktop Mac's with dual GPU configurations such as most iMacs and some Mac Mini systems use a headless PlatformID to inform MacOS that the IGPU does not have any physical display connectors but it is still available to MacOS for IGPU hardware accelerated features such Airplay Display Mirroring and Video Encoding/Decoding (Intel Quick Sync)

Note: Systems with workstation class CPU's (Intel Xeon) do not have a IGPU as such you should not attempt to set a Headless PlatformID.

If you don't need to use a headless configuration, you can skip down to the next section titled WEG Configuration Continued.

Headless IGPU Configuration

If your primary display adaptor is a DGPU such as Nvidia or AMD and you have a supported IGPU then using a headless PlatformID will allow your Hackingtosh system to be more stable and behave much more like a genuine Mac with access to IGPU hardware accelerated features.. Use of this mode requires that the IGPU is enabled in your BIOS and that the DGPU is set as the primary display adaptor, you must also use the correct Mac System Definition (SMBIOS) that supports dual GPU configurations and matches your CPU & IGPU type.

Recommended desktop System Definitions (SMBIOS) for headless PlatformID's are :-
  • Coffee & Kaby Lake CPU = SysDef: imac18,x
  • SkyLake CPU = SysDef: imac17,x
  • Haswell CPU SysDef: imac14,x or imac15,x
  • Ivy Bridge CPU SysDef: imac13,x or macmini6,x
  • Sandy Bridge CPU = SysDef: imac12,x or macmini5,x
Note: If your CPU, IGPU and selected headless PlatformID match a known Mac Configuration Hackingtool will display the recommended System Definition(s) (SMBIOS) in the lower section of the General tab.

Currently known headless PlatformID's are :-
  • Coffee Lake CPU - Only for MacOS 10.13.6 (17G2112+) and 10.14.X
    • UHD-630 IGPU = 0x3E920003 or 0x3E910003
  • Kaby Lake CPU
    • HD-630 IGPU = 0x59120003
    • Unknown = 0x59180002 (not recommended)
  • SkyLake CPU
    • HD-510 IGPU = 0x19020001
    • GT2f IGPU = 0x19170001
    • HD-530 IGPU = 0x19120001
    • Iris Pro 580 = 0x19320001
  • Haswell CPU
    • HD-4600 IGPU = 0x04120004 or 0x0412000B
  • Ivy Bridge CPU
    • HD-4000 IGPU = 0x01620006 or 0x01620007
  • Sandy Bridge CP
    • HD-3000 IGPU = 0x00030030
You can confirm that a selected PlatformID is headless in Hackingtool by clicking on the Connectors tab, all entries should have the following values:-
  • index = -1
  • bus id = 0x00
  • pipe = 0
  • type = dummy
Additionally when using Hackingtool Version 1.71 onwards you should also see a 'Headless' Icon

Example using the Haswell headless PlatformID of 0x0412000B
View attachment 378877

Note-1: Headless IGPU mode only works well on dual GPU (DGPU + IGPU) desktop systems, it will not work on dual GPU laptops as both GPU's output to the same display panel, as such you should always disable the DGPU, see RehabMans guide for more info.

Note-2: As already stated, use of a headless PlatformID is only guaranteed to work when used in-conjunction with one of the recommended Mac System Definitions (SMBIOS), use of other System Definitions may result in an unstable system.

Note-3: When using a headless PlatformID the IGPU will no longer show up in System Information even though it is enabled in your BIOS, this is normal and is one way of confirming that the headless IGPU mode is activated.

Note-4: If your system is equipped with one or more working Thunderbolt 3 port(s) and you have dGPU + Headless IGPU then you will need to enable the "Above 4G Decoding" option in your motherboards BIOS.

Note-5: If you want to check everything is correct then use IORegistryExplorer and search for "IGPU", you should see the IGPU entry with AAPL, ig-platform-id set to the headless PlatformID (in reverse byte order) and a matching model description :-

View attachment 370429

Note-6: You can check which codec's Intel Quick Sync supports on your IGPU using the demo (or full) version of VideoProc. Once installed open VideoProc and click on the Setting icon on the main page, then click on the Options button next to "Hardware accelerate engine" :-

View attachment 370606

You should see something like this:-

View attachment 370571

Sandy Bridge CPU's and above will support hardware H.264 encode and decode, if you have Kaby Lake or later then you should also see hardware support for HEVC (H.265).

You can also use the attached VDADecoderChecker App to confirm that your IGPU is configured correctly for hardware video decoding.



WEG configuration Continued

You can work through the other tabs and options in Hackingtool to view all the currently selected settings and change any if needed. Most users wont need to change anything at this point but if you are curious about the settings WhatEverGreen uses for a particular PlatformID take a look at post#2 of the WEG guide.

When everything is how you want it, click on the Patch tab and then on the Generate Patch button. In a lot of cases WhatEverGreen only needs AAPL,ig-platform-id (or AAPL,snb-platform-id on Sandy Bridge systems) to be injected as a Device Property in order to get working video on the IGPU's default display. In the following example I've run Hackingtool on my 2017 HP Spectre X360 laptop which has an Intel HD-620 IGPU and is using a "PlatformID"of "0x59160000".

View attachment 350133

Examples Note-1: In some of these examples you will see the Device Property "device-id" which can be thought of as a IGPU generation identifier (it will always be the first two bytes of the PlatformID in reverse byte order followed by four zero's). The need to set/inject this property is in many cases not necessary, and some users have reported that it can cause problems which is why Hackingtool no longer automatically generates this value. However other users have reported that without this property their system does not work correctly so the need for it is on a by use basis. If you want Hackingtool to generate the patch code for the "device-id" Device Property you can do so by selecting the option in the Advanced sub-tab on the Patch page of Hackingtool.

Examples Note-2: You will also see a second PCI root path in the Clover Configurator and Plist Edit examples below, this is the PCI Root path of my Audio Codec and has nothing to do with with IGPU Device Properties - see the AppleALC section of the guide for more info.

You can now copy and paste the patch code snippet into your config.plist taking care to keep the correct <dict> structure, using the above example this is what the Device Properties patch code looks like in my config.plist.

Code:
<key>Devices</key>
    <dict>
        <key>Properties</key>
        <dict>
            <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
            <dict>
                <key>AAPL,ig-platform-id</key>
                <data>
                AAAWWQ==
                </data>
            </dict>
        </dict>
    </dict>

Note-1: This is only an example to show the correct structure, your config.plist will include additional lines of existing code.

Note-2: The data values generated by Hackingtool are base-64 encoded, if you use a Plist Editor or Clover Configurator to edit your config.plist then simply use the selected PlatformID value in Reverse Byte Order without the leading "0x" for example: if you want to use the PlatformID of 0x59120003 then ignore the leading "0x" and split the remaining value into four, two digit bytes = 59,12,00,03 then reverse the order = 03,00,12,59 so you would enter 03001259.

Note-3: On Sandy Bridge systems the name of the Device Property will be AAPL,snb-platform-id (not AAPL,ig-platform-id)

Here is an example of adding the above Device Property using PlistEdit-Pro :-

View attachment 350507

Alternatively you can use Clover Configurator :-
  1. Open Clover Configurator and load your config.plist and select the Devices section
  2. Towards the bottom of page you will see two tab buttons labelled Arbitrary and Properties
  3. Click on the Properties button
  4. Click on the "+" icon under the left panel
  5. Copy and paste the PCI path <key> value (starts with PciRoot) from the generated patch code into the "Devices" field
  6. Click on the "+" icon under the right panel
  7. Type in "AAPL, ig-platform-id" into the "Properties Key" field
  8. Type in your selected "PlatformID" value into the "Properties Value" (see Note-2 below)
This is what the Device Properties look like for the the above example in Clover Configurator :-

View attachment 350108

Note-1: When using Clover Configurator we define the PCI path of the IGPU in the left panel and the name and data value of each Device Property in the right panel.

Note-2: The value for AAPL, ig-platform-id is entered (and displayed) in Reverse Byte Order without the leading "0x" so for the above example of "0x59160000" the correct value is "00001659".

Important: All other Clover options for IGPU enabling and spoofing should be left blank/empty in the "Devices" section of your config.plist file.

For most users injecting the correct PlatformID for "AAPL,ig-platform-id" (and device-id in some cases) should be all that is required and WhatEverGreen will take care of patching everything else, however on some systems it may be necessary to further modify the framebuffer defaults in oder to get all of the IGPU ports/connectors working correctly. You can use Hackingtool to modify these more advanced settings and then generate updated patch code to add as additional Device Properties to your config.plist.

For more info on modifying the IGPU connector/port settings you should check out CaseySJ's excellent guide which covers the topic in more detail.

Important: As detailed in Headkaze's Guide remove all options in the "Graphics" section of your config.plist such as Inject Intel, ig-platform-id ... etc :-

View attachment 350109

You should also remove any DSDT edits or SSDT Hot Patches associated with the IGPU, everything else is taken care of by WhatEverGreen as long as it's one of the IGPU's listed in post#2 of the WEG guide, support for new IGPU PlatformID's will be added as they become available.

4K Displays

If you have a 4K display or video panel connected to the IGPU like i do on my laptop then you may need to add -cdfon as a MacOS boot argument, this enables the pixel-clock patches that used to be handled by the CoreDisplayFixUp plug-in (now depreciated) and generally allows for higher refresh rates on high DPI display panels.

View attachment 366999
You can also add the -cdfon argument using Clover Configurator :-

View attachment 350312

I also recommend increasing the IGPU's VRAM from the default value of 1536MB to the 2048MB maximum. Once again we can use Hackingtool to generate the patch code for us, on the Patch tab click on the Advanced button and check the VRAM 2048 MB option then click on Generate and copy and paste the patch code for the two additional Device Properties into your config.plist ... similar to what we did above for setting AAPL,ig-platform-id :-

View attachment 366987
Note: Increasing VRAM to 2048MB on 1080P displays will have no beneficial effect.

The following screen shot of PlistEdit Pro shows the Device Properties for the HD620 IGPU on my Laptop using a frame buffer of 0x59160000 with the optional device-id property and enabling the 2048MB VRAM patch, you can also see the raw patch code in the lower red box :-

View attachment 366997
And this is how it looks in Clover Configurator :-

View attachment 366998

Testing your Changes

Once you have made all the changes necessary to your Config.plist, save it and reboot, if you've followed the guide correctly you should now have your IGPU working. If you encounter problems check that you have installed the Kexts correctly as detailed in the How to Install section of this Guide. Another very common mistake is that the value for the Device Property AAPL,ig-platform-id (or AAPL,snb-platform-id on Sandy Bridge systems) has been entered incorrectly.

Once you have completed installing and configuring WhatEverGreen, next time you run Hackingtool it will display if the IGPU is using hardware acceleration for QE/CI and Metal Support :-

View attachment 378434

It's also advisable to check/test that WhatEverGreen has renamed the HECI device in your DSDT as IMEI and that it is active in the ioreg, run the following command in terminal :-

Code:
ioreg | grep IMEI


Terminal should report IMEI device path and the status, here is an example :-

Code:
    | |   +-o IMEI@16  <class IOPCIDevice, id 0x100000264, registered, matched, active, busy 0 (36 ms), retain 11>


As stated in the prerequisites section of this guide, WhatEverGreen should take care of sorting out the IMEI (Intel Management Engine Interface) , however in some very rare cases it appears that it can fail. If you get an error when performing the above test then use the Clover HECI -> IMEI Rename/Fix.

Code:
                <dict>
                    <key>Comment</key>
                    <string>change HECI to IMEI</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    SEVDSQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    SU1FSQ==
                    </data>
                </dict>


You can also use Clover Configurator to enable the HECI -> IMEI Rename/Fix.

View attachment 382970

DRM Content - Video Playback Fails / Black Screen

WhatEverGreen includes all the code from the now depreciated "Shiki" plug-in which is responsible for enabling DRM protected content playback on Hackingtosh systems. In most instances that I've been able to test, WhetEverGreen automatically configures "Shiki" with the correct parameters based on the detected CPU/IGPU/dGPU.

Note: If you need to test if DRM Content can play on your system and you don't have any iTunes DRM video content already downloaded then you can try playing a movie trailer in iTunes (select Films then click on a movie and select a trailer), you can test Netflix DRM by playing one of their Original Content Trailers by visiting this page.

It's been reported by a number of users hear at TMx86 and other Forums that WhatEverGreen does not always get things right and fails to configure "Shiki" with the correct parameters which can result in a black screen when playing back DRM protected content. If you find you are unable to play DRM content in iTunes or NetFlix in a Web Browser then try adding shikigva=1 as a MacOS boot argument in your Clover config.plist.

View attachment 382439

This ensures that WhatEverGreen configures "Shiki" to use the hardware renderer of a GPU for DRM playback, the value for the shikigva= boot argument is made up by adding the following 8 BIT values together :-

001 = Force Hardware Online Renderer
002 = Allow Non BGRA
004 = Force Compatible Online Renderer
008 = Add Executable Whitelist
016 = Disabled Unused
032 = Replace Board ID
064 = Unlock FP10 Streaming

If after adding shikigva=1 (001 = Force Hardware Online Renderer) as a boot argument and re-booting you are still unable to play DRM protected content, then try changing the boot argument to shikigva=57 (001 + 008 + 016 +032) reboot your PC, and test DRM content again.

When using shikigva=1 or shikigva=57 MacOS should automatically select the most appropriate hardware renderer to use based on the detected/configured hardware, in most instances this will be the Intel IGPU and you should not need to do anything else. However if necessary you can manually configure MacOS to use a preferred GPU for DRM playback by using one of the following terminal commands :-

Force MacOS to use Intel IGPU (Default/Recommended) :-
Code:
defaults write com.apple.AppleGVA forceIntel -boolean yes


Force MacOS to use AMD/ATI dGPU :-
Code:
defaults write com.apple.AppleGVA forceATI -boolean yes


Force MacOS to use Nvidia dGPU :-
Code:
defaults write com.apple.AppleGVA forceNV -boolean yes


If after trying shikigva=1 and shikigva=57 you still cant play DRM content then you could try shikigva=60 (004 + 008 + 016 + 032) which will force MacOS to use an alternate/compatible DRM renderer method.

If necessary you can reset the MacOs DRM configuration back to defaults with the following terminal commands :-
Code:
defaults delete com.apple.coremedia
defaults delete com.apple.AppleGVA
sudo rm -rf /Users/Shared/SC\ Info
sudo defaults delete com.apple.coremedia
sudo defaults delete com.apple.AppleGVA


Once you have entered the above commands, reset your PC and try again.

I'm still trying to nail down DRM issues so if you found this section useful please post any success (or failure) stories below, so we can help others and improve the above info.



AppleALC

AppleALC is a plug-in for Lilu that dynamically patches the AppleHDA kext to enable HDA support on non-native audio codec's. Like WhatEverGreen it replaces many of the patches and kext's that we have traditionally used to enable Audio in MacOS, as such you must remove all existing AppleHDA enablers, patches, dummy kext's, DSDT Edits ... etc and ensure you have a vanilla AppleHDA kext.

HDMI Audio

AppleALC can enable HDMI audio on your DGPU (Nvidia/AMD) and/or IGPU as long as you have injected the correct Device Properties for your DGPU/IGPU (as required by WhatEverGreen), in most instances you should not need to do anything else to enable HDMI/DP audio, however in some cases it maybe necessary to change the connector type on a particular port, for more information see the section on WhatEverGreen above.

Codec Audio

First check the native name of your HDA device by opening your vanilla (without edits) DSDT in MaciASL and search for "HDEF", if no results are found then try searching for "HDAS" if that search fails try searching for "AZAL"

If your HDA device is called "HDEF" then there is no need to rename the device, however if it is called "HDAS" then add the following Clover rename patch to the "Clover/ACPI/Patches" section of your config.plist :-

Code:
                <dict>
                    <key>Comment</key>
                    <string>change HDAS to HDEF</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    SERBUw==
                    </data>
                    <key>Replace</key>
                    <data>
                    SERFRg==
                    </data>
                </dict>

If your HDA device is called "AZAL" then the rename patch is :-

Code:
                <dict>
                    <key>Comment</key>
                    <string>change AZAL to HDEF</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    QVpBTA==
                    </data>
                    <key>Replace</key>
                    <data>
                    SERFRg==
                    </data>
                </dict>

You can also rename the HDA device using Clover Configurator by selecting the appropriate rename patch :-

View attachment 350284

Understanding how AppleALC works

AppleALC works a bit different to traditionally pre-patched or dummy kext AppleHDA solutions, the best way to think of AppleALC is as a large database of codec connector, layout and platform patches. Upon loading, AppleALC will automatically detect the type of codec you have and will apply a set of codec patches from its database to AppleHDA. The patch set that AppleALC will use is defined by using an index identifier. For backwards compatibility (and terminology) the patch set index identifier is the value of a property called "layout-id" which has traditionally been used in the hackingtosh world to select a layout in a pre-patched version of AppleHDA (or dummy HDA kext).

Lilu & AppleALC interactions

When Lilu loads it finds the value of "layout-id" and passes it to AppleALC which creates a new Device Property called "alc-layout-id" that inherits this value. AppleALC then sets the value of "layout-id" to a new target ID (usually 7) and patches the target layout in AppleHDA (using Lilu's patching engine) with the connector info, platform and layout files required for your codec indexed by the value of "alc-layout-id".

This method allows AppleALC to negate the dropped layout-id's in Mojave (see the Audio section of this post for more info ) as the injected value of "layout-id" is only used as an index in AppleALC's codec patch database. It should be noted that AppleALC will use this layout-id re-mapping scheme on all versions of MacOS not just Mojave.

Check Supported Codecs

To see if AppleALC supports your codec look for its name in the source code's Resources folder. If your codec is not supported then you can ask for it be included in the next version by posting on the official AppleALC help thread. Create a post with the details of your codec (see post #1 in the help thread) ). One of the guru's there should see your post and offer to help, you will probably need to generate a codec dump in linux, I'm not going to cover that here as its out of the scope of this guide but whoever picks up your post and offers to help will give you a link on how to do this.

If your codec is already supported by AppleALC you can check which layout's are supported by opening the info.plist file within the appropriate codec folder, from the code you can see which layout id's are available, the comments may give you a clue as to which one to use,

As an example my 2017 HP Spectre X360 laptop has a ALC295 codec, so i open the info.plist within the ALC295 sub folder :-

View attachment 359220

In this example I know that Mirone's patch set is the one I need which is layout 3, in your instance read each of the comments to see if the description matches your system, if your not sure make a list of all of the available layout-id values and try each one in turn until you find one that works. You can also use HD-Patcher to see which layouts are supported (detailed below).

AppleALC Configuration

First install the latest versions of Lilu and AppleALC in to /L/E (see the How to Install section towards the top of this guide), now all you need to do is to configure AppleALC with the layout-id you want to use, there are two methods you can use to do this.

Method 1 (Legacy Clover value)

Lilu supports querying Clover for the value of "layout-id" from the legacy parameter "Clover/Devices/Audio/Inject" in your config.plist so all you need to do is to set the string value of "Inject" to the correct layout id for your codec.

Example using layout 3 :-

Code:
    <key>Devices</key>
    <dict>
        <key>Audio</key>
        <dict>
            <key>AFGLowPowerState</key>
            <true/>
            <key>Inject</key>
            <string>3</string>
            <key>ResetHDA</key>
            <true/>
        </dict>

If you use Clover Configurator then the setting is in the Devices Section

View attachment 350199

It should be noted that it's quite likely that Lilu will drop the legacy method of reading the value of "layout-id" from "Clover/Devices/Audio/Inject" at some point in the future, so you may be better of using the second method which uses Device Properties and brings AppleALC configuration in-line with other Lilu plug-in's such as WhatEverGreen.

If you don't know what Device Properties are see the "Configuration" section of the WhatEverGreen part of this guide above.

Method-2 (Device Properties) - Recommended

After installing AppleALC + Lilu reboot and edit your config.plist and set the string value of "Clover/Devices/Audio/Inject" to "No" and define "layout-id" as a custom Device Property. You can use Hackingtool to generate the Audio Device Property code for you by clicking on the Speaker Icon on the lower tool bar, you should now see the detected Codec type and a drop down menu where you can select the layout you want to use, the drop down menu will only contain the valid layout-id's that are applicable to the detected codec.

View attachment 358912

Once you have made your selection, select the Patch tab and uncheck everything, then check the Audio option and then click on the Generate Patch button.

View attachment 359183

Notice that as well as the "layout-id" Device Property there is also an associated PCI path key.

You can now copy and paste the code from the Hackingtool code generator straight into your config.plist making sure you keep the <dict> structure correct ... here is an example using layout-id 3 :-

Code:
<key>Devices</key>
    <dict>
        <key>Properties</key>
        <dict>
            <key>PciRoot(0x0)/Pci(0x1f,0x3)</key>
            <dict>
                <key>layout-id</key>
                <data>
                AwAAAA==
                </data>
            </dict>
        </dict>
    </dict>

Note: This is only an exmpale to show the correct structure, your config.plist will include additional lines of existing code.

Here is an example of adding layout-id 3 as a Device Property using PlistEdit-Pro :-

View attachment 360780
Alternatively you can use Clover Configurator :-
  1. Open Clover Configurator and load your config.plist and select the Devices section
  2. Towards the bottom of page you will see two tab buttons labelled Arbitrary and Properties
  3. Click on the Properties button
  4. Click on the "+" icon under the left panel
  5. Copy and paste the PCI path key (starts with PciRoot) from the generated code into the "Devices" field
  6. Click on the "+" icon under the right panel
  7. Type in "layout-id" into the "Properties Key" field
  8. Type in your "layout-id" value into the "Properties Value" field as a 8 digit Hexadecimal (eg 3 = 03000000)
This is what the above example looks like using Clover Configurator:-

View attachment 350314

Note-1: We define the audio device's PCI path key in the left panel and the Device Property in the right panel.

Note-2: The data values generated by the Hackingtool code generator are in base-64 so if you use Clover Configurator or plist editor then you will have to convert the value to an 8 digit hex number, you can use the calculator function in Hackingtool (Version 1.7.9+) to do this. For example you want to use layout id 13, Hackingtool generates a base64 value of "DQAAAA==" if we enter this in to Hackingtool's calculator we get a hex value of "0d 00 00 00" enter this as the value for "layout-id" without the spaces.

View attachment 383022
After making the changes/edits save your config.plist and reboot, now you can test if the audio working. If audio is not working then work through each of the valid layout-id's for your codec, saving the config.plist file and rebooting between each test.

If after testing all valid values of layout-id for your codec audio is still not working then you may have a codec configuration that needs a new patch set ... as with a non-supported codec, the best place to get help is the official AppleALC help thread. Create a post with the details of your codec (see post #1 in the help thread) ) and write that none of the existing layouts work on your system. One of the AppleHDA guru's should see your post and offer to help.

Checking if AppleALC has loaded Correctly

We can easily check if AppleALC has loaded and initialised correctly by using IORegisteryExplorer, if you don't already have this installed you can download it using this link.

Run IORegisteryExplorer and enter "HDEF" in the search box, you should now see the ioreg directory tree for your "HDEF" device, using the above example this is what mine looks like :-

View attachment 350275

We can see that AppleALC has automatically created a new property called "alc-layout-id" which has inherited the layout-id value of 3 as defined in the config.plist (using Clover/Devices/Audio/Inject or as a Device Property) ... remember that this is the index value to the patch set in the AppleALC patch database. We can also see that "layout-id" has now been set to 7 which is the target layout in AppleHDA that AppleALC has patched and that MacOS is using.

If you don't see "alc-layout-id" in your "HDEF" directory tree then AppleALC is not loading or initialising correctly, the usual cause of this is that the kexts have not been installed correctly. Try deleting the Lilu + AppleALC kext's from /L/E, download them again and re-install using the method detailed in the How to Install section of this guide.

HPET Issues (High Precision Event Timer)

After following the guide to install AppleALC and performing the above check you find that the "alc-layout-id" property exists in the ioreg and the value for it and the property "layout-id" seem correct but you still have no sound then its possible that you might be suffering form an IRQ Conflict caused by the HPET (High Precision Event Timer).

The HPET is a basic requirement for MacOS to run correctly and almost all install guides on this forum state that you should enable the HPET option in your BIOS, however on some motherboards and laptops the native DSDT code for the HPET can cause a IQR conflict that can stop the AppleHDA kext initialising correctly.

One method of checking for this issue (suggested by @buzzvicky) is by executing the following command in terminal :-
Code:
kextstat | grep 'Lilu\|AppleALC\|AppleHDA'
In the resulting output you should see the Lilu, AppleALC & AppleHDA kexts listed ...
Code:
MonkeyPro-2018:~ Jay$ kextstat | grep 'Lilu\|AppleALC\|AppleHDA'
   20    4 0xffffff7f81041000 0x22000    0x22000    as.vit9696.Lilu (1.2.8) 54014689-C8DA-318B-84F4-944BBA7AD2AC <8 6 5 3 2 1>
   23    0 0xffffff7f811bd000 0xdf000    0xdf000    as.vit9696.AppleALC (1.3.3) B60FCBAF-6BC2-36EF-A1E6-D5BE2863C35B <20 13 8 6 5 3 2 1>
  138    1 0xffffff7f830a7000 0x1d000    0x1d000    com.apple.driver.AppleHDAController (282.10) 70256EC9-AF38-31BD-A3C5-9C0E30B64AA3 <137 113 107 13 8 7 6 5 3 1>
  157    0 0xffffff7f8323a000 0xb7000    0xb7000    com.apple.driver.AppleHDA (282.10) B2208DA8-8CD9-36D8-BD59-C6D9A5379585 <156 138 137 124 113 107 7 6 5 3 1>
  159    0 0xffffff7f830c6000 0x2000     0x2000     com.apple.driver.AppleHDAHardwareConfigDriver (282.10) C4F674A0-5828-3D97-82BF-A81C8B8BDDBA <5 3>
As you can see from the above example if AppleHDA is loading then you will also see the AppleHDAController and AppleHDAHardwareConfigDriver kexts but the important one to note is AppleHDA.

If you do not see AppleHDA in the output (com.apple.driver.AppleHDA) then first check your BIOS settings and ensure that you have the HPET option enabled, if it is enabled and you still do not see AppleHDA in the output from the above command then you'll need to patch the HPET code in your DSDT.

The simplest method is to use the Cover option FixHPET in ACPI/DSDT/Fixes :-
Code:
    <key>ACPI</key>
    <dict>
        <key>DSDT</key>
        <dict>
            <key>Fixes</key>
            <dict>
                <key>FixHPET</key>
                <true/>

You can also enable the option using Clover Configurator :-

View attachment 375289

This should work for most users however if after applying the Clover HPET fix you still find that AppleHDA is not loading (using the above terminal command) then you may need to apply the fix directly to your DSDT, RehabMan has a DSDT patch in his Repo which you can apply to your DSDT using MaciASL:-
Code:
#Maintained by: RehabMan

# HPET fix to avoid AppleIntelCPUPowerManagement panic
into method label _STA parent_hid PNP0103 remove_entry;
into device name_hid PNP0103 code_regex Name\s\(_STA\,\s+0x0F\) remove_matched;
into device name_hid PNP0103 insert
begin
Name (_STA, 0x0F)\n
end;

into method label _CRS parent_hid PNP0103 remove_entry;
into device name_hid PNP0103 insert
begin
Method (_CRS, 0, NotSerialized)\n
{\n
    Return (BUF0)\n
}\n
end;

To apply the patch open your DSDT in MaciASL, click on the Patch button and copy/paste the above code into the patch editor and then click on Apply, save the patched DSDT and try again, for more info on patching your DSDT see Rehabmans full guide.

AppleALC EAPD wake verbs

As an added bonus, AppleALC also takes care of EAPD wake verbs for most codec's so there is no need to install/use Codec Commander, you can check if AppleALC supports EAPD wake verbs for your codec by looking at the release history commit comments, if it is supported and you already have Codec Commander installed then you should remove it .



AirportBrcmFixup

This plug-in is pretty straight forward, it includes a set of patches required for native and non-native Broadcom Airport/Wi-Fi cards. The patches deal with things like enabling continuity and handoff, renaming your WiFi as an Airport device, plus a few other handy patches. As with all the other Lilu plug-in's in most cases (see notes below) you should remove all previous WiFi related patches and enabler kext's.

One reason to consider using this plug-in is that it negates the problem that you can no longer use a Clover patch to enable Handoff on MacOS 10.13.X and 10.14.X. You don't need to set any Device Properties for this plug-in, if it finds a supported WiFi device it will apply all the necessary patches automatically.

If you don't already know the VID & PID of your installed WiFi adapter then you can use DPCIManager which you can download using this link. Once downloaded simply extract and run DPCIManager and click on the "PCI List" tab, find your WiFi device in the list and make a note of the Vendor ID (VID) and PCI Device ID (PID).

View attachment 360643
In the above example my WiFi device has a VID of 14E4 (Broadcom) and a PID of 43BA (BCM43602 Chipset)

To see if your WiFi device is supported, take a look at the info.plist on the projects Git-Hub project page and search for your WiFi Devices PID.

View attachment 360645
If you see your devices VID + PID in the list then your good to go, simply install AirportBrcmFixup (and Lilu if not already installed) using the method detailed in the How to Install section of this guide.

If necessary, you can over-ride the default MacOS WiFi local and explicitly set a country code for your WiFi device using the boot argument brcmfx-country=XX, this is sometimes necessary to get 5Ghz WiFi working at full speed on some WiFi routers. A common value for this is "#a" which is a special value that effectively tells MacOS to ignore the WiFi country code set by your router. I've always had to use the "#a" country code on all versions of MacOS in order to get full 5Ghz WiFi bandwidth with my router.

View attachment 350313

Note 1: I think the guide/readme.md on this plug-in's Git-Hub page is a bit out of date in that states it should be used with other 3rd party WiFi enablers. I believe that earlier versions of AirportBrcmFixup did require the use of additional software depending on what type of card you have. However from my testing it appears that this is no longer the case and AirportBrcmFixup should do pretty much everything required so no need for any other software.

Note 2: AirportBrcmFixup only deals with the Airport/WiFi side of a combo card it does nothing to enable/support Bluetooth. To enable Bluetooth on all my Hackingtosh systems I use RehabMans BrcmPatchRAM ... see his Git-Hub Project page for more info.

I've tested AirportBrcmFixup with a DW1830 (BCM43602) in my laptop and a BCM943602CS in my desktop system and it works great, no other patches or enablers needed. .. handoff and continuity have never worked better.

Based on my experience I suggest you try AirportBrcmFixup on it's own and remove all other WiFi/Airport enablers, kext's and patches ... as long as your device is supported (see the info.plsit) you should be ok, if it does not work then you may need to add one of the 3rd party kext enablers mentioned in the readme.md .... please post your success (and failures) below so we can confirm this for other users.

For a full list of all the patches this plug-in provides along with a list of boot arguments see the projects Git-Hub readme.md.



Other useful Lilu Plug-in's

BT4LEContiunityFixup

If after installing AirportBrcmFixup you continue to have BT Continuity issues (AirDrop, Handoff, FaceTime Continuity .. etc) you could try installing BT4LEContinuityFixup which applies a few more specific patches to enable MacOS BT-LE Continuity features on non-native Broadcom BT-LE chipsets ... as with the other Lilu plug-in's you should disable or remove any existing Clover Bluetooth patches, but be sure to keep the BrcmPatchRAM kexts in /L/E.

AppleBacklightFixup

A Lilu alternative to ReHabMan's AppleBacklightInjector.kext and clover patch, AppleBacklightFixup should work on all versions of OSX, it still requires the hot patch SSDT-PNLF.aml see ReHabMans guide for full details. I've used it on my 2017 HP Spectre X360 laptop with great success.

HibernationFixup

As the name suggest this Lilu plug-in allows the enabling of MacOS save-to-disk hibernation modes 3 and 25 on certain systems. I have not used HibernationFixup myself but have read many positive posts that it does work as long as your system meets the hardware requirements (specifically native NVRAM, not emulated). Be sure to read all the documentation first before installing.

VirtualSMC

A lilu plugin that emulates the Apple SMC (System Management Controller) .. typically we have always used FakeSMC for this task and as of now (January 2019) I would recommend that you continue to use FakeSMC as its still unstable on some systems and needs more sensor plugins before it can be recommended over FakeSMC.

I'm sure that VirtualSMC will at some point surpass FakeSMC but it is still quite early in its development cycle. I think this is a plug-in to keep an eye on as I am sure at some point in the future it will be preferable to use VirtualSMC in place of FakeSMC.



Final thoughts

Lilu and its plug-in's such as WhatEverGreen, AppleALC and AirportBrcmFixup consolidates everything that has been learnt by the entire hackingtosh community over the last five years and does a lot of the hard work that used to achieved with multiple Clover patches, custom and dummy kext's, hot patches ... etc with just a handful of kext's and the injection of a few Device Properties.

Once you take the time to understand Lilu and its plug-in's you will find that they really can simplify the patching of critical area's of MacOS with the minimum amount of effort. Of course there are always going to be exceptions where these solutions wont work but for many users, Lilu and its plug-in's should be considered a viable and mature alternative to the traditional hackingtosh methods that we have used for the last few years.

It goes without saying that Lilu and its plug-in's are in constant development so I recommend keeping an eye on the Git-Hub release pages, the latest version of each project will always be shown at the top of the page along with details of the changes and commits to that version.

I'd like to take this opportunity to thank all of the developers involved with Lilu and its plug-in's for all their hard work and their contribution to the hackingtosh community, it should be noted that they in-turn (where applicable) acknowledge the original creators of any methods that some of the plug-in's use, these credits can be seen at the bottom of the readme.md on each of the Git-Hub project pages.

Cheers
Jay



Getting further Help and Support

If you need help outside the basic scope of this guide then do not post your question here, please create a new thread in the appropriate sub section of the forums such as Post Install, Laptops .. etc.

If you suspect there is a bug in Lilu or one of it's plug-in's then you should post your findings to the relevant support thread(s) documented in the readme.md of the appropriate Git-Hub project page, the same is true if you need to report an unsupported device for inclusion in the next release.


Brilliant work @jaymonkey :thumbup:

This is a remarkable guide. I've learned so much.

:)
 
@telepati,

Make sure your using the very latest version of Hackingtool (currently 2.0.3) and also ensure that you have the latest version of Lilu and WhatEverGreen installed.

Make sure to select correct version of MacOS using Hackingtools Framebuffer top menu.

View attachment 391858

Your i7 6700K CPU has HD 530 IGPU so the correct PlatformID to use will be 0x19120000 with SMBIOS iMac17,1

View attachment 391857
If after updating Hackingtool, Lilu and WhatEverGreen you still don't see the correct PlatformID's then please report the problem to @headkaze on this thread :-


Cheers
Jay
Thank you @jaymonkey I followed your instructions and I create framebuffer but I can't boot with Intel HD530. I set IGFX primary on BIOS add these framebuffers to Properties under the Devices and also disabled all Renames(even I tried with enabled) but can never boot. I am getting kernel panic on verbose. (it gives a link for the apple kernel panic page.) I checked on the ioreg HD530 looks loaded also framebuffers loaded. I attached my files could you please tell me what am I done wrong?

392015


Code:
Anonymous UUID:       580248B7-45C8-A9A1-1D20-FD17E2707302

Sat Mar  9 16:19:32 2019

*** Panic Report ***
panic(cpu 0 caller 0xffffff8006eda29d): Kernel trap at 0xffffff7f8942e83e, type 14=page fault, registers:
CR0: 0x000000008001003b, CR2: 0x0000000000000000, CR3: 0x000000001e4d5000, CR4: 0x00000000003626e0
RAX: 0x0000000000000000, RBX: 0x0000000000000000, RCX: 0x0000000000000001, RDX: 0x0000000000000001
RSP: 0xffffff871d8cde40, RBP: 0xffffff871d8cde80, RSI: 0x0000000077729d01, RDI: 0x0000000000000000
R8:  0x0000000077729d01, R9:  0x0000000000000000, R10: 0x0000000000000000, R11: 0x0000000000000000
R12: 0x0000000000000001, R13: 0xffffff800760c8c0, R14: 0xffffff869cf28000, R15: 0x0000000000000000
RFL: 0x0000000000010002, RIP: 0xffffff7f8942e83e, CS:  0x0000000000000008, SS:  0x0000000000000000
Fault CR2: 0x0000000000000000, Error code: 0x0000000000000000, Fault CPU: 0x0, PL: 1, VF: 5

Backtrace (CPU 0), Frame : Return Address
0xffffff871d8cd910 : 0xffffff8006daeb0d mach_kernel : _handle_debugger_trap + 0x48d
0xffffff871d8cd960 : 0xffffff8006ee8653 mach_kernel : _kdp_i386_trap + 0x153
0xffffff871d8cd9a0 : 0xffffff8006eda07a mach_kernel : _kernel_trap + 0x4fa
0xffffff871d8cda10 : 0xffffff8006d5bca0 mach_kernel : _return_from_trap + 0xe0
0xffffff871d8cda30 : 0xffffff8006dae527 mach_kernel : _panic_trap_to_debugger + 0x197
0xffffff871d8cdb50 : 0xffffff8006dae373 mach_kernel : _panic + 0x63
0xffffff871d8cdbc0 : 0xffffff8006eda29d mach_kernel : _kernel_trap + 0x71d
0xffffff871d8cdd30 : 0xffffff8006d5bca0 mach_kernel : _return_from_trap + 0xe0
0xffffff871d8cdd50 : 0xffffff7f8942e83e com.apple.driver.AppleIntelSKLGraphicsFramebuffer : __ZN31AppleIntelFramebufferController16ProcessInterruptEv + 0xefe
0xffffff871d8cde80 : 0xffffff7f8941174d com.apple.driver.AppleIntelSKLGraphicsFramebuffer : __ZN31AppleIntelFramebufferController18HWInterruptHandlerEP28IOFilterInterruptEventSource + 0x25
0xffffff871d8cdea0 : 0xffffff800745c6a5 mach_kernel : __ZN28IOFilterInterruptEventSource23normalInterruptOccurredEPvP9IOServicei + 0x55
0xffffff871d8cdee0 : 0xffffff7f876b3a3e com.apple.iokit.IOPCIFamily : __ZN32IOPCIMessagedInterruptController15handleInterruptEPvP9IOServicei + 0x124
0xffffff871d8cdf30 : 0xffffff7f89c96a7c com.apple.driver.AppleACPIPlatform : __ZN23AppleACPIPlatformExpert23dispatchGlobalInterruptEi + 0x42
0xffffff871d8cdf50 : 0xffffff7f89c9faa5 com.apple.driver.AppleACPIPlatform : __ZN31AppleACPICPUInterruptController15handleInterruptEPvP9IOServicei + 0x6b
0xffffff871d8cdf70 : 0xffffff8006ed982c mach_kernel : _interrupt + 0x14c
0xffffff871d8cdfd0 : 0xffffff8006d5be4d mach_kernel : _hndl_allintrs + 0x11d
0xffffffa755eb3740 : 0xffffff7f8aa7a987 com.apple.iokit.IONVMeFamily : __ZN16AppleNVMeRequest20GenerateIOVMSegmentsEyy + 0x21
0xffffffa755eb3770 : 0xffffff7f8aa6676a com.apple.iokit.IONVMeFamily : __ZN24IONVMeBlockStorageDevice16doAsyncReadWriteEP18IOMemoryDescriptoryyP19IOStorageAttributesP19IOStorageCompletion + 0x348
0xffffffa755eb3840 : 0xffffff7f87b98ce5 com.apple.iokit.IOStorageFamily : __ZN20IOBlockStorageDriver14executeRequestEyP18IOMemoryDescriptorP19IOStorageAttributesP19IOStorageCompletionPNS_7ContextE + 0x125
0xffffffa755eb38a0 : 0xffffff7f87b9b56e com.apple.iokit.IOStorageFamily : __ZN20IOBlockStorageDriver14prepareRequestEyP18IOMemoryDescriptorP19IOStorageAttributesP19IOStorageCompletion + 0x12e
0xffffffa755eb3900 : 0xffffff7f886d9e5a com.apple.filesystems.apfs : __ZN24AppleAPFSContainerScheme5writeEP9IOServiceyP18IOMemoryDescriptorP19IOStorageAttributesP19IOStorageCompletion + 0x210
0xffffffa755eb3970 : 0xffffff7f87ba150f com.apple.iokit.IOStorageFamily : __ZL11dkreadwritePv9dkrtype_t + 0x5de
0xffffffa755eb3a30 : 0xffffff80070393af mach_kernel : _spec_strategy + 0x3af
0xffffffa755eb3aa0 : 0xffffff8006fdf014 mach_kernel : _buf_bwrite + 0x254
0xffffffa755eb3b10 : 0xffffff8006fddbb1 mach_kernel : _buf_bawrite + 0x71
0xffffffa755eb3b50 : 0xffffff7f886bc8dc com.apple.filesystems.apfs : __vnode_dev_write + 0x239
0xffffffa755eb3bb0 : 0xffffff7f886bc5b6 com.apple.filesystems.apfs : _vnode_dev_flush_buf + 0x67
0xffffffa755eb3bd0 : 0xffffff7f886bbe70 com.apple.filesystems.apfs : _vnode_dev_write + 0x159
0xffffffa755eb3c60 : 0xffffff7f88765d97 com.apple.filesystems.apfs : _obj_write + 0x2dd
0xffffffa755eb3cf0 : 0xffffff7f88765891 com.apple.filesystems.apfs : _flush_obj_array + 0xc1
0xffffffa755eb3dd0 : 0xffffff7f88765405 com.apple.filesystems.apfs : _obj_cache_flush + 0x626
0xffffffa755eb3e40 : 0xffffff7f8877ad52 com.apple.filesystems.apfs : _tx_flush + 0xf8
0xffffffa755eb3f50 : 0xffffff7f8877ac0c com.apple.filesystems.apfs : _tx_flush_thread + 0x9e
0xffffffa755eb3fa0 : 0xffffff8006d5b0ce mach_kernel : _call_continuation + 0x2e
      Kernel Extensions in backtrace:
         com.apple.iokit.IOPCIFamily(2.9)[5C9A453F-559B-3683-9E81-D288D13A33CE]@0xffffff7f87695000->0xffffff7f876c9fff
         com.apple.driver.AppleACPIPlatform(6.1)[E44E285D-01ED-3E8B-A21D-FC792AFC9DB9]@0xffffff7f89c8f000->0xffffff7f89d2afff
            dependency: com.apple.iokit.IOACPIFamily(1.4)[67079254-1B34-31D2-8C7B-B138E26BFDD8]@0xffffff7f87710000
            dependency: com.apple.iokit.IOPCIFamily(2.9)[5C9A453F-559B-3683-9E81-D288D13A33CE]@0xffffff7f87695000
            dependency: com.apple.driver.AppleSMC(3.1.9)[4523E39C-6A5A-3352-BE3B-2B3BD9B70251]@0xffffff7f87e5a000
         com.apple.iokit.IOStorageFamily(2.1)[9B2E7108-AA17-3998-BF41-4B1297F455E5]@0xffffff7f87b94000->0xffffff7f87bbbfff
         com.apple.iokit.IONVMeFamily(2.1)[ABA6DFDD-AC72-3008-83FE-EF9722E66FEB]@0xffffff7f8aa60000->0xffffff7f8aa9ffff
            dependency: com.apple.driver.AppleMobileFileIntegrity(1.0.5)[A2492141-9480-3177-BC7D-455925BB4A2E]@0xffffff7f87d5e000
            dependency: com.apple.iokit.IOPCIFamily(2.9)[5C9A453F-559B-3683-9E81-D288D13A33CE]@0xffffff7f87695000
            dependency: com.apple.driver.AppleEFINVRAM(2.1)[328FCBD7-8C2C-3A4A-AF92-9270C1403891]@0xffffff7f87f2b000
            dependency: com.apple.iokit.IOStorageFamily(2.1)[9B2E7108-AA17-3998-BF41-4B1297F455E5]@0xffffff7f87b94000
            dependency: com.apple.iokit.IOReportFamily(47)[5F165AE5-F4F2-3415-857C-34F2462A730E]@0xffffff7f886a2000
         com.apple.filesystems.apfs(945.241.4)[4C147D98-F411-3D19-99D0-6778CC579FE9]@0xffffff7f886ba000->0xffffff7f887cafff
            dependency: com.apple.kec.corecrypto(1.0)[46F3B625-86D1-3761-9603-34835A98AA49]@0xffffff7f87c9f000
            dependency: com.apple.driver.AppleEffaceableStorage(1.0)[B2BCF219-EACB-3908-883A-9ED52B0D75E1]@0xffffff7f8830b000
            dependency: com.apple.iokit.IOStorageFamily(2.1)[9B2E7108-AA17-3998-BF41-4B1297F455E5]@0xffffff7f87b94000
         com.apple.driver.AppleIntelSKLGraphicsFramebuffer(12.0.4)[0FC59C66-756A-3AA9-9946-4FFA5E61976B]@0xffffff7f893e5000->0xffffff7f895f7fff
            dependency: com.apple.iokit.IOPCIFamily(2.9)[5C9A453F-559B-3683-9E81-D288D13A33CE]@0xffffff7f87695000
            dependency: com.apple.iokit.IOACPIFamily(1.4)[67079254-1B34-31D2-8C7B-B138E26BFDD8]@0xffffff7f87710000
            dependency: com.apple.iokit.IOAcceleratorFamily2(404.2.2)[3F0DBC5F-414B-379E-8C7B-A2F50B278A2A]@0xffffff7f89330000
            dependency: com.apple.iokit.IOReportFamily(47)[5F165AE5-F4F2-3415-857C-34F2462A730E]@0xffffff7f886a2000
            dependency: com.apple.AppleGraphicsDeviceControl(3.28.4)[E80DEB91-2401-31C2-901F-CA63B4342337]@0xffffff7f88317000
            dependency: com.apple.iokit.IOGraphicsFamily(530.14)[D44517BE-2B53-3BD5-826E-4E78B55E3B73]@0xffffff7f87ffe000

BSD process name corresponding to current thread: kernel_task
Boot args: keepsyms=1 dart=0 debug=0x100 uia_exclude=HS03;HS04;HS07;HS08;HS11;HS13;HS14;SS03;SS04;SS07;SS08;SS09;SS10; shikigva=60 kext-dev-mode=1 -v

Mac OS version:
18D109

Kernel version:
Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_64
Kernel UUID: 1970B070-E53F-3178-83F3-1B95FA340695
Kernel slide:     0x0000000006a00000
Kernel text base: 0xffffff8006c00000
__HIB  text base: 0xffffff8006b00000
System model name: iMac17,1 (Mac-B809C3757DA9BB8D)

System uptime in nanoseconds: 16423346159
last loaded kext at 15613388917: com.apple.driver.AppleMikeyDriver    282.10 (addr 0xffffff7f898a3000, size 135168)
loaded kexts:
com.insanelymac.IntelMausiEthernet    2.4.1d1
org.vulgo.NoVPAJpeg    1.0.0
as.vit9696.AppleALC    1.3.5
as.vit9696.WhateverGreen    1.2.7
as.vit9696.Lilu    1.3.4
com.rehabman.driver.USBInjectAll    0.7.1
org.netkas.driver.FakeSMC    1800
com.apple.driver.AppleMikeyDriver    282.10
com.apple.driver.AGPM    110.23.46
com.apple.driver.X86PlatformShim    1.0.0
com.apple.driver.ApplePlatformEnabler    2.7.0d0
com.apple.driver.AppleHDAHardwareConfigDriver    282.10
com.apple.driver.AppleHDA    282.10
com.apple.kext.AMDRadeonX4000    2.0.4
com.apple.driver.AppleGraphicsDevicePolicy    3.28.4
com.apple.AGDCPluginDisplayMetrics    3.28.4
com.apple.driver.AppleHV    1
com.apple.iokit.IOUserEthernet    1.0.1
com.apple.iokit.IOBluetoothSerialManager    6.0.10f1
com.apple.driver.pmtelemetry    1
com.apple.Dont_Steal_Mac_OS_X    7.0.0
com.apple.driver.AppleIntelSKLGraphics    12.0.4
com.apple.driver.eficheck    1
com.apple.driver.AppleOSXWatchdog    1
com.apple.driver.AppleFIVRDriver    4.1.0
com.apple.kext.AMD9500Controller    2.0.4
com.apple.driver.AppleGFXHDA    100.1.40



EOF
Model: iMac17,1, BootROM 161.0.0.0.0, 4 processors, Intel Core i7, 4,01 GHz, 64 GB, SMC 2.33f10
Graphics: Radeon RX 560, Radeon RX 560, PCIe
Memory Module: BANK 0/DIMM0, 16 GB, DDR4, 2400 MHz, Crucial Technology, BLS16G4D240FSB.16FAD
Memory Module: BANK 1/DIMM0, 16 GB, DDR4, 2400 MHz, Crucial Technology, BLS16G4D240FSB.16FAD
Memory Module: BANK 0/DIMM1, 16 GB, DDR4, 2400 MHz, Crucial Technology, BLS16G4D240FSB.16FAD
Memory Module: BANK 1/DIMM1, 16 GB, DDR4, 2400 MHz, Crucial Technology, BLS16G4D240FSB.16FAD
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x111), Broadcom BCM43xx 1.0 (7.77.61.1 AirPortDriverBrcmNIC-1305.2)
Bluetooth: Version 6.0.10f1, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
PCI Card: Intel HD Graphics 530, Other Display Controller, PCI Slot 3
PCI Card: Intel Corporation, Series Chipset USB xHCI Host Controller, USB Controller, Built In
PCI Card: Intel Corporation, Series Chipset MEI Controller, IMEI Controller, Built In
PCI Card: Intel Corporation, Series Chipset SATA Controller, AHCI Controller, Built In
PCI Card: Radeon RX 560, Display Controller, PCI Slot 0
PCI Card: Apple HDMI Audio Controller, HDMI Controller, Built In
PCI Card: Intel Corporation, Series Chipset PCHPMC Controller, PCHPMC Controller, Built In
PCI Card: Apple High Definition Audio Controller, Audio Controller, Built In
PCI Card: Intel I219V2 PCI Express Gigabit Ethernet, Ethernet Controller, Built In
PCI Card: Broadcom BCM43xx Wireless Network Adapter, AirPort Extreme, Built In
PCI Card: Samsung 960 EVO 250GB NVMe M2 Flash Drive, Storage Controller, Built In
PCI Card: ASMedia USB 3.1 eXtensible Host Controller, USB Controller, Built In
Serial ATA Device: WDC WD20EARS-00MVWB0, 2 TB
Serial ATA Device: WDC WD20EARS-00MVWB0, 2 TB
Serial ATA Device: Samsung SSD 840 EVO 250GB, 250,06 GB
USB Device: USB 3.0 Bus
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
USB Device: USB2.0 Hub
USB Device: Keyboard Hub
USB Device: Apple Keyboard
USB Device: USB 3.1 Bus
Thunderbolt Bus:
 

Attachments

  • Archieves.zip
    1.9 MB · Views: 112
I set IGFX primary on BIOS add these framebuffers to Properties under the Devices and also disabled all Renames(even I tried with enabled) but can never boot. I am getting kernel panic on verbose. (it gives a link for the apple kernel panic page.) I checked on the ioreg HD530 looks loaded also framebuffers loaded. I attached my files could you please tell me what am I done wrong?


@telepati,

I cant see anything obviously wrong in your config.plist and everything else looks ok.

The only thing I can comment on is that you have enabled framebuffer edits, but have not actually defined any framebuffer changes such as defining the ports and/or connectors (defining AAPL,ig-platform-id & device-id as device properties are not considered framebuffer edits ...)

Make sure that your framebuffer connectors and ports are correct for the physical connectors your motherboard supports for the IGPU.

See @CaseySJ's post for more info on how to alter/define the ports/connectors ...

https://www.tonymacx86.com/threads/...ching-guide-hdmi-black-screen-problem.269149/

I don't see a pre-defined patch set for the ASUS Z170 A motherboard in his guide so it most likely needs a new config, if you get stuck try posting on that thread for some help, @CaseySJ is pretty hot as responding to requests for help.

Thats about all I can suggest at the moment.

Cheers
Jay
 
Hi everyone, I need your help with my hack, I installed Osx Mojave 10.14.4 on a generic board, CPU I3-7300 @ 4GHZ and IGPU UHD630, smbios macmini8,1 QE / CI = YES and Metal = YES, my Problem is that I can not enable the VGA output for the second monitor, only the HDMI output works. That's why people help you need to enable the second monitor, thank you for the help.
392474
392475
 

Attachments

  • hamesster’s iMac.ioreg
    6.1 MB · Views: 105
My Problem is that I can not enable the VGA output for the second monitor, only the HDMI output works. That's why people help you need to enable the second monitor, thank you for the help.


@hames,

Apple dropped all support for VGA in MacOS 10.11.X, none of the IGPU frame buffers have support for VGA.

The recommended solution is to use a DP, DVI or HDMI port with an active VGA adapter, however this may not be an option of your motherboard only has HDMI + VGA outputs ?

You could try patching your frame buffer using Hackingtool but there are no guarantees that it will work.

See @CaseySJ's guide for how to do it :-


Cheers
Jay
 
Tks Jay for the quick reply, really my board only has hdmi + VGA :banghead: , I'm going to study the howto of @CaseySJ and test, thanks ..
 
@blob810,

I don't have any DRM protected content to test it with as don't watch any content on my i7 4790K system (thats what the TV is for) it's primarily used for developing software and editing video's however I have tested it with iTunes and Netflix trailers which I believe are DRM protected and it plays them fine.

MacOS DRM seems to be very picky about if it works or not, everything I know about it is included in the guide.

As detailed in the DRM section of the guide ....

First reset the MacOS DRM configuration with the following terminal commands (one at time) :-

Code:
defaults delete com.apple.coremedia
defaults delete com.apple.AppleGVA
sudo rm -rf /Users/Shared/SC\ Info
sudo defaults delete com.apple.coremedia
sudo defaults delete com.apple.AppleGVA

Don't worry if you get a file or domain not found error ...

Then reboot and try again, if DRM still fails then work through the DRM section of the guide and try the boot arguments for "Shiki" and/or configuring MacOS DRM to run on the Intel IGPU or the AMD GPU.

Cheers
Jay

I have tested all shikigva bootlegs, but unfortunately I have not been able to stream DRM content through iTunes. Netflix on Safari did not work either. The trailers, however, could be viewed without problems in both iTunes and Netflix.

In this thread, some have reported that it is only possible to watch offline movies on iTunes. This was the case with me as well.

Until Mac OS 10.4 it was still possible to play DRM content via the RX580. As of version 10.4.1, Apple has changed something. With the kext from this post, the playback works again. So I have tested the Intel GPU in bios disabled and installed the kernel extension. DRM playback was so possible. Both iTunes and Netflix in Safari.

After reactivating the Intel GPU in the BIOS, it did not work anymore. So I tried to force Mac OS to use the RX580 for DRM content.

Code:
defaults write com.apple.AppleGVA forceATI -boolean yes

A reboot brought the success. Both graphics cards are activated. The Intel GPU as Headless with Framebuffer 0x0412000B. As a SMBIOS I use iMac15.1.

392900


392901

392902
 
After reactivating the Intel GPU in the BIOS, it did not work anymore. So I tried to force Mac OS to use the RX580 for DRM content.

Code:
defaults write com.apple.AppleGVA forceATI -boolean yes

A reboot brought the success. Both graphics cards are activated. The Intel GPU as Headless with Framebuffer 0x0412000B. As a SMBIOS I use iMac15.1.


@blob810,

I use the same headless PlatformID of 0x0412000B and SMBIOS Mac15.1 on my White Knight hack (see my sig for details) ... which i used as the basis for writing the headless section of the guide.

It's odd how older CPU based systems seem to have less issues with DRM then newer generation CPU's ?
DRM seems to be one area where more work is needed for us to truly understand whats going on.

Anyways I'm glad you where able to eventually get DRM content playback working.

Cheers
Jay
 
Back
Top