# Getting Started

## So You Want A Vanilla Install?

#### What does that even mean?

A vanilla setup implies that the OS itself remains relatively untouched - and that the bulk of the Hackintosh-related kexts, patches, etc are contained on the EFI partition. For all intents and purposes, a vanilla install's main partition is *identical* to that of an official Apple computer.

**Quick Terms Glossary**

There's a number of terms you'll be seeing throughout this guide - I'll outline a few of them and their definitions here:

* *Clover* - this is the bootloader we'll be using. Real macs have a custom firmware that allows them to boot macOS. PC hardware needs a little help to get this working; Clover helps us achieve that. It also handles kext injection, ACPI renames, kext patches, and a ton of other functions.
* *Kexts* - the word "kext" is actually the combination of **K**ernel **Ext**ension; and you can think of kexts simply as drivers for macOS.
* *Config.plist* - this is the file that tells Clover what to do. It's an XML formatted property list (looks very similar to HTML) and is one of the most important parts of setting up your Hackintosh.
* *OOB* - an acronym for *Out Of the Box* that implies working support without tweaking.
* More will be added as I work on this guide (probably)

## PreRequisites

This guide focuses on Desktops *ONLY*. There are other guides out there for laptops (see [RehabMan's guide](https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/) at TMac) - but they're often *much more specific* than this guide will be.

We'll need a few things to get us started:

1. An 8+GB USB flash drive
2. The Install OS X/macOS.app (preferably downloaded direct from the app store)
3. \_\_[*Clover's Install Package*](https://github.com/Dids/clover-builder/releases) \_\_(courtesy of Dids)
4. [*Clover Configurator*](http://mackie100projects.altervista.org/download-clover-configurator/) (the brave can edit with any text editor - but CC is typically quicker)
   * Make sure you get the *Global* edition
5. \_\_[*VirtualSMC.kext*](https://github.com/acidanthera/VirtualSMC/releases) - this supercedes *FakeSMC.kext* as our SMC emulator and either *VirtualSMC* or *FakeSMC* is vital to booting our Hackintosh. Without one of them, we'd never boot.
6. Any other kexts for our mobo/etc
   * We'll go over this in the next section!
7. Some patience, persistence, and google-fu


# Gathering Kexts

## What Kexts Do I Need?

*VirtualSMC.kext* is a requirement - it emulates the SMC chip found on real macs, and convinces the OS that *yes, this is a real Mac*. Without it, no Hackintosh :(

All of the following kexts are available on [*this repo* ](https://1drv.ms/f/s!AiP7m5LaOED-m-J8-MLJGnOgAqnjGw)courtesy of Goldfish64. Each kext is auto-built whenever a new commit is made. If you prefer to build them yourself, you can utilize my [*Lilu And Friends* ](https://github.com/corpnewt/Lilu-and-Friends)script.

### Ethernet

* [*IntelMausiEthernet.kext* ](https://github.com/Mieze/IntelMausiEthernet)- this works with most newer Intel LAN chipsets
* *AppleIntelE1000e.kext* - this works with older Intel LAN chipsets - but can cause KPs on newer chipsets
* [*AtherosE2200Ethernet.kext* ](https://github.com/Mieze/AtherosE2200Ethernet)- this works for most Atheros or Killer networking chipsets
* [*RealtekRTL8111.kext*](https://github.com/Mieze/RTL8111_driver_for_OS_X) - this works with most gigabit Realtek LAN chipsets
* [*RealtekRTL8100.kext* ](https://github.com/Mieze/RealtekRTL8100)- for 10/100 Realtek LAN chipsets

### USB

You'll want to grab [*USBInjectAll.kext*](https://bitbucket.org/RehabMan/os-x-usb-inject-all/downloads/). If you're on an H370, B360, and H310 Coffee Lake system, or an X79/X99/X299 you'll likely want to make sure to include the *XHCI-unsupported.kext* as well. As of 10.11, Apple has imposed a 15 port limit on each USB controller. This doesn't sound like a terribly imposing issue until you realize that each USB 3 port counts as 2 - one for USB 2, one for USB 3. On Skylake and newer builds where USB 2 and 3 are handled only on XHCI, and each USB 3 port counts as 2, this limit can be reached quickly. There is a way to route all USB 2 through EHCI though - utilizing RehabMan's [*FakePCIID.kext + FakePCIID\_XHCIMux.kext*](https://github.com/RehabMan/OS-X-Fake-PCI-ID) (it only works on some chipsets though) which can take some of the pressure off the XHCI controller.

### Audio

For Audio - you'll want to grab /u/vit9696's [*AppleALC.kext*](https://github.com/vit9696/AppleALC/releases) and the companion [*Lilu.kext*](https://github.com/vit9696/Lilu/releases) - providing you have [a supported codec](https://github.com/vit9696/AppleALC/wiki/Supported-codecs). *AppleALC* is capable of patching *AppleHDA.kext* on the fly to allow for native audio with unsupported codecs. It also has a number of codec verbs built in to help with audio-after-sleep.

### Graphics

For GPUs - you should grab [*WhateverGreen.kext*](https://github.com/acidanthera/WhateverGreen/releases) and the companion [*Lilu.kext*](https://github.com/vit9696/Lilu/releases) - this has the functionality of *IntelGraphicsFixup*, *NvidiaGraphicsFixup*, *CoreDisplayFixup*, and *Shiki* all rolled into it. Prior, all of these kexts were separate - but since many of them share resources, they've been combined.

### WiFi and Bluetooth

Apple is pretty minimal with their WiFi support, so I'll only cover the two main chipsets I'm familiar with. I've used a BCM94360CD + PCIe adapter, and BCM94352HMB/BCM94352Z in my Hackintoshes. The BCM94360CD worked OOB with no extras as it's a native card. For the BCM94352 flavors, I've been using [*AirportBrcmFixup.kext* ](https://github.com/acidanthera/AirportBrcmFixup)and the companion [*Lilu.kext*](https://github.com/vit9696/Lilu/releases) for WiFi setup and *BrcmBluetoothInjector.kext* (on 10.13.6+) or *BrcmPatchRAM2.kext* alongside *BrcmFirmwareData.kext* - all of the Brcm\* kexts are from RehabMan's [*OS-X-BrcmPatchRAM*](https://github.com/RehabMan/OS-X-BrcmPatchRAM) repo.

### Extras

Depending on the rest of your hardware - you *may* need more kexts as well, but this guide is designed to be a general foundation, so you'll have to rely on your google-fu for that.


# Building the USB Installer

Once you have your 8+GB USB installer, we need to make sure it's set up properly. If you don't plan on patching the installer (and I don't) - you want the USB setup the following way:

* GUID Partition Map
* 1 Partition
* OS X Extended (Journaled)

To do this, fire up the Terminal (located in `/Applications/Utilities`) and type `diskutil list`.

This will give you a list of all the connected disks and their partitions. Take note of the disk identifier for your USB drive. **DO NOT GUESS THIS AS WE ARE ABOUT TO ERASE IT!** Then run the following replacing `disk#` with your actual identifier:

```
diskutil partitionDisk /dev/disk# GPT JHFS+ "USB" 100%
```

This will partition the disk as listed above and rename it to "USB".

You can now run the corresponding command from [Apple's own instructions](https://support.apple.com/en-us/HT201372) - for this example, we'll be using the Mojave command:

```
sudo "/Applications/Install macOS Mojave.app/Contents/Resources/createinstallmedia" --volume /Volumes/USB
```

*This will take some time, and it doesn't output much for status updates.* It can take upwards of 30-40 minutes, so just be patient. Grab a cup of coffee, read the news, catch up with friends and family - you'll be here for a bit

When this completes, you will have a USB installer that can boot on a *real Mac*. We just need to get the Hackintosh-related stuff set up, and we'll be in business!

For those that are timid around the command line - I *did* put together [a script](https://github.com/corpnewt/USB-Installer-Creator) awhile back that can perform these actions for you.


# Clover Setup

## Installing Clover

Fire up your Clover install package. On the 3rd page of the installer **make sure to select your USB as the destination**. We also want to **Customize** the installation - as the defaults are pretty lackluster.

![3rd Page of the Clover Installer - Note the "Customize" button in the bottom left](/files/-LnPkY2AWjFHF6rzxuOg)

The *usual* options you want to check in the Customize menu are shown in the following screenshots with an explanation of each after (**Note**: any non-Z370 300-series board will need *EmuVariableUefi-64* as well - it is located under *UEFI Drivers -> Additional drivers* in current Clover packages):

![Recommended Customization Settings](/files/-LnPktjWtiLHm00j8hpB)

* *Install Clover for UEFI booting only*
* *Install Clover to the ESP*
* Under *UEFI Drivers:*
  * *AptioMemoryFix* (the new hotness that includes NVRAM fixes, as well as better memory management)
    * **Note:** You can use *OsxAptioFix3Drv* located in *UEFI Drivers -> Memory fix drivers* if using the official Clover installer from SourceForge. Optionally, you can download the final release of *AptioMemoryFix* from [here](https://github.com/acidanthera/AptioFixPkg/releases)
  * *HFSPlus* (or *VBoxHfs*) - one of these is required for Clover to see and boot HFS+ volumes. If you see the option to enable it in the installer, make sure it's selected - if you don't see it in the installer, verify that one of them exists in your Clover installs efi drivers folder
  * *ApfsDriverLoader* - (Available in Dids' Clover builds - or [here](https://github.com/acidanthera/ApfsSupportPkg/releases)) this allows Clover to see and boot from APFS volumes by loading *apfs.efi* from the ApfsContainer located on block device (if using *AptioMemoryFix* as well, ensure you have R21 or newer)

***That's it.***

If you don't need FileVault, and are setting up a standard UEFI installation, these are the only entries you should need. You may find more than the above selected in the *UEFI Drivers* section and subsections - feel free to deselect any not listed. There are some that can even cause conflicts with other settings/kexts (Like [*SMCHelper-64.efi*](https://github.com/acidanthera/VirtualSMC/blob/master/Docs/FAQ.md)), so it's a good idea to run as lean as possible here.

*Where do they install?*

If you need to manually make changes to the efi drivers on your Clover installation (or just verify that you have what you need), their location may differ depending on your Clover version.

* Clover version up to r4982: `EFI -> CLOVER -> drivers64UEFI`
* Clover versions r4983 to r4985: `EFI -> CLOVER -> UEFIDrivers`
  * Will still use `EFI -> CLOVER -> drivers64UEFI` if the above is not found
* Clover versions r4986 to present: `EFI -> CLOVER -> drivers -> UEFI`
  * Will still use `EFI -> CLOVER -> drivers64UEFI` if the above is not found

## Copying Kexts

Once Clover has been installed, you'll see the EFI partition of your USB on the desktop - we want to navigate to `EFI -> CLOVER -> kexts -> Other` and copy the kexts we downloaded earlier there. Make sure you unzip the kexts before copying them over. Any *dSYM* files can be ignored, we only want the *.kext* files.

*But what about the 10.xx folders?*

When Clover is looking to inject kexts, the kexts in the *10.xx* folders are only injected if Clover determines that the folder name matches the booted OS version. There are very few kexts that are OS version-dependent though, and updating the OS while forgetting to migrate the kexts can leave you in an unbootable state. The kexts located in the *Other* folder will inject regardless of the detected OS version.


# Config.plist Basics

The *config.plist* resides at */Volumes/EFI/EFI/CLOVER/config.plist* and is one of the tougher files to work with for those new to the Hackintosh world. We'll go into some of the basics of the structure here, then break out into different sections for different hardware config setup.

## What Is It?

The *config.plist* is an XML property list. XML is a markup language that shares a lot of similarities with HTML. This means you've got a few different data types available to you, and most of the structure revolves around keeping track of opening and closing tags.

### The Structure

When Clover explores a *config.plist* it expects to have certain parts in certain spots. The order and scope of your config are very important as putting information in the wrong spot can effectively hide it from Clover. You can view the general layout that Clover expects on the [Clover Wiki](https://sourceforge.net/p/cloverefiboot/wiki/Configuration/#configplist-structure).

### Data Types

There are a few major data types we'll run into when working with the config. I'll outline the most common here. **Note -** I'm only using the opening tags here, when actually working with the following types we'll need to make sure we clean up after ourselves and close our tags.

#### Strings

`<string>This is a string</string>`

Strings are just text. Not terribly crazy - you will see them used a lot for comments and other such things.

#### Integers

`<integer>1</integer>`

These are just whole numbers. Again, nothing too wild here.

#### Data

`<data>RXh0ZXJuYWw=</data>`

While this looks similar to the *strings* above, it's actually the *base64* representation of some data. *Wtf does that mean?* You can read up on it [here](https://en.wikipedia.org/wiki/Base64), but in summation - it's a slick way to save binary data in a text format without it getting lost when copied, moved, etc. What's even more crazy is that you can take the above base64 data and convert it to ASCII via the following in Terminal.app:

`echo RXh0ZXJuYWw= | python -m base64 -d && echo`

This will output `External` on the next line. We use the `&& echo` to output a newline after our text is spit out - this makes it easier to read.

You can also convert from ASCII to base64 (handy for working with ACPI renames - more about that later) with the following in Terminal.app:

`echo -n External | base64`

This will spit out `RXh0ZXJuYWw=` which is exactly what we'd expect.

**Note -** Many plist editors (Clover Configurator, Xcode, etc) will display data as *hexadecimal* instead of *base64*, so make sure you pay attention to which you're using.

#### Booleans

`<true/>` or `<false/>`

These are *boolean* values. You can think of them as *on/off* values. Unlike the other types listed here, these are both an opening and closing tag at once so they don't require a matching tag.

#### Arrays

```markup
<array>
    <string>Bob</string>
    <string>Jim</string>
    <string>Chris</string>
</array>
```

This is an ordered list of items. If we wanted to gather up a collection of names, we could store them as `<string>` values in our `<array>` like the above example. They are accessed by index (which is just the number they're at in the list).

#### Dictionaries

```markup
<dict>
    <key>Name</key>
    <string>Bob</string>
    <key>Age</key>
    <integer>20</integer>
    <key>Knows XML</key>
    <true/>
</dict>
```

This denotes a *dictionary*. These, like *arrays* are great for storing extra collections of data, but instead of being index based, they utilize *key/value* organization. As you can see from the above example, we are able to store specific data about *Bob* through the use of these *key/value* pairs. All the keys are just text (like our strings).

### Examples

Let's go over some *before/after* examples with some pretend *config.plist* data to hopefully remove some of the mystery that happens in this wizard's closet.

#### Change True/False

In this first example, we're just going to change a boolean value from true to false, or vise versa. I'll use the *Disabled* value inside a *KextsToPatch* entry to make this actually a real-world example. First, I'll give us the *KextsToPatch* entry we'll be working with:

```markup
<dict>
    <key>Comment</key>
    <string>External icons patch</string>
    <key>Disabled</key>
    <false/>
    <key>Find</key>
    <data>
    RXh0ZXJuYWw=
    </data>
    <key>InfoPlistPatch</key>
    <false/>
    <key>Name</key>
    <string>AppleAHCIPort</string>
    <key>Replace</key>
    <data>
    SW50ZXJuYWw=
    </data>
</dict>
```

Whew, that might look like a lot up front, but we'll break things down. Firstly, I'll go over what the different keys mean:

* `Comment` - this is just a comment to describe what the patch is doing.
* `Disabled` - this is a bit counter-intuitive, but it's a boolean value that determines whether or not this patch is disabled. If set to `<true/>`, the patch will be disabled, and Clover will ignore it. If set to `<false/>` the patch is *not* disabled, and it will be applied.
* `InfoPlistPatch` - this is a boolean value that tells Clover if we're patching the Info.plist of the kext instead of the binary.
* `Name` - this is the actual kext we intend to patch.
* `Find` - this is the base64 data we want to look for in the binary to patch.
* `Replace` - this is what we will be replacing the `Find` data with (if we find it).

Alright, now I'll explain what this patch is actually for. Via the information in this patch, Clover will look for the *AppleAHCIPort* kext and search for `RXh0ZXJuYWw=` (which becomes `External` when we decode the data) and replace it with `SW50ZXJuYWw=` (which becomes `Internal` when we decode it). The end result is that drives that are hot-pluggable (and normally considered external drives) will be displayed as internal drives and not have the orange icon on the desktop. This patching happens on the fly, and is non-destructive - meaning that the *AppleAHCIPort* kext remains untouched on the system.

So - I guess at this point, I should explain how we would change a boolean value to disable this patch. I mentioned before how the `Disabled` key works - wo we'll change the `<false/>` on the next line to `<true/>` which sets this patch to *disabled* like so:

```markup
<dict>
    <key>Comment</key>
    <string>External icons patch</string>
    <key>Disabled</key>
    <true/>
    <key>Find</key>
    <data>
    RXh0ZXJuYWw=
    </data>
    <key>InfoPlistPatch</key>
    <false/>
    <key>Name</key>
    <string>AppleAHCIPort</string>
    <key>Replace</key>
    <data>
    SW50ZXJuYWw=
    </data>
</dict>
```

Not too scary, right?

#### Adding a New Dict to an Array

This is one that I see quite often that can be a bit overwhelming for new folks. If you are told to add a new patch to *config.plist -> ACPI -> DSDT -> Patches*, we'd first pop open our *config.plist* and see what we're working with.

We'll assume for this example that the config looks like so:

```markup
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>ACPI</key>
    <dict>
        <key>DSDT</key>
        <dict>
            <key>Fixes</key>
            <dict>
                <key>FixHPET</key>
                <true/>
                <key>FixIPIC</key>
                <true/>
                <key>FixRTC</key>
                <true/>
                <key>FixTMR</key>
                <true/>
            </dict>
            <key>Patches</key>
            <array>
                <dict>
                    <key>Comment</key>
                    <string>change OSID to XSID (to avoid match against _OSI XOSI patch)</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    T1NJRA==
                    </data>
                    <key>Replace</key>
                    <data>
                    WFNJRA==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change _OSI to XOSI</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    X09TSQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    WE9TSQ==
                    </data>
                </dict>
            </array>
```

As we look down the config, starting at the top, we can follow that path I outlined before. We see *ACPI*, and under that *DSDT*. Then underneath *DSDT* is *Fixes* and in-line with that is *Patches*. We're not concerned with the *Fixes* section currently, so we'll just ignore that and focus on the *Patches*.

Firstly, I'll point out that under the `<key>Patches</key>` is an opening array tag (`<array>`) - and then we have 2 dictionaries - each with similar keys to what we worked with in the prior example (*Comment*, *Disabled*, *Find*, *Replace*). After the dictionaries, we see the closing array tag (`</array>`). Our goal is to add a new dictionary in between the `<array>` and `</array>` tags while also avoiding slicing up the other existing dictionaries. The data that we'll be adding looks like so:

```markup
<dict>
    <key>Comment</key>
    <string>change SAT0 to SATA</string>
    <key>Disabled</key>
    <false/>
    <key>Find</key>
    <data>
    U0FUMA==
    </data>
    <key>Replace</key>
    <data>
    U0FUQQ==
    </data>
</dict>
```

Like I mentioned prior, arrays are ordered - but for this example, it doesn't matter whether we put our new dictionary before the existing 2, after them, or in between them. I'm going to add it to the end though - just above that last `</array>` tag like so:

```markup
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>ACPI</key>
    <dict>
        <key>DSDT</key>
        <dict>
            <key>Fixes</key>
            <dict>
                <key>FixHPET</key>
                <true/>
                <key>FixIPIC</key>
                <true/>
                <key>FixRTC</key>
                <true/>
                <key>FixTMR</key>
                <true/>
            </dict>
            <key>Patches</key>
            <array>
                <dict>
                    <key>Comment</key>
                    <string>change OSID to XSID (to avoid match against _OSI XOSI patch)</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    T1NJRA==
                    </data>
                    <key>Replace</key>
                    <data>
                    WFNJRA==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change _OSI to XOSI</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    X09TSQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    WE9TSQ==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change SAT0 to SATA</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    U0FUMA==
                    </data>
                    <key>Replace</key>
                    <data>
                    U0FUQQ==
                    </data>
                </dict>
            </array>
```

#### More Examples

I'll try to keep my ears open for more plist editing examples that people have issues with, and add them as needed.


# Ivy Bridge

We'll go through the config.plist sections, one at a time for a Ivy Bridge desktop setup.

## Starting Points

I like to start with either the stock *config.plist* that Clover gives you, or with just a blank canvas. In the next examples, I'll show you how I set things up from scratch; if you start from somewhere else, you may have more things checked/set than I do - but you'll want to follow along with what I do.

I'll also include the raw xml examples too in order to show those that work with a text editor (as I prefer to).

## ACPI

The default Clover settings are pretty overdone and can cause some issues. We'll keep this section fairly minimal, and I'll go through a bit of *why we do that* for each part as well.

### Raw XML

```markup
    <key>ACPI</key>
    <dict>
        <key>DSDT</key>
        <dict>
            <key>Fixes</key>
            <dict>
                <key>AddMCHC</key>
                <true/>
                <key>FixHPET</key>
                <true/>
                <key>FixIPIC</key>
                <true/>
                <key>FixRTC</key>
                <true/>
                <key>FixShutdown</key>
                <true/>
                <key>FixTMR</key>
                <true/>
            </dict>
            <key>Patches</key>
            <array>
                <dict>
                    <key>Comment</key>
                    <string>change EHC1 to EH01</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    RUhDMQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    RUgwMQ==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change EHC2 to EH02</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    RUhDMg==
                    </data>
                    <key>Replace</key>
                    <data>
                    RUgwMg==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change XHCI to XHC</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    WEhDSQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    WEhDXw==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change XHC1 to XHC</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    WEhDMQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    WEhDXw==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change SAT0 to SATA</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    U0FUMA==
                    </data>
                    <key>Replace</key>
                    <data>
                    U0FUQQ==
                    </data>
                </dict>
            </array>
        </dict>
        <key>DropTables</key>
        <array>
            <dict>
                <key>Signature</key>
                <string>SSDT</string>
                <key>TableId</key>
                <string>CpuPm</string>
            </dict>
            <dict>
                <key>Signature</key>
                <string>SSDT</string>
                <key>TableId</key>
                <string>Cpu0Ist</string>
            </dict>
            <dict>
                <key>Signature</key>
                <string>DMAR</string>
            </dict>
            <dict>
                <key>Signature</key>
                <string>MATS</string>
            </dict>
        </array>
        <key>FixHeaders</key>
        <true/>
        <key>SSDT</key>
        <dict>
            <key>Generate</key>
            <dict/>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

### Explanation

#### Patches:

![Ivy Acpi CC Section 1](/files/-LXeePVH_v3tU6tHR_Zv)

![Ivy Acpi CC Section 2](/files/-LXeeSaWkVDIsRu5KaZD)

The first thing we'll go over is the *Patches* section. This section allows us to dynamically rename parts of the DSDT via Clover. Since we're not running a real mac, and macOS is pretty particular with how things are named, we can make non-destructive changes to keep things mac-friendly. We have three entries here:

* *change EHC1 to EH01 -* helps avoid a conflict with built-in USB injectors
* *change EHC2 to EH02* - helps avoid a conflict with built-in USB injectors
* *change XHC1 to XHC -* helps avoid a conflict with built-in USB injectors
* *change XHCI to XHC* - helps avoid a conflict with built-in USB injectors
* *change SAT0 to SATA* - for potential SATA compatibility

#### Fixes:

If we look then at the *Fixes* section, we'll see that we have a few things checked (there are 2 pages, so I included 2 screenshots):

* *FixShutdown* - this can help with some boards that prefer to restart instead of shutdown. Sometimes it can cause shutdown issues on other boards (ironic, right?), so if you have issues shutting down with this enabled, look at disabling it.
* The remaining fixes help avoid IRQ conflicts and etc, and are not known to cause issues. They may not be necessary for all hardware, but do not negatively impact anything if applied.

**Note:** If you use an Ivy Bridge CPU with a 6-series motherboard, you will also need to enable *AddDTGP* and *AddIMEI*, and you will have to fake the IMEI to `0x1e3a8086` (I will go over this in the *Devices* section).

#### Drop Tables:

We touched in gently on DSDT with our *Patches* section - and this is a a bit of an extension of that. SSDT is like a sub-section of DSDT. The *Drop Tables* section allows us to omit certain SSDT tables from loading (as I mentioned before, mac and PC DSDT is different, and macOS can be rather picky). The two that I've added are as follows:

* *CpuPm* and *Cpu0Ist* - these drop tables related to CPU power management which allow us to supplement the data by generating an SSDT.aml via Pike's [ssdtPRGen.sh](https://github.com/Piker-Alpha/ssdtPRGen.sh) script.
* *DMAR* - this prevents some issues with Vt-d; which is PCI passthrough for VMs, and not very functional (if at all?) on Hackintoshes.
* *MATS* - with High Sierra on up this table is parsed, and can sometimes contain unprintable characters that can lead to a kernel panic.

#### FixHeaders and Generate:

The only other things we've done on this page are enable these two checkboxes.

* *FixHeaders* - this is just a double-up of our *MATS* table dropping. This checkbox tells Clover to sanitize headers to avoid kernel panics related to unprintable characters.
* *Generate* - this is set to an empty dictionary (you can acheive the same by ticking any of the *Generate* options, then unticking them in CC) which prevents Clover from generating any C or P states, and also prevents it from adding *PluginType* (as that's for Haswell and newer CPUs).

## Boot

We don't need to do *too much* here, but we'll tweak a few things.

### Raw XML

```markup
    <key>Boot</key>
    <dict>
        <key>Arguments</key>
        <string>keepsyms=1 dart=0 debug=0x100 -xcpm -v</string>
        <key>DefaultVolume</key>
        <string>LastBootedVolume</string>
        <key>Timeout</key>
        <integer>5</integer>
    </dict>
```

### Clover Configurator Screenshots

### Explanation

#### Arguments:

We have a few boot args set here:

![Ivy Boot CC Section](/files/-LmlLnxsGw5mqdo0lhot)

* `-v` - this enables verbose mode, which shows all the *behind-the-scenes* text that scrolls by as you're booting instead of the Apple logo and progress bar. It's invaluable to any Hackintosher, as it gives you an inside look at the boot process, and can help you identify issues, problem kexts, etc.
* `dart=0` - this is just an extra layer of protection against Vt-d issues.
* `debug=0x100` - this prevents a reboot on a kernel panic. That way you can (hopefully) glean some useful info and follow the breadcrumbs to get past the issues.
* `keepsyms=1` - this is a companion setting to `debug=0x100` that tells the OS to also print the symbols on a kernel panic. That can give some more helpful insight as to what's causing the panic itself.
* `-xcpm` - attempts to force Ivy CPUs to use XnuCPUPowerManagement

#### DefaultBootVolume and Timeout:

These are the only other settings I've updated in this section.

* *DefaultBootVolume* - this uses NVRAM to remember which volume was last booted by Clover, and auto-select that at the next boot.
* *Timeout* - this is the number of seconds before the *DefaultBootVolume* auto-boots. You can set this to `-1` to avoid all timeout, or to `0` to skip the GUI entirely. If set to `0`, you can press any keys at boot to get the GUI to show back up in case of issues.

## Boot Graphics

Nothing here - just the stock settings. You could adjust this if Clover's scaling needs changes, but I don't mess with it.

## Cpu

Again, nothing here gets changed in most setups I've worked with.

## Devices

We'll handle some slick property injection for *WhateverGreen* here, and do some basic audio setup.

### Raw XML

```markup
    <key>Devices</key>
    <dict>
        <key>Audio</key>
        <dict>
            <key>Inject</key>
            <integer>1</integer>
            <key>ResetHDA</key>
            <true/>
        </dict>
        <key>Properties</key>
        <dict>
            <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
            <dict>
                <key>AAPL,ig-platform-id</key>
                <data>
                CgBmAQ==
                </data>
            </dict>
        </dict>
        <key>USB</key>
        <dict>
            <key>FixOwnership</key>
            <true/>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

### Explanation

#### Fake ID:

This section remains empty for our example setup, however, if you run an Ivy CPU with a 6-series board, you will need to have your IMEI faked as follows:

```markup
        <key>FakeID</key>
        <dict>
            <key>IMEI</key>
            <string>0x1e3a8086</string>
        </dict>
```

![Ivy Devices CC Section](/files/-LXeeh4tt0XHYrlEPWvb)

#### USB:

Under this section, we ensure that *Inject* and *FixOwnership* are selected to avoid issues with hanging at a half-printed line somewhere around the `Enabling Legacy Matching` verbose line. You can also get past that by enabling *XHCI Hand Off* in BIOS.

#### Audio:

Here we set our audio to inject *Layout 1* - this may or may not be compatible with your codec, but you can check on [*AppleALC's Supported Codec Page*](https://github.com/acidanthera/AppleALC/wiki/Supported-codecs).

We also enabled *ResetHDA* which puts the codec back in a neutral state between OS reboots. This prevents some issues with no audio after booting to another OS and then back.

#### Properties:

This section is setup via Headkaze's [*Intel Framebuffer Patching Guide*](https://www.insanelymac.com/forum/topic/334899-intel-framebuffer-patching-using-whatevergreen/?tab=comments#comment-2626271) and applies only one actual property to begin, which is the *ig-platform-id*. The way we get the proper value for this is to look at the ig-platform-id we intend to use, then swap the pairs of hex bytes. For this, we assume the user has an HD 4000 - HD 2000 and 2500 are *not* supported in macOS, and if you have them, you can ignore the following iGPU-related info.

If we think of our ig-plat as `0xAABBCCDD`, our swapped version would look like `0xDDCCBBAA`.

The ig-platform-id we use is as follows:

* `0x0166000A` - this is the standard hex for the ig-plat
  * `0A006601` when hex-swapped
  * `CgBmAQ==` when the hex-swapped version is converted to base64

## Disable Drivers

We have nothing to do here.

## Gui

### Raw XML

```markup
    <key>GUI</key>
    <dict>
        <key>Scan</key>
        <dict>
            <key>Entries</key>
            <true/>
            <key>Tool</key>
            <true/>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

![Ivy Gui CC Section](/files/-LNfcNjF_D5Rlf8RgDYe)

### Explanation

#### Scan:

The only settings I've tweaked on this page are the *Scan* settings. I've selected *Custom*, then checked everything except *Legacy* and *Kernel*. This just omits some of the unbootable entries in Clover to clean up the menu.

#### Hide Volumes:

I haven't added anything here, but you *can* hide unwanted volumes here. You can do so by either adding the volume's name, or UUID.

To hide extra APFS entries, add the following to this list:

* `Preboot`
* `VM`

To hide all Recovery partitions, add `Recovery` to the list.

To get the UUID of a drive to hide, you can use the following terminal command:

```
diskutil info diskXsY | grep -i "Partition UUID" | rev | cut -d' ' -f 1 | rev
```

Make sure to replace `diskXsY` with the actual disk number of the volume you'd like to hide.

#### Theme:

If you want to test out a new theme (and I suggest you look at [*clover-next-black*](https://github.com/al3xtjames/clover-theme-next-black)), you can add the unzipped theme folder to the */Volumes/EFI/EFI/CLOVER/themes* directory, then type the name of the folder in the *Theme* text field to apply it.

## Graphics

In the past, we'd setup the iGPU here, but since we already did that via Properties in the *Devices* section, we have nothing to really configure here. **NOTE**: When Clover detects an Intel iGPU, it *automatically* enables Intel Injection if the Graphics section doesn't exist in the config.plist. To bypass this, you can explicitly disable injection using the raw XML below, or by clicking the "Inject Intel" button once to check it, and once to uncheck it in CC.

### Raw XML

```markup
    <key>Graphics</key>
    <dict>
        <key>Inject</key>
        <false/>
    </dict>
```

## Kernel And Kext Patches

### Raw XML

```markup
    <key>KernelAndKextPatches</key>
    <dict>
        <key>AppleIntelCPUPM</key>
        <true/>
        <key>KernelPm</key>
        <true/>
        <key>KextsToPatch</key>
        <array>
            <dict>
                <key>Comment</key>
                <string>Port limit increase</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g710////EA==
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.12.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g710////Gw==
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Port limit increase (RehabMan)</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g32IDw+DpwQAAA==
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.13.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g32ID5CQkJCQkA==
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Port limit increase (Ricky)</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g/sPD4OPBAAA
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.14.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g/sPkJCQkJCQ
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>External Icons Patch</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                RXh0ZXJuYWw=
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>Name</key>
                <string>AppleAHCIPort</string>
                <key>Replace</key>
                <data>
                SW50ZXJuYWw=
                </data>
            </dict>
        </array>
    </dict>
```

### Clover Configurator Screenshots

### Explanation

In this section, we've enabled a few settings and added some kext patches.

#### Checkboxes:

We have a couple checkboxes selected here:

* *Apple RTC* - this ensures that we don't have a BIOS reset on reboot.
* *KernelPM* - this setting prevents writing to MSR 0xe2 which can prevent a kernel panic at boot when using XCPM.
* *AppleIntelCPUPM* - this does the same as *KernelPM*, but when using AppleIntelCPUPowerManagement instead.

![Ivy KernelAndKextPatches CC Section](/files/-LZbHk9J95fZ4ZuOEKoS)

#### KextsToPatch:

We added 5 different kexts to patch here. Four of them are for USB port limit increases, and the last acts as an *orange icons fix* - when internal drives are hotpluggable, and treated as external drives.

You'll notice that there are MatchOS values set for each of the USB port limit patches. You can remove any of the entries for OS versions you don't intend to run. They won't do any harm being there, but if you want a clean, minimal plist, there's no sense in having them.

## RtVariables And SMBIOS

### Raw XML

```markup
    <key>RtVariables</key>
    <dict>
        <key>BooterConfig</key>
        <string>0x28</string>
        <key>CsrActiveConfig</key>
        <string>0x3E7</string>
        <key>MLB</key>
        <string>C02253902J9F2FRCB</string>
        <key>ROM</key>
        <string>UseMacAddr0</string>
    </dict>
    <key>SMBIOS</key>
    <dict>
        <key>BoardSerialNumber</key>
        <string>C02253902J9F2FRCB</string>
        <key>ProductName</key>
        <string>iMac13,2</string>
        <key>SerialNumber</key>
        <string>C02JX0KSDNCW</string>
        <key>SmUUID</key>
        <string>FDDCE665-D5C0-4738-8F80-77380686E42B</string>
    </dict>
```

### Clover Configurator Screenshots

### Explanation

For setting up the SMBIOS info, I use acidanthera's [*macserial*](https://github.com/acidanthera/macserial) application. I wrote a [*python script*](https://github.com/corpnewt/GenSMBIOS) that can leverage it as well (and auto-saves to the config.plist when selected). There's plenty of info that's left blank to allow Clover to fill in the blanks; this means that updating Clover will update the info passed, and not require you to also update your config.plist.

For this Ivy Bridge example, I chose the *iMac13,2* SMBIOS.

To get the SMBIOS info generated with *macserial*, you can run it with the `-a` argument (which generates serials and board serials for all supported platforms). You can also parse it with `grep` to limit your search to one SMBIOS type.

With our *iMac13,2* example, we would run *macserial* like so via the terminal:

```
macserial -a | grep -i iMac13,2
```

Which would give us output similar to the following:

![Ivy Rt Variables CC Section](/files/-LXef8ugx9GeNFHjRXXm)

![Ivy SMBIOS CC Section](/files/-LXefD9ZHmiI6umpmc-_)

```
      iMac13,2 | C02JX0KSDNCW | C02253902J9F2FRCB
      iMac13,2 | C02KC3Y9DNCW | C02309401GUF2FR1M
      iMac13,2 | C02KPYYDDNCW | C02319902J9F2FRJA
      iMac13,2 | C02LLSYJDNCW | C02343301J9F2FR1F
      iMac13,2 | C02JF0N3DNCW | C02238404GUF2FR1M
      iMac13,2 | C02JT6ZFDNCW | C02250104QXF2FRFB
      iMac13,2 | C02LT0GDDNCW | C02350130J9F2FR1H
      iMac13,2 | C02J1069DNCW | C02227310J9F2FRAD
      iMac13,2 | C02JN0Y4DNCW | C02245902CDF2FRFB
      iMac13,2 | C02JWJZSDNCW | C02252100GUF2FRCB
```

The order is `Product | Serial | Board Serial (MLB)`

The `iMac13,2` part gets copied to *SMBIOS -> Product Name*.

The `Serial` part gets copied to *SMBIOS -> Serial Number.*

The `Board Serial` part gets copied to *SMBIOS -> Board Serial Number* as well as *Rt Variables -> MLB.*

We can create an SmUUID by running `uuidgen` in the terminal (or it's auto-generated via my *GenSMBIOS* script) - and that gets copied to *SMBIOS -> SmUUID*.

We set *Rt Variables -> ROM* to `UseMacAddr0` which just utilizes our onboard Mac address - this should be unique enough to not conflict with any others.

*BooterConfig* gets set to `0x28`, and *CsrActiveConfig* is set to `0x3e7` which effectively disables SIP. You can choose a number of other options to enable/disable sections of SIP. Some common ones are as follows:

* `0x0` - SIP completely enabled
* `0x3` - Allow unsigned kexts and writing to protected fs locations
* `0x3e7` - SIP completely disabled

## System Parameters

### Raw XML

```markup
    <key>SystemParameters</key>
    <dict>
        <key>InjectKexts</key>
        <string>Yes</string>
        <key>InjectSystemID</key>
        <true/>
    </dict>
```

### Clover Configurator Screenshots

![System Parameters CC Section](/files/-LR2oVwEJOE9R5Z4kexb)

### Explanation

#### Inject Kexts:

This setting has 3 modes:

* `Yes` - this tells Clover to inject kexts from the EFI regardless.
* `No` - this tells Clover not to inject kexts from the EFI.
* `Detect` - this has Clover inject kexts only if *FakeSMC.kext* or *VirtualSMC.kext* are not in the kext cache.

We set it to `Yes` to make sure that all the kexts we added before get injected properly.

#### InjectSystemID

This setting tells clover to set the SmUUID as the `system-id` at boot - which is important for iMessage and such.

## Saving

At this point, you can do *File -> Save* to save the config.plist. If you have issues saving directly to the EFI, you can save it on the Desktop, then just copy it over. I'll leave the [sample config.plist here](https://github.com/corpnewt/Hackintosh-Guide/blob/master/Configs/Ivy%20Bridge/config.plist) too.


# Haswell

We'll go through the config.plist sections, one at a time for a Haswell desktop setup.

## Starting Points

I like to start with either the stock *config.plist* that Clover gives you, or with just a blank canvas. In the next examples, I'll show you how I set things up from scratch; if you start from somewhere else, you may have more things checked/set than I do - but you'll want to follow along with what I do.

I'll also include the raw xml examples too in order to show those that work with a text editor (as I prefer to).

## ACPI

The default Clover settings are pretty overdone and can cause some issues. We'll keep this section fairly minimal, and I'll go through a bit of *why we do that* for each part as well.

### Raw XML

```markup
    <key>ACPI</key>
    <dict>
        <key>DSDT</key>
        <dict>
            <key>Fixes</key>
            <dict>
                <key>AddMCHC</key>
                <true/>
                <key>FixHPET</key>
                <true/>
                <key>FixIPIC</key>
                <true/>
                <key>FixRTC</key>
                <true/>
                <key>FixShutdown</key>
                <true/>
                <key>FixTMR</key>
                <true/>
            </dict>
            <key>Patches</key>
            <array>
                <dict>
                    <key>Comment</key>
                    <string>change EHC1 to EH01</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    RUhDMQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    RUgwMQ==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change EHC2 to EH02</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    RUhDMg==
                    </data>
                    <key>Replace</key>
                    <data>
                    RUgwMg==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change XHCI to XHC</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    WEhDSQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    WEhDXw==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change XHC1 to XHC</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    WEhDMQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    WEhDXw==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change SAT0 to SATA</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    U0FUMA==
                    </data>
                    <key>Replace</key>
                    <data>
                    U0FUQQ==
                    </data>
                </dict>
            </array>
        </dict>
        <key>DropTables</key>
        <array>
            <dict>
                <key>Signature</key>
                <string>DMAR</string>
            </dict>
            <dict>
                <key>Signature</key>
                <string>MATS</string>
            </dict>
        </array>
        <key>FixHeaders</key>
        <true/>
        <key>SSDT</key>
        <dict>
            <key>Generate</key>
            <dict>
                <key>PluginType</key>
                <true/>
            </dict>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

![Haswell Acpi CC Section 1](/files/-LXeht9xaZp056mMuWOv)

![Haswell Acpi CC Section 2](/files/-LXehw0nkkpC0q7crfxn)

### Explanation

#### Patches:

The first thing we'll go over is the *Patches* section. This section allows us to dynamically rename parts of the DSDT via Clover. Since we're not running a real mac, and macOS is pretty particular with how things are named, we can make non-destructive changes to keep things mac-friendly. We have three entries here:

* *change EHC1 to EH01 -* helps avoid a conflict with built-in USB injectors
* *change EHC2 to EH02* - helps avoid a conflict with built-in USB injectors
* *change XHC1 to XHC -* helps avoid a conflict with built-in USB injectors
* *change XHCI to XHC* - helps avoid a conflict with built-in USB injectors
* *change SAT0 to SATA* - for potential SATA compatibility

#### Fixes:

If we look then at the *Fixes* section, we'll see that we have a few things checked (there are 2 pages, so I included 2 screenshots):

* *FixShutdown* - this can help with some boards that prefer to restart instead of shutdown. Sometimes it can cause shutdown issues on other boards (ironic, right?), so if you have issues shutting down with this enabled, look at disabling it.
* The remaining fixes help avoid IRQ conflicts and etc, and are not known to cause issues. They may not be necessary for all hardware, but do not negatively impact anything if applied.

#### Drop Tables:

We touched in gently on DSDT with our *Patches* section - and this is a a bit of an extension of that. SSDT is like a sub-section of DSDT. The *Drop Tables* section allows us to omit certain SSDT tables from loading (as I mentioned before, mac and PC DSDT is different, and macOS can be rather picky). The two that I've added are as follows:

* *DMAR* - this prevents some issues with Vt-d; which is PCI passthrough for VMs, and not very functional (if at all?) on Hackintoshes.
* *MATS* - with High Sierra on up this table is parsed, and can sometimes contain unprintable characters that can lead to a kernel panic.

#### FixHeaders and PluginType:

The only other things we've done on this page are enable these two checkboxes.

* *FixHeaders* - this is just a double-up of our *MATS* table dropping. This checkbox tells Clover to sanitize headers to avoid kernel panics related to unprintable characters.
* *PluginType* - this injects some DSDT data to get *X86PlatformPlugin* to load - giving us a leg-up on native CPU power management. This setting only works on Haswell and newer CPUs though.

## Boot

We don't need to do *too much* here, but we'll tweak a few things.

### Raw XML

```markup
    <key>Boot</key>
    <dict>
        <key>Arguments</key>
        <string>keepsyms=1 dart=0 debug=0x100 -v</string>
        <key>DefaultVolume</key>
        <string>LastBootedVolume</string>
        <key>Timeout</key>
        <integer>5</integer>
    </dict>
```

### Clover Configurator Screenshots

![Haswell Boot CC Section](/files/UUVdd37GZsnOBt2mIywB)

### Explanation

#### Arguments:

We have a few boot args set here:

* `-v` - this enables verbose mode, which shows all the *behind-the-scenes* text that scrolls by as you're booting instead of the Apple logo and progress bar. It's invaluable to any Hackintosher, as it gives you an inside look at the boot process, and can help you identify issues, problem kexts, etc.
* `dart=0` - this is just an extra layer of protection against Vt-d issues.
* `debug=0x100` - this prevents a reboot on a kernel panic. That way you can (hopefully) glean some useful info and follow the breadcrumbs to get past the issues.
* `keepsyms=1` - this is a companion setting to `debug=0x100` that tells the OS to also print the symbols on a kernel panic. That can give some more helpful insight as to what's causing the panic itself.

#### DefaultBootVolume and Timeout:

These are the only other settings I've updated in this section.

* *DefaultBootVolume* - this uses NVRAM to remember which volume was last booted by Clover, and auto-select that at the next boot.
* *Timeout* - this is the number of seconds before the *DefaultBootVolume* auto-boots. You can set this to `-1` to avoid all timeout, or to `0` to skip the GUI entirely. If set to `0`, you can press any keys at boot to get the GUI to show back up in case of issues.

## Boot Graphics

Nothing here - just the stock settings. You could adjust this if Clover's scaling needs changes, but I don't mess with it.

## Cpu

Again, nothing here gets changed in most setups I've worked with.

## Devices

We'll handle some slick property injection for *WhateverGreen* here, and do some basic audio setup.

### Raw XML

```markup
    <key>Devices</key>
    <dict>
        <key>Audio</key>
        <dict>
            <key>Inject</key>
            <integer>1</integer>
            <key>ResetHDA</key>
            <true/>
        </dict>
        <key>Properties</key>
        <dict>
            <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
            <dict>
                <key>AAPL,ig-platform-id</key>
                <data>
                AwAiDQ==
                </data>
            </dict>
        </dict>
        <key>USB</key>
        <dict>
            <key>FixOwnership</key>
            <true/>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

![Haswell Devices CC Section - iGPU](/files/-LNf_kX-tIsLsBHJEMSi)

![Haswell Devices CC Section - iGPU (Connectorless) + dGPU](/files/-LNf_WaupsAZjEAgvQN_)

![Device-Id fake for HD 4400 --\&gt; HD 4600](/files/-LRN_ZSmC5kTQSywvNIi)

### Explanation

#### Fake ID:

This section remains empty for our example setup. In the past, almost-supported iGPUs (like the HD 4400) would get faked to a supported iGPU here, but we'll be using the cleaner Properties section for this.

#### USB:

Under this section, we ensure that *Inject* and *FixOwnership* are selected to avoid issues with hanging at a half-printed line somewhere around the `Enabling Legacy Matching` verbose line. You can also get past that by enabling *XHCI Hand Off* in BIOS.

#### Audio:

Here we set our audio to inject *Layout 1* - this may or may not be compatible with your codec, but you can check on [*AppleALC's Supported Codec Page*](https://github.com/acidanthera/AppleALC/wiki/Supported-codecs).

We also enabled *ResetHDA* which puts the codec back in a neutral state between OS reboots. This prevents some issues with no audio after booting to another OS and then back.

#### Properties:

This section is setup via Headkaze's [*Intel Framebuffer Patching Guide*](https://www.insanelymac.com/forum/topic/334899-intel-framebuffer-patching-using-whatevergreen/?tab=comments#comment-2626271) and applies only one actual property to begin, which is the *ig-platform-id*. The way we get the proper value for this is to look at the ig-platform-id we intend to use, then swap the pairs of hex bytes.

If we think of our ig-plat as `0xAABBCCDD`, our swapped version would look like `0xDDCCBBAA`.

The two ig-platform-id's we use are as follows:

* `0x0D220003` - this is used when the iGPU is used to drive a display
  * `0300220D` when hex-swapped
  * `AwAiDQ==` when the hex-swapped version is converted to base64
* `0x04120004` - this is used when the iGPU is only used for compute tasks, and doesn't drive a display
  * `04001204` when hex-swapped
  * `BAASBA==` when the hex-swapped version is converted to base64

I added another screenshot as well that shows a `device-id` fake in case you have an HD 4400 which is unsupported in macOS.

For this - we follow a similar procedure as our above ig-platform-id hex swapping - but this time, we only work with the first two pairs of hex bytes. If we think of our device id as `0xAABB0000`, our swapped version would look like `0xBBAA0000`. We don't do anything with the last 2 pairs of hex bytes.

The device-id fake is setup like so:

* `0x04120000` - this is the device id for HD 4600 which *does* have support in macOS
  * `12040000` when hex swapped
  * `EgQAAA==` when the hex-swapped version is converted to base64

If using the raw xml, your Properties would look like this (make sure to still use the appropriate ig-platform-id for your setup):

```markup
        <key>Properties</key>
        <dict>
            <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
            <dict>
                <key>device-id</key>
                <data>
                EgQAAA==
                </data>
                <key>AAPL,ig-platform-id</key>
                <data>
                AwAiDQ==
                </data>
            </dict>
        </dict>
```

## Disable Drivers

We have nothing to do here.

## Gui

### Raw XML

```markup
    <key>GUI</key>
    <dict>
        <key>Scan</key>
        <dict>
            <key>Entries</key>
            <true/>
            <key>Tool</key>
            <true/>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

![Haswell Gui CC Section](/files/-LNfcNjF_D5Rlf8RgDYe)

### Explanation

#### Scan:

The only settings I've tweaked on this page are the *Scan* settings. I've selected *Custom*, then checked everything except *Legacy* and *Kernel*. This just omits some of the unbootable entries in Clover to clean up the menu.

#### Hide Volumes:

I haven't added anything here, but you *can* hide unwanted volumes here. You can do so by either adding the volume's name, or UUID.

To hide extra APFS entries, add the following to this list:

* `Preboot`
* `VM`

To hide all Recovery partitions, add `Recovery` to the list.

To get the UUID of a drive to hide, you can use the following terminal command:

```
diskutil info diskXsY | grep -i "Partition UUID" | rev | cut -d' ' -f 1 | rev
```

Make sure to replace `diskXsY` with the actual disk number of the volume you'd like to hide.

#### Theme:

If you want to test out a new theme (and I suggest you look at [*clover-next-black*](https://github.com/al3xtjames/clover-theme-next-black)), you can add the unzipped theme folder to the */Volumes/EFI/EFI/CLOVER/themes* directory, then type the name of the folder in the *Theme* text field to apply it.

## Graphics

In the past, we'd setup the iGPU here, but since we already did that via Properties in the *Devices* section, we have nothing to really configure here. **NOTE**: When Clover detects an Intel iGPU, it *automatically* enables Intel Injection if the Graphics section doesn't exist in the config.plist. To bypass this, you can explicitly disable injection using the raw XML below, or by clicking the "Inject Intel" button once to check it, and once to uncheck it in CC.

### Raw XML

```markup
    <key>Graphics</key>
    <dict>
        <key>Inject</key>
        <false/>
    </dict>
```

## Kernel And Kext Patches

### Raw XML

```markup
    <key>KernelAndKextPatches</key>
    <dict>
        <key>KernelPm</key>
        <true/>
        <key>KextsToPatch</key>
        <array>
            <dict>
                <key>Comment</key>
                <string>Port limit increase</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g710////EA==
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.12.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g710////Gw==
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Port limit increase (RehabMan)</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g32IDw+DpwQAAA==
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.13.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g32ID5CQkJCQkA==
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Port limit increase (PMHeart)</string>
                <key>Disabled</key>
                <true/>
                <key>Find</key>
                <data>
                g/sPD4MDBQAA
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.14.0</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g/sPkJCQkJCQ
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Port limit increase (Ricky)</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g/sPD4OPBAAA
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.14.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g/sPkJCQkJCQ
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>External Icons Patch</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                RXh0ZXJuYWw=
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>Name</key>
                <string>AppleAHCIPort</string>
                <key>Replace</key>
                <data>
                SW50ZXJuYWw=
                </data>
            </dict>
        </array>
    </dict>
```

### Clover Configurator Screenshots

![Haswell KernelAndKextPatches CC Section](/files/-LR7WiH8uZkoC4w_xjdq)

### Explanation

In this section, we've enabled a few settings and added some kext patches.

#### Checkboxes:

We have a couple checkboxes selected here:

* *Apple RTC* - this ensures that we don't have a BIOS reset on reboot.
* *KernelPM* - this setting prevents writing to MSR 0xe2 which can prevent a kernel panic at boot.

#### KextsToPatch:

We added 4 different kexts to patch here. Three of them are for USB port limit increases, and the last acts as an *orange icons fix* - when internal drives are hotpluggable, and treated as external drives.

You'll notice that there are MatchOS values set for each of the USB port limit patches. You can remove any of the entries for OS versions you don't intend to run. They won't do any harm being there, but if you want a clean, minimal plist, there's no sense in having them.

## RtVariables And SMBIOS

### Raw XML

```markup
    <key>RtVariables</key>
    <dict>
        <key>BooterConfig</key>
        <string>0x28</string>
        <key>CsrActiveConfig</key>
        <string>0x3E7</string>
        <key>MLB</key>
        <string>C02532300QXG2Y7AD</string>
        <key>ROM</key>
        <string>UseMacAddr0</string>
    </dict>
    <key>SMBIOS</key>
    <dict>
        <key>BoardSerialNumber</key>
        <string>C02532300QXG2Y7AD</string>
        <key>ProductName</key>
        <string>iMac15,1</string>
        <key>SerialNumber</key>
        <string>C02Q6FYUFY10</string>
        <key>SmUUID</key>
        <string>C495EE18-C8EA-4100-8CAD-3099AC27772F</string>
    </dict>
```

### Clover Configurator Screenshots

![Haswell Rt Variables CC Section](/files/-LNfjpnx9orFTxKWDMT6)

![Haswell SMBIOS CC Section](/files/-LNs3Bl0oSFqOvyPf3MM)

### Explanation

For setting up the SMBIOS info, I use acidanthera's [*macserial*](https://github.com/acidanthera/macserial) application. I wrote a [*python script*](https://github.com/corpnewt/GenSMBIOS) that can leverage it as well (and auto-saves to the config.plist when selected). There's plenty of info that's left blank to allow Clover to fill in the blanks; this means that updating Clover will update the info passed, and not require you to also update your config.plist.

For this Haswell example, I chose the *iMac15,1* SMBIOS. The typical breakdown is as follows:

* Haswell with only iGPU - *iMac14,1*
* Haswell with dGPU - *iMac14,2*
* Haswell Refresh - *iMac15,1*

To get the SMBIOS info generated with *macserial*, you can run it with the `-a` argument (which generates serials and board serials for all supported platforms). You can also parse it with `grep` to limit your search to one SMBIOS type.

With our *iMac15,1* example, we would run *macserial* like so via the terminal:

```
macserial -a | grep -i iMac15,1
```

Which would give us output similar to the following:

```
      iMac15,1 | C02NFZZYFY10 | C02438207QXG2Y7FB
      iMac15,1 | C02P32YJFY10 | C02502303GUG2Y78C
      iMac15,1 | C02P2VZ7FY10 | C02501306QXG2Y7AD
      iMac15,1 | C02NM0EDFY10 | C02444701CDG2Y71H
      iMac15,1 | C02NVHZCFY10 | C02451303CDG2Y7JA
      iMac15,1 | C02QLRZ4FY10 | C02543300GUG2Y7JC
      iMac15,1 | C02QJ0UPFY10 | C02541902GUG2Y7JA
      iMac15,1 | C02QG0NGFY10 | C02539700J9G2Y71M
      iMac15,1 | C02N3XYEFY10 | C02429104J9G2Y7UE
      iMac15,1 | C02QW0M3FY10 | C02552700GUG2Y7JA
```

The order is `Product | Serial | Board Serial (MLB)`

The `iMac15,1` part gets copied to *SMBIOS -> Product Name*.

The `Serial` part gets copied to *SMBIOS -> Serial Number.*

The `Board Serial` part gets copied to *SMBIOS -> Board Serial Number* as well as *Rt Variables -> MLB.*

We can create an SmUUID by running `uuidgen` in the terminal (or it's auto-generated via my *GenSMBIOS* script) - and that gets copied to *SMBIOS -> SmUUID*.

We set *Rt Variables -> ROM* to `UseMacAddr0` which just utilizes our onboard Mac address - this should be unique enough to not conflict with any others.

*BooterConfig* gets set to `0x28`, and *CsrActiveConfig* is set to `0x3e7` which effectively disables SIP. You can choose a number of other options to enable/disable sections of SIP. Some common ones are as follows:

* `0x0` - SIP completely enabled
* `0x3` - Allow unsigned kexts and writing to protected fs locations
* `0x3e7` - SIP completely disabled

## System Parameters

### Raw XML

```markup
    <key>SystemParameters</key>
    <dict>
        <key>InjectKexts</key>
        <string>Yes</string>
        <key>InjectSystemID</key>
        <true/>
    </dict>
```

### Clover Configurator Screenshots

![System Parameters CC Section](/files/-LR2oVwEJOE9R5Z4kexb)

### Explanation

#### Inject Kexts:

This setting has 3 modes:

* `Yes` - this tells Clover to inject kexts from the EFI regardless.
* `No` - this tells Clover not to inject kexts from the EFI.
* `Detect` - this has Clover inject kexts only if *FakeSMC.kext* is not in the kext cache.

We set it to `Yes` to make sure that all the kexts we added before get injected properly.

#### InjectSystemID

This setting tells clover to set the SmUUID as the `system-id` at boot - which is important for iMessage and such.

## Saving

At this point, you can do *File -> Save* to save the config.plist. If you have issues saving directly to the EFI, you can save it on the Desktop, then just copy it over. I'll leave the [sample config.plist here](https://github.com/corpnewt/Hackintosh-Guide/blob/master/Configs/Haswell/config.plist) too.


# Skylake

We'll go through the config.plist sections, one at a time for a Skylake desktop setup.

## Starting Points

I like to start with either the stock *config.plist* that Clover gives you, or with just a blank canvas. In the next examples, I'll show you how I set things up from scratch; if you start from somewhere else, you may have more things checked/set than I do - but you'll want to follow along with what I do.

I'll also include the raw xml examples too in order to show those that work with a text editor (as I prefer to).

## ACPI

The default Clover settings are pretty overdone and can cause some issues. We'll keep this section fairly minimal, and I'll go through a bit of *why we do that* for each part as well.

### Raw XML

```markup
    <key>ACPI</key>
    <dict>
        <key>DSDT</key>
        <dict>
            <key>Fixes</key>
            <dict>
                <key>AddMCHC</key>
                <true/>
                <key>FixHPET</key>
                <true/>
                <key>FixIPIC</key>
                <true/>
                <key>FixRTC</key>
                <true/>
                <key>FixShutdown</key>
                <true/>
                <key>FixTMR</key>
                <true/>
            </dict>
            <key>Patches</key>
            <array>
                <dict>
                    <key>Comment</key>
                    <string>change XHCI to XHC</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    WEhDSQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    WEhDXw==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change XHC1 to XHC</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    WEhDMQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    WEhDXw==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change SAT0 to SATA</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    U0FUMA==
                    </data>
                    <key>Replace</key>
                    <data>
                    U0FUQQ==
                    </data>
                </dict>
            </array>
        </dict>
        <key>DropTables</key>
        <array>
            <dict>
                <key>Signature</key>
                <string>DMAR</string>
            </dict>
            <dict>
                <key>Signature</key>
                <string>MATS</string>
            </dict>
        </array>
        <key>FixHeaders</key>
        <true/>
        <key>SSDT</key>
        <dict>
            <key>Generate</key>
            <dict>
                <key>PluginType</key>
                <true/>
            </dict>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

![Skylake Acpi CC Section 1](/files/-LXeiFzayHPNhkwi-DN2)

![Skylake Acpi CC Section 2](/files/-LNg3h3EiUoiYoA8p7RV)

### Explanation

#### Patches:

The first thing we'll go over is the *Patches* section. This section allows us to dynamically rename parts of the DSDT via Clover. Since we're not running a real mac, and macOS is pretty particular with how things are named, we can make non-destructive changes to keep things mac-friendly. We have three entries here:

* *change XHCI to XHC -* helps avoid a conflict with built-in USB injectors
* *change XHC1 to XHC* - helps avoid a conflict with built-in USB injectors
* *change SAT0 to SATA* - for potential SATA compatibility

#### Fixes:

If we look then at the *Fixes* section, we'll see that we have a few things checked (there are 2 pages, so I included 2 screenshots):

* *FixShutdown* - this can help with some boards that prefer to restart instead of shutdown. Sometimes it can cause shutdown issues on other boards (ironic, right?), so if you have issues shutting down with this enabled, look at disabling it.
* The remaining fixes help avoid IRQ conflicts and etc, and are not known to cause issues. They may not be necessary for all hardware, but do not negatively impact anything if applied.

#### Drop Tables:

We touched in gently on DSDT with our *Patches* section - and this is a a bit of an extension of that. SSDT is like a sub-section of DSDT. The *Drop Tables* section allows us to omit certain SSDT tables from loading (as I mentioned before, mac and PC DSDT is different, and macOS can be rather picky). The two that I've added are as follows:

* *DMAR* - this prevents some issues with Vt-d; which is PCI passthrough for VMs, and not very functional (if at all?) on Hackintoshes.
* *MATS* - with High Sierra on up this table is parsed, and can sometimes contain unprintable characters that can lead to a kernel panic.

#### FixHeaders and PluginType:

The only other things we've done on this page are enable these two checkboxes.

* *FixHeaders* - this is just a double-up of our *MATS* table dropping. This checkbox tells Clover to sanitize headers to avoid kernel panics related to unprintable characters.
* *PluginType* - this injects some DSDT data to get *X86PlatformPlugin* to load - giving us a leg-up on native CPU power management. This setting only works on Haswell and newer CPUs though.

## Boot

We don't need to do *too much* here, but we'll tweak a few things.

### Raw XML

```markup
    <key>Boot</key>
    <dict>
        <key>Arguments</key>
        <string>keepsyms=1 dart=0 debug=0x100 -v</string>
        <key>DefaultVolume</key>
        <string>LastBootedVolume</string>
        <key>Timeout</key>
        <integer>5</integer>
    </dict>
```

### Clover Configurator Screenshots

![Skylake Boot CC Section](/files/Dpewpi3E5bzXRwm87CPm)

### Explanation

#### Arguments:

We have a few boot args set here:

* `-v` - this enables verbose mode, which shows all the *behind-the-scenes* text that scrolls by as you're booting instead of the Apple logo and progress bar. It's invaluable to any Hackintosher, as it gives you an inside look at the boot process, and can help you identify issues, problem kexts, etc.
* `dart=0` - this is just an extra layer of protection against Vt-d issues.
* `debug=0x100` - this prevents a reboot on a kernel panic. That way you can (hopefully) glean some useful info and follow the breadcrumbs to get past the issues.
* `keepsyms=1` - this is a companion setting to `debug=0x100` that tells the OS to also print the symbols on a kernel panic. That can give some more helpful insight as to what's causing the panic itself.

#### DefaultBootVolume and Timeout:

These are the only other settings I've updated in this section.

* *DefaultBootVolume* - this uses NVRAM to remember which volume was last booted by Clover, and auto-select that at the next boot.
* *Timeout* - this is the number of seconds before the *DefaultBootVolume* auto-boots. You can set this to `-1` to avoid all timeout, or to `0` to skip the GUI entirely. If set to `0`, you can press any keys at boot to get the GUI to show back up in case of issues.

## Boot Graphics

Nothing here - just the stock settings. You could adjust this if Clover's scaling needs changes, but I don't mess with it.

## Cpu

Again, nothing here gets changed in most setups I've worked with.

## Devices

We'll handle some slick property injection for *WhateverGreen* here, and do some basic audio setup.

### Raw XML

```markup
    <key>Devices</key>
    <dict>
        <key>Audio</key>
        <dict>
            <key>Inject</key>
            <integer>1</integer>
            <key>ResetHDA</key>
            <true/>
        </dict>
        <key>Properties</key>
        <dict>
            <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
            <dict>
                <key>AAPL,ig-platform-id</key>
                <data>
                AAASGQ==
                </data>
                <key>framebuffer-patch-enable</key>
                <data>
                AQAAAA==
                </data>
                <key>framebuffer-stolenmem</key>
                <data>
                AAAwAQ==
                </data>
            </dict>
        </dict>
        <key>USB</key>
        <dict>
            <key>FixOwnership</key>
            <true/>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

![Skylake Devices CC Section - iGPU](/files/-LNg5MFk0BmkIwBzuFlN)

![Skylake Devices CC Section - iGPU Connectorless](/files/-LNg5GPulzk2jjEPEb4H)

### Explanation

#### Fake ID:

This section remains empty for our example setup. In the past, almost-supported iGPUs (like the HD 4400) would get faked to a supported iGPU here, but we'll be using the cleaner Properties section for this.

#### USB:

Under this section, we ensure that *Inject* and *FixOwnership* are selected to avoid issues with hanging at a half-printed line somewhere around the `Enabling Legacy Matching` verbose line. You can also get past that by enabling *XHCI Hand Off* in BIOS.

#### Audio:

Here we set our audio to inject *Layout 1* - this may or may not be compatible with your codec, but you can check on [*AppleALC's Supported Codec Page*](https://github.com/acidanthera/AppleALC/wiki/Supported-codecs).

We also enabled *ResetHDA* which puts the codec back in a neutral state between OS reboots. This prevents some issues with no audio after booting to another OS and then back.

#### Properties:

This section is setup via Headkaze's [*Intel Framebuffer Patching Guide*](https://www.insanelymac.com/forum/topic/334899-intel-framebuffer-patching-using-whatevergreen/?tab=comments#comment-2626271) and applies only one actual property to begin, which is the *ig-platform-id*. The way we get the proper value for this is to look at the ig-platform-id we intend to use, then swap the pairs of hex bytes.

If we think of our ig-plat as `0xAABBCCDD`, our swapped version would look like `0xDDCCBBAA`.

The two ig-platform-id's we use are as follows:

* `0x19120000` - this is used when the iGPU is used to drive a display
  * `00001219` when hex-swapped
  * `AAASGQ==` when the hex-swapped version is converted to base64
* `0x19120001` - this is used when the iGPU is only used for compute tasks, and doesn't drive a display
  * `01001219` when hex-swapped
  * `AQASGQ==` when the hex-swapped version is converted to base64

We also add 2 more properties, *framebuffer-patch-enable* and *framebuffer-stolenmem*. The first enables patching via *WhateverGreen.kext,* and the second sets the min stolen memory to 19MB.

## Disable Drivers

We have nothing to do here.

## Gui

### Raw XML

```markup
    <key>GUI</key>
    <dict>
        <key>Scan</key>
        <dict>
            <key>Entries</key>
            <true/>
            <key>Tool</key>
            <true/>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

![Skylake Gui CC Section](/files/-LNfcNjF_D5Rlf8RgDYe)

### Explanation

#### Scan:

The only settings I've tweaked on this page are the *Scan* settings. I've selected *Custom*, then checked everything except *Legacy* and *Kernel*. This just omits some of the unbootable entries in Clover to clean up the menu.

#### Hide Volumes:

I haven't added anything here, but you *can* hide unwanted volumes here. You can do so by either adding the volume's name, or UUID.

To hide extra APFS entries, add the following to this list:

* `Preboot`
* `VM`

To hide all Recovery partitions, add `Recovery` to the list.

To get the UUID of a drive to hide, you can use the following terminal command:

```
diskutil info diskXsY | grep -i "Partition UUID" | rev | cut -d' ' -f 1 | rev
```

Make sure to replace `diskXsY` with the actual disk number of the volume you'd like to hide.

#### Theme:

If you want to test out a new theme (and I suggest you look at [*clover-next-black*](https://github.com/al3xtjames/clover-theme-next-black)), you can add the unzipped theme folder to the */Volumes/EFI/EFI/CLOVER/themes* directory, then type the name of the folder in the *Theme* text field to apply it.

## Graphics

In the past, we'd setup the iGPU here, but since we already did that via Properties in the *Devices* section, we have nothing to really configure here. **NOTE**: When Clover detects an Intel iGPU, it *automatically* enables Intel Injection if the Graphics section doesn't exist in the config.plist. To bypass this, you can explicitly disable injection using the raw XML below, or by clicking the "Inject Intel" button once to check it, and once to uncheck it in CC.

### Raw XML

```markup
    <key>Graphics</key>
    <dict>
        <key>Inject</key>
        <false/>
    </dict>
```

## Kernel And Kext Patches

### Raw XML

```markup
    <key>KernelAndKextPatches</key>
    <dict>
        <key>KernelPm</key>
        <true/>
        <key>KextsToPatch</key>
        <array>
            <dict>
                <key>Comment</key>
                <string>Port limit increase</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g710////EA==
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.12.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g710////Gw==
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Port limit increase (RehabMan)</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g32IDw+DpwQAAA==
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.13.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g32ID5CQkJCQkA==
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Port limit increase (PMHeart)</string>
                <key>Disabled</key>
                <true/>
                <key>Find</key>
                <data>
                g/sPD4MDBQAA
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.14.0</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g/sPkJCQkJCQ
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Port limit increase (Ricky)</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g/sPD4OPBAAA
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.14.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g/sPkJCQkJCQ
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>External Icons Patch</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                RXh0ZXJuYWw=
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>Name</key>
                <string>AppleAHCIPort</string>
                <key>Replace</key>
                <data>
                SW50ZXJuYWw=
                </data>
            </dict>
        </array>
    </dict>
```

### Clover Configurator Screenshots

![Skylake KernelAndKextPatches CC Section](/files/-LR7WeEX34bGhGWIBDB9)

### Explanation

In this section, we've enabled a few settings and added some kext patches.

#### Checkboxes:

We have a couple checkboxes selected here:

* *Apple RTC* - this ensures that we don't have a BIOS reset on reboot.
* *KernelPM* - this setting prevents writing to MSR 0xe2 which can prevent a kernel panic at boot.

#### KextsToPatch:

We added 4 different kexts to patch here. Three of them are for USB port limit increases, and the last acts as an *orange icons fix* - when internal drives are hotpluggable, and treated as external drives.

You'll notice that there are MatchOS values set for each of the USB port limit patches. You can remove any of the entries for OS versions you don't intend to run. They won't do any harm being there, but if you want a clean, minimal plist, there's no sense in having them.

## RtVariables And SMBIOS

### Raw XML

```markup
    <key>RtVariables</key>
    <dict>
        <key>BooterConfig</key>
        <string>0x28</string>
        <key>CsrActiveConfig</key>
        <string>0x3E7</string>
        <key>MLB</key>
        <string>C02634902QXGPF7FB</string>
        <key>ROM</key>
        <string>UseMacAddr0</string>
    </dict>
    <key>SMBIOS</key>
    <dict>
        <key>BoardSerialNumber</key>
        <string>C02634902QXGPF7FB</string>
        <key>ProductName</key>
        <string>iMac17,1</string>
        <key>SerialNumber</key>
        <string>C02S8DY7GG7L</string>
        <key>SmUUID</key>
        <string>DD574F3E-5774-414A-8FF9-5B0089B09480</string>
    </dict>
```

### Clover Configurator Screenshots

![Skylake RtVariables CC Section](/files/-LNs2ftVPtH5d4yJF3f_)

![Skylake SMBIOS CC Section](/files/-LNs2iouOKtlWzK1utZa)

### Explanation

For setting up the SMBIOS info, I use acidanthera's [*macserial*](https://github.com/acidanthera/macserial) application. I wrote a [*python script*](https://github.com/corpnewt/GenSMBIOS) that can leverage it as well (and auto-saves to the config.plist when selected). There's plenty of info that's left blank to allow Clover to fill in the blanks; this means that updating Clover will update the info passed, and not require you to also update your config.plist.

For this Skylake example, I chose the *iMac17,1* SMBIOS.

To get the SMBIOS info generated with *macserial*, you can run it with the `-a` argument (which generates serials and board serials for all supported platforms). You can also parse it with `grep` to limit your search to one SMBIOS type.

With our *iMac17,1* example, we would run *macserial* like so via the terminal:

```
macserial -a | grep -i iMac17,1
```

Which would give us output similar to the following:

```
      iMac17,1 | C02S8DY7GG7L | C02634902QXGPF7FB
      iMac17,1 | C02T4WZSGG7L | C02703104GUGPF71M
      iMac17,1 | C02QQAYPGG7L | C025474014NGPF7FB
      iMac17,1 | C02SNLZ3GG7L | C02645501CDGPF7AD
      iMac17,1 | C02QQRY8GG7L | C025474054NGPF71F
      iMac17,1 | C02QK1ZXGG7L | C02542200GUGPF7JC
      iMac17,1 | C02SL0YXGG7L | C026436004NGPF7JA
      iMac17,1 | C02QW0J5GG7L | C02552130QXGPF7JA
      iMac17,1 | C02RXDZYGG7L | C02626100GUGPF71H
      iMac17,1 | C02R4MYRGG7L | C02603200GUGPF7JA
```

The order is `Product | Serial | Board Serial (MLB)`

The `iMac17,1` part gets copied to *SMBIOS -> Product Name*.

The `Serial` part gets copied to *SMBIOS -> Serial Number.*

The `Board Serial` part gets copied to *SMBIOS -> Board Serial Number* as well as *Rt Variables -> MLB.*

We can create an SmUUID by running `uuidgen` in the terminal (or it's auto-generated via my *GenSMBIOS* script) - and that gets copied to *SMBIOS -> SmUUID*.

We set *Rt Variables -> ROM* to `UseMacAddr0` which just utilizes our onboard Mac address - this should be unique enough to not conflict with any others.

*BooterConfig* gets set to `0x28`, and *CsrActiveConfig* is set to `0x3e7` which effectively disables SIP. You can choose a number of other options to enable/disable sections of SIP. Some common ones are as follows:

* `0x0` - SIP completely enabled
* `0x3` - Allow unsigned kexts and writing to protected fs locations
* `0x3e7` - SIP completely disabled

## System Parameters

### Raw XML

```markup
    <key>SystemParameters</key>
    <dict>
        <key>InjectKexts</key>
        <string>Yes</string>
        <key>InjectSystemID</key>
        <true/>
    </dict>
```

### Clover Configurator Screenshots

![System Parameters CC Section](/files/5Cr1WDvPLiUAnW9gwtob)

### Explanation

#### Inject Kexts:

This setting has 3 modes:

* `Yes` - this tells Clover to inject kexts from the EFI regardless.
* `No` - this tells Clover not to inject kexts from the EFI.
* `Detect` - this has Clover inject kexts only if *FakeSMC.kext* is not in the kext cache.

We set it to `Yes` to make sure that all the kexts we added before get injected properly.

#### InjectSystemID

This setting tells clover to set the SmUUID as the `system-id` at boot - which is important for iMessage and such.

## Saving

At this point, you can do *File -> Save* to save the config.plist. If you have issues saving directly to the EFI, you can save it on the Desktop, then just copy it over. I'll leave the [sample config.plist here](https://github.com/corpnewt/Hackintosh-Guide/blob/master/Configs/Skylake/config.plist) too.


# Kaby Lake

We'll go through the config.plist sections, one at a time for a Kaby Lake desktop setup.

## Starting Points

I like to start with either the stock *config.plist* that Clover gives you, or with just a blank canvas. In the next examples, I'll show you how I set things up from scratch; if you start from somewhere else, you may have more things checked/set than I do - but you'll want to follow along with what I do.

I'll also include the raw xml examples too in order to show those that work with a text editor (as I prefer to).

## ACPI

The default Clover settings are pretty overdone and can cause some issues. We'll keep this section fairly minimal, and I'll go through a bit of *why we do that* for each part as well.

### Raw XML

```markup
    <key>ACPI</key>
    <dict>
        <key>DSDT</key>
        <dict>
            <key>Fixes</key>
            <dict>
                <key>AddMCHC</key>
                <true/>
                <key>FixHPET</key>
                <true/>
                <key>FixIPIC</key>
                <true/>
                <key>FixRTC</key>
                <true/>
                <key>FixShutdown</key>
                <true/>
                <key>FixTMR</key>
                <true/>
            </dict>
            <key>Patches</key>
            <array>
                <dict>
                    <key>Comment</key>
                    <string>change XHCI to XHC</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    WEhDSQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    WEhDXw==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change XHC1 to XHC</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    WEhDMQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    WEhDXw==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change SAT0 to SATA</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    U0FUMA==
                    </data>
                    <key>Replace</key>
                    <data>
                    U0FUQQ==
                    </data>
                </dict>
            </array>
        </dict>
        <key>DropTables</key>
        <array>
            <dict>
                <key>Signature</key>
                <string>DMAR</string>
            </dict>
            <dict>
                <key>Signature</key>
                <string>MATS</string>
            </dict>
        </array>
        <key>FixHeaders</key>
        <true/>
        <key>SSDT</key>
        <dict>
            <key>Generate</key>
            <dict>
                <key>PluginType</key>
                <true/>
            </dict>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

![Kaby Lake Acpi CC Section 1](/files/-LXeiBb1IyprSVT__9K3)

![Kaby Lake Acpi CC Section 2](/files/-LNg3h3EiUoiYoA8p7RV)

### Explanation

#### Patches:

The first thing we'll go over is the *Patches* section. This section allows us to dynamically rename parts of the DSDT via Clover. Since we're not running a real mac, and macOS is pretty particular with how things are named, we can make non-destructive changes to keep things mac-friendly. We have three entries here:

* *change XHCI to XHC -* helps avoid a conflict with built-in USB injectors
* *change XHC1 to XHC* - helps avoid a conflict with built-in USB injectors
* *change SAT0 to SATA* - for potential SATA compatibility

#### Fixes:

If we look then at the *Fixes* section, we'll see that we have a few things checked (there are 2 pages, so I included 2 screenshots):

* *FixShutdown* - this can help with some boards that prefer to restart instead of shutdown. Sometimes it can cause shutdown issues on other boards (ironic, right?), so if you have issues shutting down with this enabled, look at disabling it.
* The remaining fixes help avoid IRQ conflicts and etc, and are not known to cause issues. They may not be necessary for all hardware, but do not negatively impact anything if applied.

#### Drop Tables:

We touched in gently on DSDT with our *Patches* section - and this is a a bit of an extension of that. SSDT is like a sub-section of DSDT. The *Drop Tables* section allows us to omit certain SSDT tables from loading (as I mentioned before, mac and PC DSDT is different, and macOS can be rather picky). The two that I've added are as follows:

* *DMAR* - this prevents some issues with Vt-d; which is PCI passthrough for VMs, and not very functional (if at all?) on Hackintoshes.
* *MATS* - with High Sierra on up this table is parsed, and can sometimes contain unprintable characters that can lead to a kernel panic.

#### FixHeaders and PluginType:

The only other things we've done on this page are enable these two checkboxes.

* *FixHeaders* - this is just a double-up of our *MATS* table dropping. This checkbox tells Clover to sanitize headers to avoid kernel panics related to unprintable characters.
* *PluginType* - this injects some DSDT data to get *X86PlatformPlugin* to load - giving us a leg-up on native CPU power management. This setting only works on Haswell and newer CPUs though.

## Boot

We don't need to do *too much* here, but we'll tweak a few things.

### Raw XML

```markup
    <key>Boot</key>
    <dict>
        <key>Arguments</key>
        <string>keepsyms=1 dart=0 debug=0x100 -v</string>
        <key>DefaultVolume</key>
        <string>LastBootedVolume</string>
        <key>Timeout</key>
        <integer>5</integer>
    </dict>
```

### Clover Configurator Screenshots

![Kaby Lake Boot CC Section](/files/-LmlMMDdQdsZozy4hm8z)

### Explanation

#### Arguments:

We have a few boot args set here:

* `-v` - this enables verbose mode, which shows all the *behind-the-scenes* text that scrolls by as you're booting instead of the Apple logo and progress bar. It's invaluable to any Hackintosher, as it gives you an inside look at the boot process, and can help you identify issues, problem kexts, etc.
* `dart=0` - this is just an extra layer of protection against Vt-d issues.
* `debug=0x100` - this prevents a reboot on a kernel panic. That way you can (hopefully) glean some useful info and follow the breadcrumbs to get past the issues.
* `keepsyms=1` - this is a companion setting to `debug=0x100` that tells the OS to also print the symbols on a kernel panic. That can give some more helpful insight as to what's causing the panic itself.

#### DefaultBootVolume and Timeout:

These are the only other settings I've updated in this section.

* *DefaultBootVolume* - this uses NVRAM to remember which volume was last booted by Clover, and auto-select that at the next boot.
* *Timeout* - this is the number of seconds before the *DefaultBootVolume* auto-boots. You can set this to `-1` to avoid all timeout, or to `0` to skip the GUI entirely. If set to `0`, you can press any keys at boot to get the GUI to show back up in case of issues.

## Boot Graphics

Nothing here - just the stock settings. You could adjust this if Clover's scaling needs changes, but I don't mess with it.

## Cpu

Again, nothing here gets changed in most setups I've worked with.

## Devices

We'll handle some slick property injection for *WhateverGreen* here, and do some basic audio setup.

### Raw XML

```markup
    <key>Devices</key>
    <dict>
        <key>Audio</key>
        <dict>
            <key>Inject</key>
            <integer>1</integer>
            <key>ResetHDA</key>
            <true/>
        </dict>
        <key>Properties</key>
        <dict>
            <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
            <dict>
                <key>AAPL,ig-platform-id</key>
                <data>
                AAASWQ==
                </data>
                <key>framebuffer-patch-enable</key>
                <data>
                AQAAAA==
                </data>
                <key>framebuffer-stolenmem</key>
                <data>
                AAAwAQ==
                </data>
            </dict>
        </dict>
        <key>USB</key>
        <dict>
            <key>FixOwnership</key>
            <true/>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

![Kaby Lake Devices CC Section - iGPU](/files/-LNgB12esiGWDus_t6QR)

![Kaby Lake Devices CC Section - iGPU Connectorless](/files/-LNgB56FCLbUplk9B6Uz)

### Explanation

#### Fake ID:

This section remains empty for our example setup. In the past, almost-supported iGPUs (like the HD 4400) would get faked to a supported iGPU here, but we'll be using the cleaner Properties section for this.

#### USB:

Under this section, we ensure that *Inject* and *FixOwnership* are selected to avoid issues with hanging at a half-printed line somewhere around the `Enabling Legacy Matching` verbose line. You can also get past that by enabling *XHCI Hand Off* in BIOS.

#### Audio:

Here we set our audio to inject *Layout 1* - this may or may not be compatible with your codec, but you can check on [*AppleALC's Supported Codec Page*](https://github.com/acidanthera/AppleALC/wiki/Supported-codecs).

We also enabled *ResetHDA* which puts the codec back in a neutral state between OS reboots. This prevents some issues with no audio after booting to another OS and then back.

#### Properties:

This section is setup via Headkaze's [*Intel Framebuffer Patching Guide*](https://www.insanelymac.com/forum/topic/334899-intel-framebuffer-patching-using-whatevergreen/?tab=comments#comment-2626271) and applies only one actual property to begin, which is the *ig-platform-id*. The way we get the proper value for this is to look at the ig-platform-id we intend to use, then swap the pairs of hex bytes.

If we think of our ig-plat as `0xAABBCCDD`, our swapped version would look like `0xDDCCBBAA`.

The two ig-platform-id's we use are as follows:

* `0x59120000` - this is used when the iGPU is used to drive a display
  * `00001259` when hex-swapped
  * `AAASWQ==` when the hex-swapped version is converted to base64
* `0x59120003` - this is used when the iGPU is only used for compute tasks, and doesn't drive a display
  * `03001259` when hex-swapped
  * `AwASWQ==` when the hex-swapped version is converted to base64

We also add 2 more properties, *framebuffer-patch-enable* and *framebuffer-stolenmem*. The first enables patching via *WhateverGreen.kext,* and the second sets the min stolen memory to 19MB.

## Disable Drivers

We have nothing to do here.

## Gui

### Raw XML

```markup
    <key>GUI</key>
    <dict>
        <key>Scan</key>
        <dict>
            <key>Entries</key>
            <true/>
            <key>Tool</key>
            <true/>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

![Kaby Lake Gui CC Section](/files/-LNfcNjF_D5Rlf8RgDYe)

### Explanation

#### Scan:

The only settings I've tweaked on this page are the *Scan* settings. I've selected *Custom*, then checked everything except *Legacy* and *Kernel*. This just omits some of the unbootable entries in Clover to clean up the menu.

#### Hide Volumes:

I haven't added anything here, but you *can* hide unwanted volumes here. You can do so by either adding the volume's name, or UUID.

To hide extra APFS entries, add the following to this list:

* `Preboot`
* `VM`

To hide all Recovery partitions, add `Recovery` to the list.

To get the UUID of a drive to hide, you can use the following terminal command:

```
diskutil info diskXsY | grep -i "Partition UUID" | rev | cut -d' ' -f 1 | rev
```

Make sure to replace `diskXsY` with the actual disk number of the volume you'd like to hide.

#### Theme:

If you want to test out a new theme (and I suggest you look at [*clover-next-black*](https://github.com/al3xtjames/clover-theme-next-black)), you can add the unzipped theme folder to the */Volumes/EFI/EFI/CLOVER/themes* directory, then type the name of the folder in the *Theme* text field to apply it.

## Graphics

In the past, we'd setup the iGPU here, but since we already did that via Properties in the *Devices* section, we have nothing to really configure here. **NOTE**: When Clover detects an Intel iGPU, it *automatically* enables Intel Injection if the Graphics section doesn't exist in the config.plist. To bypass this, you can explicitly disable injection using the raw XML below, or by clicking the "Inject Intel" button once to check it, and once to uncheck it in CC.

### Raw XML

```markup
    <key>Graphics</key>
    <dict>
        <key>Inject</key>
        <false/>
    </dict>
```

## Kernel And Kext Patches

### Raw XML

```markup
    <key>KernelAndKextPatches</key>
    <dict>
        <key>KernelPm</key>
        <true/>
        <key>KextsToPatch</key>
        <array>
            <dict>
                <key>Comment</key>
                <string>Port limit increase</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g710////EA==
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.12.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g710////Gw==
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Port limit increase (RehabMan)</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g32IDw+DpwQAAA==
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.13.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g32ID5CQkJCQkA==
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Port limit increase (PMHeart)</string>
                <key>Disabled</key>
                <true/>
                <key>Find</key>
                <data>
                g/sPD4MDBQAA
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.14.0</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g/sPkJCQkJCQ
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Port limit increase (Ricky)</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g/sPD4OPBAAA
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.14.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g/sPkJCQkJCQ
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>External Icons Patch</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                RXh0ZXJuYWw=
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>Name</key>
                <string>AppleAHCIPort</string>
                <key>Replace</key>
                <data>
                SW50ZXJuYWw=
                </data>
            </dict>
        </array>
    </dict>
```

### Clover Configurator Screenshots

![Kaby Lake KernelAndKextPatches CC Section](/files/afryLtgNzPj7jO2A7oo5)

### Explanation

In this section, we've enabled a few settings and added some kext patches.

#### Checkboxes:

We have a couple checkboxes selected here:

* *Apple RTC* - this ensures that we don't have a BIOS reset on reboot.
* *KernelPM* - this setting prevents writing to MSR 0xe2 which can prevent a kernel panic at boot.

#### KextsToPatch:

We added 4 different kexts to patch here. Three of them are for USB port limit increases, and the last acts as an *orange icons fix* - when internal drives are hotpluggable, and treated as external drives.

You'll notice that there are MatchOS values set for each of the USB port limit patches. You can remove any of the entries for OS versions you don't intend to run. They won't do any harm being there, but if you want a clean, minimal plist, there's no sense in having them.

## RtVariables And SMBIOS

### Raw XML

```markup
    <key>RtVariables</key>
    <dict>
        <key>BooterConfig</key>
        <string>0x28</string>
        <key>CsrActiveConfig</key>
        <string>0x3E7</string>
        <key>MLB</key>
        <string>C02726902CDH69F1M</string>
        <key>ROM</key>
        <string>UseMacAddr0</string>
    </dict>
    <key>SMBIOS</key>
    <dict>
        <key>BoardSerialNumber</key>
        <string>C02726902CDH69F1M</string>
        <key>ProductName</key>
        <string>iMac18,1</string>
        <key>SerialNumber</key>
        <string>C02TX0VDH7JY</string>
        <key>SmUUID</key>
        <string>91492A73-595C-4D97-A6FC-2B5D3ED1B54D</string>
    </dict>
```

### Clover Configurator Screenshots

![Kaby Lake RtVariables CC Section](/files/-LNs2Nq7P3CBxis2oYnX)

![Kaby Lake SMBIOS CC Section](/files/-LNs1t_-OPgnzz2godIg)

### Explanation

For setting up the SMBIOS info, I use acidanthera's [*macserial*](https://github.com/acidanthera/macserial) application. I wrote a [*python script*](https://github.com/corpnewt/GenSMBIOS) that can leverage it as well (and auto-saves to the config.plist when selected). There's plenty of info that's left blank to allow Clover to fill in the blanks; this means that updating Clover will update the info passed, and not require you to also update your config.plist.

For this Kaby Lake example, I chose the *iMac18,1* SMBIOS - this is done intentionally for compatibility's sake. There are two main SMBIOS used for Kaby Lake:

* *iMac18,1* - this is used for computers utilizing the iGPU for displaying.
* *iMac18,3* - this is used for computers using a dGPU for displaying, and an iGPU for compute tasks only.

To get the SMBIOS info generated with *macserial*, you can run it with the `-a` argument (which generates serials and board serials for all supported platforms). You can also parse it with `grep` to limit your search to one SMBIOS type.

With our *iMac18,1* example, we would run *macserial* like so via the terminal:

```
macserial -a | grep -i iMac18,1
```

Which would give us output similar to the following:

```
      iMac18,1 | C02T8SZNH7JY | C02707101J9H69F1F
      iMac18,1 | C02VXBYDH7JY | C02753100GUH69FCB
      iMac18,1 | C02T7RY6H7JY | C02706310GUH69FA8
      iMac18,1 | C02VD07ZH7JY | C02737301J9H69FCB
      iMac18,1 | C02TQPYPH7JY | C02720802CDH69FAD
      iMac18,1 | C02VXYYVH7JY | C02753207CDH69FJC
      iMac18,1 | C02VDBZ0H7JY | C02737700QXH69FA8
      iMac18,1 | C02VP0H6H7JY | C02746300CDH69FJA
      iMac18,1 | C02VL0W9H7JY | C02743303CDH69F8C
      iMac18,1 | C02V2NYMH7JY | C02728600J9H69FAD
```

The order is `Product | Serial | Board Serial (MLB)`

The `iMac18,1` part gets copied to *SMBIOS -> Product Name*.

The `Serial` part gets copied to *SMBIOS -> Serial Number.*

The `Board Serial` part gets copied to *SMBIOS -> Board Serial Number* as well as *Rt Variables -> MLB.*

We can create an SmUUID by running `uuidgen` in the terminal (or it's auto-generated via my *GenSMBIOS* script) - and that gets copied to *SMBIOS -> SmUUID*.

We set *Rt Variables -> ROM* to `UseMacAddr0` which just utilizes our onboard Mac address - this should be unique enough to not conflict with any others.

*BooterConfig* gets set to `0x28`, and *CsrActiveConfig* is set to `0x3e7` which effectively disables SIP. You can choose a number of other options to enable/disable sections of SIP. Some common ones are as follows:

* `0x0` - SIP completely enabled
* `0x3` - Allow unsigned kexts and writing to protected fs locations
* `0x3e7` - SIP completely disabled

## System Parameters

### Raw XML

```markup
    <key>SystemParameters</key>
    <dict>
        <key>InjectKexts</key>
        <string>Yes</string>
        <key>InjectSystemID</key>
        <true/>
    </dict>
```

### Clover Configurator Screenshots

![System Parameters CC Section](/files/OyPIM8wSZdRseOn0TIQ8)

### Explanation

#### Inject Kexts:

This setting has 3 modes:

* `Yes` - this tells Clover to inject kexts from the EFI regardless.
* `No` - this tells Clover not to inject kexts from the EFI.
* `Detect` - this has Clover inject kexts only if *FakeSMC.kext* is not in the kext cache.

We set it to `Yes` to make sure that all the kexts we added before get injected properly.

#### InjectSystemID

This setting tells clover to set the SmUUID as the `system-id` at boot - which is important for iMessage and such.

## Saving

At this point, you can do *File -> Save* to save the config.plist. If you have issues saving directly to the EFI, you can save it on the Desktop, then just copy it over. I'll leave the [sample config.plist here](https://github.com/corpnewt/Hackintosh-Guide/blob/master/Configs/KabyLake/config.plist) too.


# Coffee Lake

We'll go through the config.plist sections, one at a time for a Coffee Lake desktop setup.

## Starting Points

I like to start with either the stock *config.plist* that Clover gives you, or with just a blank canvas. In the next examples, I'll show you how I set things up from scratch; if you start from somewhere else, you may have more things checked/set than I do - but you'll want to follow along with what I do.

I'll also include the raw xml examples too in order to show those that work with a text editor (as I prefer to).

## ACPI

The default Clover settings are pretty overdone and can cause some issues. We'll keep this section fairly minimal, and I'll go through a bit of *why we do that* for each part as well.

### Raw XML

```markup
    <key>ACPI</key>
    <dict>
        <key>DSDT</key>
        <dict>
            <key>Fixes</key>
            <dict>
                <key>AddMCHC</key>
                <true/>
                <key>FixHPET</key>
                <true/>
                <key>FixIPIC</key>
                <true/>
                <key>FixRTC</key>
                <true/>
                <key>FixShutdown</key>
                <true/>
                <key>FixTMR</key>
                <true/>
            </dict>
            <key>Patches</key>
            <array>
                <dict>
                    <key>Comment</key>
                    <string>change XHCI to XHC</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    WEhDSQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    WEhDXw==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change XHC1 to XHC</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    WEhDMQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    WEhDXw==
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>change SAT0 to SATA</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    U0FUMA==
                    </data>
                    <key>Replace</key>
                    <data>
                    U0FUQQ==
                    </data>
                </dict>
            </array>
        </dict>
        <key>DropTables</key>
        <array>
            <dict>
                <key>Signature</key>
                <string>DMAR</string>
            </dict>
            <dict>
                <key>Signature</key>
                <string>MATS</string>
            </dict>
        </array>
        <key>FixHeaders</key>
        <true/>
        <key>SSDT</key>
        <dict>
            <key>Generate</key>
            <dict>
                <key>PluginType</key>
                <true/>
            </dict>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

![Coffee Lake Acpi CC Section 1](/files/VtSYw2U8rluT1iBvugPM)

![Coffee Lake Acpi CC Section 2](/files/-LNg3h3EiUoiYoA8p7RV)

![Coffee Lake Read-Only RTC Fix](/files/-LmlOZX-ppb7ItlMjvKF)

### Explanation

#### Patches:

The first thing we'll go over is the *Patches* section. This section allows us to dynamically rename parts of the DSDT via Clover. Since we're not running a real mac, and macOS is pretty particular with how things are named, we can make non-destructive changes to keep things mac-friendly. We have three entries here:

* *change XHCI to XHC -* helps avoid a conflict with built-in USB injectors
* *change XHC1 to XHC* - helps avoid a conflict with built-in USB injectors
* *change SAT0 to SATA* - for potential SATA compatibility

You **may** also need the following Read-Only RTC fix (read about it [here](https://www.hackintosh-forum.de/forum/thread/39846-asrock-z390-taichi-ultimate/?pageNo=2)) if you have a *true* 300-series board (non Z370) and you suffer a boot hang around this point:

![Read-Only RTC Boot Stall](/files/-LmlRjLFP3OOHqIWDvSh)

The raw XML for that specific patch looks like so:

```markup
				<dict>
					<key>Comment</key>
					<string>Fix 300-series RTC Bug</string>
					<key>Disabled</key>
					<false/>
					<key>Find</key>
					<data>
					oAqTU1RBUwE=
					</data>
					<key>Replace</key>
					<data>
					oAqRCv8L//8=
					</data>
				</dict>
```

#### Fixes:

If we look then at the *Fixes* section, we'll see that we have a few things checked (there are 2 pages, so I included 2 screenshots):

* *FixShutdown* - this can help with some boards that prefer to restart instead of shutdown. Sometimes it can cause shutdown issues on other boards (ironic, right?), so if you have issues shutting down with this enabled, look at disabling it.
* The remaining fixes help avoid IRQ conflicts and etc, and are not known to cause issues. They may not be necessary for all hardware, but do not negatively impact anything if applied.

#### Drop Tables:

We touched in gently on DSDT with our *Patches* section - and this is a a bit of an extension of that. SSDT is like a sub-section of DSDT. The *Drop Tables* section allows us to omit certain SSDT tables from loading (as I mentioned before, mac and PC DSDT is different, and macOS can be rather picky). The two that I've added are as follows:

* *DMAR* - this prevents some issues with Vt-d; which is PCI passthrough for VMs, and not very functional (if at all?) on Hackintoshes.
* *MATS* - with High Sierra on up this table is parsed, and can sometimes contain unprintable characters that can lead to a kernel panic.

#### FixHeaders and PluginType:

The only other things we've done on this page are enable these two checkboxes.

* *FixHeaders* - this is just a double-up of our *MATS* table dropping. This checkbox tells Clover to sanitize headers to avoid kernel panics related to unprintable characters.
* *PluginType* - this injects some DSDT data to get *X86PlatformPlugin* to load - giving us a leg-up on native CPU power management. This setting only works on Haswell and newer CPUs though.

## Boot

We don't need to do *too much* here, but we'll tweak a few things.

### Raw XML

```markup
    <key>Boot</key>
    <dict>
        <key>Arguments</key>
        <string>keepsyms=1 dart=0 debug=0x100 -v</string>
        <key>DefaultVolume</key>
        <string>LastBootedVolume</string>
        <key>Timeout</key>
        <integer>5</integer>
    </dict>
```

### Clover Configurator Screenshots

![Coffee Lake Boot CC Section](/files/-LmlM65FmT1-W5s8tlpw)

### Explanation

#### Arguments:

We have a few boot args set here:

* `-v` - this enables verbose mode, which shows all the *behind-the-scenes* text that scrolls by as you're booting instead of the Apple logo and progress bar. It's invaluable to any Hackintosher, as it gives you an inside look at the boot process, and can help you identify issues, problem kexts, etc.
* `dart=0` - this is just an extra layer of protection against Vt-d issues.
* `debug=0x100` - this prevents a reboot on a kernel panic. That way you can (hopefully) glean some useful info and follow the breadcrumbs to get past the issues.
* `keepsyms=1` - this is a companion setting to `debug=0x100` that tells the OS to also print the symbols on a kernel panic. That can give some more helpful insight as to what's causing the panic itself.

#### DefaultBootVolume and Timeout:

These are the only other settings I've updated in this section.

* *DefaultBootVolume* - this uses NVRAM to remember which volume was last booted by Clover, and auto-select that at the next boot.
* *Timeout* - this is the number of seconds before the *DefaultBootVolume* auto-boots. You can set this to `-1` to avoid all timeout, or to `0` to skip the GUI entirely. If set to `0`, you can press any keys at boot to get the GUI to show back up in case of issues.

## Boot Graphics

Nothing here - just the stock settings. You could adjust this if Clover's scaling needs changes, but I don't mess with it.

## Cpu

Again, nothing here gets changed in most setups I've worked with.

## Devices

We'll handle some slick property injection for *WhateverGreen* here, and do some basic audio setup.

### Raw XML

```markup
    <key>Devices</key>
    <dict>
        <key>Audio</key>
        <dict>
            <key>Inject</key>
            <integer>1</integer>
            <key>ResetHDA</key>
            <true/>
        </dict>
        <key>Properties</key>
        <dict>
            <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
            <dict>
                <key>AAPL,ig-platform-id</key>
                <data>
                BwCbPg==
                </data>
                <key>framebuffer-patch-enable</key>
                <data>
                AQAAAA==
                </data>
                <key>framebuffer-stolenmem</key>
                <data>
                AAAwAQ==
                </data>
            </dict>
        </dict>
        <key>USB</key>
        <dict>
            <key>FixOwnership</key>
            <true/>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

![Coffee Lake Devices CC Section - iGPU](/files/-LPg1wDWPMFndgl4aBcb)

![Coffee Lake Devices CC Section - iGPU Connectorless](/files/-LOcxqSVBQHY-ckFaJWC)

![Device-Id fake for i3-8100 UHD 630](/files/-LOcte5-GWux2Z4mIM8g)

### Explanation

#### Fake ID:

This section remains empty for our example setup. In the past, almost-supported iGPUs (like the HD 4400) would get faked to a supported iGPU here, but we'll be using the cleaner Properties section for this.

#### USB:

Under this section, we ensure that *Inject* and *FixOwnership* are selected to avoid issues with hanging at a half-printed line somewhere around the `Enabling Legacy Matching` verbose line. You can also get past that by enabling *XHCI Hand Off* in BIOS.

#### Audio:

Here we set our audio to inject *Layout 1* - this may or may not be compatible with your codec, but you can check on [*AppleALC's Supported Codec Page*](https://github.com/acidanthera/AppleALC/wiki/Supported-codecs).

We also enabled *ResetHDA* which puts the codec back in a neutral state between OS reboots. This prevents some issues with no audio after booting to another OS and then back.

#### Properties:

This section is setup via Headkaze's [*Intel Framebuffer Patching Guide*](https://www.insanelymac.com/forum/topic/334899-intel-framebuffer-patching-using-whatevergreen/?tab=comments#comment-2626271) and applies only one actual property to begin, which is the *ig-platform-id*. The way we get the proper value for this is to look at the ig-platform-id we intend to use, then swap the pairs of hex bytes.

If we think of our ig-plat as `0xAABBCCDD`, our swapped version would look like `0xDDCCBBAA`.

The two ig-platform-id's we use are as follows:

* `0x3E9B0007` - this is used when the iGPU is used to drive a display
  * `07009B3E` when hex-swapped
  * `BwCbPg==` when the hex-swapped version is converted to base64
* `0x3E920003` - this is used when the iGPU is only used for compute tasks, and doesn't drive a display
  * `0300923E` when hex-swapped
  * `AwCSPg==` when the hex-swapped version is converted to base64

Worth noting that for 10.12 -> 10.13.5, you would need to fake the iGPU to the same values in the Kaby Lake guide, as this was before native Coffee Lake iGPU showed up.

We also add 2 more properties, *framebuffer-patch-enable* and *framebuffer-stolenmem*. The first enables patching via *WhateverGreen.kext,* and the second sets the min stolen memory to 19MB.

I added another screenshot as well that shows a `device-id` fake for the i3-8100's UHD 630. This has a different device id than the UHD 630 found on the 8700k, for instance (`3e918086` vs `3e928086` ).

For this - we follow a similar procedure as our above ig-platform-id hex swapping - but this time, we only work with the first two pairs of hex bytes. If we think of our device id as `0xAABB0000`, our swapped version would look like `0xBBAA0000`. We don't do anything with the last 2 pairs of hex bytes.

The device-id fake is setup like so:

* `0x3e920000` - this is the device id for the UHD 630 found on an 8700k
  * `923e0000` when hex swapped
  * `kj4AAA==` when the hex-swapped version is converted to base64

If using the raw xml, your Properties would look like this (make sure to still use the appropriate ig-platform-id for your setup):

```markup
        <key>Properties</key>
        <dict>
            <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
            <dict>
                <key>device-id</key>
                <data>
                kj4AAA==
                </data>
                <key>AAPL,ig-platform-id</key>
                <data>
                BwCbPg==
                </data>
                <key>framebuffer-patch-enable</key>
                <data>
                AQAAAA==
                </data>
                <key>framebuffer-stolenmem</key>
                <data>
                AAAwAQ==
                </data>
            </dict>
        </dict>
```

### Pink/Purple Tint?

I've seen a couple users report a pink tint when using HDMI with the UHD 630 iGPU. I did some experimenting on my own system and was able to work around it a couple different ways.

#### Force RGB

I saw the issue in [a reddit post](https://www.reddit.com/r/hackintosh/comments/9pufo8/8700k_igpu_has_a_purple_tint_on_mojave/), and the solution was to apply a custom override for your display to force it to use RGB instead of YCbCr outlined [here](https://www.mathewinkson.com/2013/03/force-rgb-mode-in-mac-os-x-to-fix-the-picture-quality-of-an-external-monitor). I wrote [a script](https://github.com/corpnewt/ForceRGB) that wraps around this method and auto-applies the override when it's completed. This worked fine for me, but didn't feel like a *real fix*. Which lead me to dive a bit deeper...

#### Connector Types In IOReg

I opened up IORegistryExplorer and in the search bar typed `IGPU` (this is sometimes named `GFX0` in ACPI, but Lilu + WhateverGreen should rename it properly) and got the following screen:

![Search for IGPU in IOReg](/files/-LPg1P0jwEfTPkrDk1MN)

Once we've located `IGPU` in IOReg, we can clear our search - this reveals all the info around the `IGPU` section while keeping our place:

![IGPU Selected With Search Cleared](/files/-LPgBoEBpTn37eUk2s-O)

As you can see in the above screenshot, I had a few different AppleIntelFramebuffer connections listed. I'm looking for the one that's specifically driving my display - which has the AppleDisplay property. In my case, this was AppleIntelFramebuffer\@1. With that selected on the left pane, you can find the `connector-type` property, which was originally set to `<00 04 00 00>` in my case. The connector type can have a few different values:

* `<00 04 00 00>` - this is DisplayPort
* `<00 08 00 00>` - this is HDMI
* `<04 00 00 00>` - this is Digital DVI
* `<02 00 00 00>` - this is LVDS (for laptops)
* `<01 00 00 00>` - this is just a Dummy port

What I noticed in my case was that my HDMI port was listed as a DisplayPort - so I was able to use WhateverGreen's patching abilities to change the connector-type.

Since my incorrect port was located at AppleIntelFramebuffer\@1, this is port `1`. I needed to enable the port patch in Properties, and then set the connector type to HDMI. I used the following Properties entries for that:

* `framebuffer-conX-enable = 01000000`
* `framebuffer-conX-type = 00080000`

I replaced the `conX` in both patches with `con1` to reflect the port that I am changing, then set the values as listed above.

![](/files/-LPgCIqj3snlP3qpV279)

```markup
        <key>Properties</key>
        <dict>
            <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
            <dict>
                <key>AAPL,ig-platform-id</key>
                <data>
                BwCbPg==
                </data>
                <key>device-id</key>
                <data>
                kj4AAA==
                </data>
                <key>framebuffer-con1-enable</key>
                <data>
                AQAAAA==
                </data>
                <key>framebuffer-con1-type</key>
                <data>
                AAgAAA==
                </data>
                <key>framebuffer-patch-enable</key>
                <data>
                AQAAAA==
                </data>
                <key>framebuffer-stolenmem</key>
                <data>
                AAAwAQ==
                </data>
            </dict>
        </dict>
```

![IOReg -\&gt; IGPU -\&gt; AppleIntelFramebuffer@1 After Patching](/files/-LPgC6gH_0b5qKok3qoq)

This also enabled HDMI audio for me as well.

![](/files/-LPc_X46pGeSb2OXZSk6)

## Disable Drivers

We have nothing to do here.

## Gui

### Raw XML

```markup
    <key>GUI</key>
    <dict>
        <key>Scan</key>
        <dict>
            <key>Entries</key>
            <true/>
            <key>Tool</key>
            <true/>
        </dict>
    </dict>
```

### Clover Configurator Screenshots

![Coffee Lake Gui CC Section](/files/-LNfcNjF_D5Rlf8RgDYe)

### Explanation

#### Scan:

The only settings I've tweaked on this page are the *Scan* settings. I've selected *Custom*, then checked everything except *Legacy* and *Kernel*. This just omits some of the unbootable entries in Clover to clean up the menu.

#### Hide Volumes:

I haven't added anything here, but you *can* hide unwanted volumes here. You can do so by either adding the volume's name, or UUID.

To hide extra APFS entries, add the following to this list:

* `Preboot`
* `VM`

To hide all Recovery partitions, add `Recovery` to the list.

To get the UUID of a drive to hide, you can use the following terminal command:

```
diskutil info diskXsY | grep -i "Partition UUID" | rev | cut -d' ' -f 1 | rev
```

Make sure to replace `diskXsY` with the actual disk number of the volume you'd like to hide.

#### Theme:

If you want to test out a new theme (and I suggest you look at [*clover-next-black*](https://github.com/al3xtjames/clover-theme-next-black)), you can add the unzipped theme folder to the */Volumes/EFI/EFI/CLOVER/themes* directory, then type the name of the folder in the *Theme* text field to apply it.

## Graphics

In the past, we'd setup the iGPU here, but since we already did that via Properties in the *Devices* section, we have nothing to really configure here. **NOTE**: When Clover detects an Intel iGPU, it *automatically* enables Intel Injection if the Graphics section doesn't exist in the config.plist. To bypass this, you can explicitly disable injection using the raw XML below, or by clicking the "Inject Intel" button once to check it, and once to uncheck it in CC.

### Raw XML

```markup
    <key>Graphics</key>
    <dict>
        <key>Inject</key>
        <false/>
    </dict>
```

## Kernel And Kext Patches

### Raw XML

```markup
    <key>KernelAndKextPatches</key>
    <dict>
        <key>KernelPm</key>
        <true/>
        <key>KextsToPatch</key>
        <array>
            <dict>
                <key>Comment</key>
                <string>Port limit increase</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g710////EA==
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.12.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g710////Gw==
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Port limit increase (RehabMan)</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g32IDw+DpwQAAA==
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.13.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g32ID5CQkJCQkA==
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Port limit increase (PMHeart)</string>
                <key>Disabled</key>
                <true/>
                <key>Find</key>
                <data>
                g/sPD4MDBQAA
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.14.0</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g/sPkJCQkJCQ
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>Port limit increase (Ricky)</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                g/sPD4OPBAAA
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>MatchOS</key>
                <string>10.14.x</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Replace</key>
                <data>
                g/sPkJCQkJCQ
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>External Icons Patch</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>
                RXh0ZXJuYWw=
                </data>
                <key>InfoPlistPatch</key>
                <false/>
                <key>Name</key>
                <string>AppleAHCIPort</string>
                <key>Replace</key>
                <data>
                SW50ZXJuYWw=
                </data>
            </dict>
        </array>
    </dict>
```

### Clover Configurator Screenshots

![Coffee Lake KernelAndKextPatches CC Section](/files/tttznRfTqTjiVpbKMIy7)

### Explanation

In this section, we've enabled a few settings and added some kext patches.

#### Checkboxes:

We have a couple checkboxes selected here:

* *Apple RTC* - this ensures that we don't have a BIOS reset on reboot.
* *KernelPM* - this setting prevents writing to MSR 0xe2 which can prevent a kernel panic at boot.

#### KextsToPatch:

We added 4 different kexts to patch here. Three of them are for USB port limit increases, and the last acts as an *orange icons fix* - when internal drives are hotpluggable, and treated as external drives.

You'll notice that there are MatchOS values set for each of the USB port limit patches. You can remove any of the entries for OS versions you don't intend to run. They won't do any harm being there, but if you want a clean, minimal plist, there's no sense in having them.

## RtVariables And SMBIOS

### Raw XML

```markup
    <key>RtVariables</key>
    <dict>
        <key>BooterConfig</key>
        <string>0x28</string>
        <key>CsrActiveConfig</key>
        <string>0x3E7</string>
        <key>MLB</key>
        <string>C02726902CDH69F1M</string>
        <key>ROM</key>
        <string>UseMacAddr0</string>
    </dict>
    <key>SMBIOS</key>
    <dict>
        <key>BoardSerialNumber</key>
        <string>C02726902CDH69F1M</string>
        <key>ProductName</key>
        <string>iMac18,1</string>
        <key>SerialNumber</key>
        <string>C02TX0VDH7JY</string>
        <key>SmUUID</key>
        <string>91492A73-595C-4D97-A6FC-2B5D3ED1B54D</string>
    </dict>
```

### Clover Configurator Screenshots

![Coffee Lake RtVariables CC Section](/files/-LNs1p7KgYxdlhCQ5Sjk)

![Coffee Lake SMBIOS CC Section](/files/-LNs2JYaKiSvRmXsMhcD)

### Explanation

For setting up the SMBIOS info, I use acidanthera's [*macserial*](https://github.com/acidanthera/macserial) application. I wrote a [*python script*](https://github.com/corpnewt/GenSMBIOS) that can leverage it as well (and auto-saves to the config.plist when selected). There's plenty of info that's left blank to allow Clover to fill in the blanks; this means that updating Clover will update the info passed, and not require you to also update your config.plist.

For this Coffee Lake example, I chose the *iMac18,1* SMBIOS - this is done intentionally for compatibility's sake. There are two main SMBIOS used for Coffee Lake:

* *iMac18,1* - this is used for computers utilizing the iGPU for displaying.
* *iMac18,3* - this is used for computers using a dGPU for displaying, and an iGPU for compute tasks only.

To get the SMBIOS info generated with *macserial*, you can run it with the `-a` argument (which generates serials and board serials for all supported platforms). You can also parse it with `grep` to limit your search to one SMBIOS type.

With our *iMac18,1* example, we would run *macserial* like so via the terminal:

```
macserial -a | grep -i iMac18,1
```

Which would give us output similar to the following:

```
      iMac18,1 | C02T8SZNH7JY | C02707101J9H69F1F
      iMac18,1 | C02VXBYDH7JY | C02753100GUH69FCB
      iMac18,1 | C02T7RY6H7JY | C02706310GUH69FA8
      iMac18,1 | C02VD07ZH7JY | C02737301J9H69FCB
      iMac18,1 | C02TQPYPH7JY | C02720802CDH69FAD
      iMac18,1 | C02VXYYVH7JY | C02753207CDH69FJC
      iMac18,1 | C02VDBZ0H7JY | C02737700QXH69FA8
      iMac18,1 | C02VP0H6H7JY | C02746300CDH69FJA
      iMac18,1 | C02VL0W9H7JY | C02743303CDH69F8C
      iMac18,1 | C02V2NYMH7JY | C02728600J9H69FAD
```

The order is `Product | Serial | Board Serial (MLB)`

The `iMac18,1` part gets copied to *SMBIOS -> Product Name*.

The `Serial` part gets copied to *SMBIOS -> Serial Number.*

The `Board Serial` part gets copied to *SMBIOS -> Board Serial Number* as well as *Rt Variables -> MLB.*

We can create an SmUUID by running `uuidgen` in the terminal (or it's auto-generated via my *GenSMBIOS* script) - and that gets copied to *SMBIOS -> SmUUID*.

We set *Rt Variables -> ROM* to `UseMacAddr0` which just utilizes our onboard Mac address - this should be unique enough to not conflict with any others.

*BooterConfig* gets set to `0x28`, and *CsrActiveConfig* is set to `0x3e7` which effectively disables SIP. You can choose a number of other options to enable/disable sections of SIP. Some common ones are as follows:

* `0x0` - SIP completely enabled
* `0x3` - Allow unsigned kexts and writing to protected fs locations
* `0x3e7` - SIP completely disabled

## System Parameters

### Raw XML

```markup
    <key>SystemParameters</key>
    <dict>
        <key>InjectKexts</key>
        <string>Yes</string>
        <key>InjectSystemID</key>
        <true/>
    </dict>
```

### Clover Configurator Screenshots

![System Parameters CC Section](/files/-LR2oF4VrWuQBmNAPMIH)

### Explanation

#### Inject Kexts:

This setting has 3 modes:

* `Yes` - this tells Clover to inject kexts from the EFI regardless.
* `No` - this tells Clover not to inject kexts from the EFI.
* `Detect` - this has Clover inject kexts only if *FakeSMC.kext* is not in the kext cache.

We set it to `Yes` to make sure that all the kexts we added before get injected properly.

#### InjectSystemID

This setting tells clover to set the SmUUID as the `system-id` at boot - which is important for iMessage and such.

## Saving

At this point, you can do *File -> Save* to save the config.plist. If you have issues saving directly to the EFI, you can save it on the Desktop, then just copy it over. I'll leave the [sample config.plist here](https://github.com/corpnewt/Hackintosh-Guide/blob/master/Configs/CoffeeLake/config.plist) too.


