1
0
Fork 0
mirror of https://github.com/tylernguyen/x1c6-hackintosh.git synced 2025-02-05 09:33:13 -06:00
x1c6-hackintosh/docs/Patches.md

149 lines
6.6 KiB
Markdown
Raw Normal View History

## ACPI Patches
2020-04-05 19:00:52 -05:00
1. Download and install [MaciASL](https://github.com/acidanthera/MaciASL/releases) if you do not have it already.
2. Dump your original ACPI tables. There are a number of ways to do this, using Clover, Hackintool, Linux. See [here](https://khronokernel.github.io/Getting-Started-With-ACPI/Manual/dump.html).
2020-04-07 01:01:14 -05:00
3. In Terminal, disassemble the copied ACPI tables with "iasl -dl DSDT.aml". For our purpose, the only file that really matters is DSDT.dsl
2020-04-05 19:00:52 -05:00
- Your DSDT file will be used as a reference table in determining that needs to be patched and what patches need to be added.
2020-04-05 19:00:52 -05:00
4. Source SSDT\*.dsl patch files are located in `patches` folder.
5. Refer to my `EFI-OpenCore` folder to see which patches are currently being used by me.
2021-06-07 18:24:26 -05:00
6. If your x1c6's model is 20KH*, most of my compiled hotpatches and can likely be copied straight to your setup. However, some patches may require certain directories or variables to be changed depending on your hardware (examine your own disassemebled DSDT). For these, edit the .dsl patch files. Also, note that some SSDT patches also require accompanying OpenCore/ Clover ACPI patches to work.
2020-03-31 00:38:22 -05:00
2021-06-07 18:24:26 -05:00
A good way to see if you need to edit and compile your own SSDT patches is to compare your DSDT.dsl with mine of the same BIOS version. You can find my disassemebled DSDT file in `ACPI/Disassembled ACPI/BIOS-v*`.
2020-04-05 19:00:52 -05:00
Should your source DSDT be similar enough (in regards to certain items in these ACPI patches)to mine. Congrats! You can simply try my compiled patches. Should it differ however, please carefully examine these notes and create your own SSDT patches.
2020-04-05 19:00:52 -05:00
7. Once you have the compiled ACPI patches, place them in `EFI/OC/ACPI/` and make sure to create matching entries within OpenCore's `config.plist`'s `ACPI/Add/` section.
2020-03-31 00:38:22 -05:00
# Hotpatching Notes
2020-04-05 19:00:52 -05:00
- Source ACPI patches are `.dsl` Edit these as needed.
- Compiled ACPI patches are `.aml` Once compiled, these belong to `EFI/OC/ACPI`.
- OpenCore Patches are patches for `config.plist` in their respective level.
2020-03-31 00:38:22 -05:00
!!! note
Refer to the current `EFI-OpenCore` to see which patches are being used.
2020-03-31 00:38:22 -05:00
2021-07-17 17:01:50 -05:00
## Important Note:
Unlike Clover, where SSDT patches are only being applied when booting macOS. OpenCore will apply SSDT patches regardless of the operating system. This is critical when multi-booting, since Windows and Linux do not need the additional patches that macOS does. In many cases, if Windows/Linux fails to boot under OpenCore, it is likely that your macOS intended SSDT patch(s) is being applied universally. To prevent OpenCore from doing this, it is important that your SSDT patches specify its intended OS, which in our case is "Darwin."
See highlighted example:
![OpenCore SSDT patching notice](https://raw.githubusercontent.com/tylernguyen/x1c6-hackintosh/master/docs/assets/img/OpenCore%20SSDT%20patching%20notice.png)
## Some Thinkpad machines are `LPC` and some are `LPCB`. Please examine your own DSDT and modify patches as needed.
!!! note
Network and Display patches are on a case-by-case basis and may differ for everyone.
2020-03-31 00:38:22 -05:00
2021-07-17 17:01:50 -05:00
### Non-native WiFi and Bluetooth
2020-04-05 19:00:52 -05:00
- `/patches/Network Patches/ DW1560.plist` for DW1560 model cards.
- `/patches/Network Patches/ DW1820A.plist` for WD1820A model cards.
- `/patches/Network Patches/ Intel.plist` for Intel branded cards.
2020-03-31 00:38:22 -05:00
2020-04-05 19:00:52 -05:00
\*Notice that these patches require additional kexts to be installed. See them in `Kernel/Add/`
2020-03-31 00:38:22 -05:00
2021-07-17 17:01:50 -05:00
### SSDT-Darwin - Detects macOS to enable other patches
2020-04-05 19:00:52 -05:00
2021-07-17 17:01:50 -05:00
### SSDT-AC - Patch to load AppleACPIACAdapter
2020-11-14 10:19:55 -06:00
2021-07-17 17:01:50 -05:00
### SSDT-Battery - Enables Battery Status in macOS
2020-04-05 19:00:52 -05:00
- Single battery system: only `BAT0` in ACPI, no `BAT1`.
2020-04-05 19:00:52 -05:00
2021-07-17 17:01:50 -05:00
### SSDT-HWAC - Fix axxess to 16byte-EC-field HWAC
2020-11-03 11:58:35 -06:00
- Thanks @benbender
2021-07-17 17:01:50 -05:00
### SSDT-PM - Enables Native Intel Power Managements
2020-03-31 00:38:22 -05:00
Why?: `Processor` search in DSDT, rename `PR` to other variables as needed.
2020-04-05 19:00:52 -05:00
2020-03-31 00:38:22 -05:00
```
Scope (\_PR)
{
Processor (PR00, 0x01, 0x00001810, 0x06){}
Processor (PR01, 0x02, 0x00001810, 0x06){}
Processor (PR02, 0x03, 0x00001810, 0x06){}
Processor (PR03, 0x04, 0x00001810, 0x06){}
Processor (PR04, 0x05, 0x00001810, 0x06){}
Processor (PR05, 0x06, 0x00001810, 0x06){}
Processor (PR06, 0x07, 0x00001810, 0x06){}
Processor (PR07, 0x08, 0x00001810, 0x06){}
Processor (PR08, 0x09, 0x00001810, 0x06){}
Processor (PR09, 0x0A, 0x00001810, 0x06){}
Processor (PR10, 0x0B, 0x00001810, 0x06){}
Processor (PR11, 0x0C, 0x00001810, 0x06){}
Processor (PR12, 0x0D, 0x00001810, 0x06){}
Processor (PR13, 0x0E, 0x00001810, 0x06){}
Processor (PR14, 0x0F, 0x00001810, 0x06){}
Processor (PR15, 0x10, 0x00001810, 0x06){}
}
```
2021-07-17 17:01:50 -05:00
### SSDT-PNLF - Enables Brightness Management in macOS and Smooth Adjustments with AppleBacklightSmoother.kext
2020-04-05 19:00:52 -05:00
iGPU is `PCI0.GFX0`
2020-03-31 00:38:22 -05:00
Why?: `Skylake/ KabyLake/ KabyLake-R` CPU.
2020-11-03 11:58:35 -06:00
Used in conjunction with `WhateverGreen.kext` and `AppleBacklightSmoother.kext` (Optional)
2020-04-05 19:00:52 -05:00
2021-07-17 17:01:50 -05:00
### SSDT-INIT - Initialize System Variables
2020-04-05 19:00:52 -05:00
2020-11-03 11:58:35 -06:00
Disables:
- HPET
- DPTF
Enables:
- DYTC
2020-04-05 19:00:52 -05:00
2021-07-17 17:01:50 -05:00
### SSDT-Keyboard - Remap PS2 Keys, EC Keys are handled by `BrightnessKeys.kext`
2020-04-05 19:00:52 -05:00
2020-11-03 11:58:35 -06:00
- Remap 1: PrtSc to F13
- Remap 2: Fn + K to Deadkey
- Remap 3: Fn + P to Deadkey
- For Fn 1-12 functions, check the following option within `Preferences/Keyboard`:
2020-04-05 19:00:52 -05:00
![Fn keys](https://github.com/tylernguyen/x1c6-hackintosh/blob/master/docs/assets/img/macOS%20Settings/fnkeys.png)
2020-03-31 00:38:22 -05:00
2021-07-17 17:01:50 -05:00
### SSDT-Sleep - Patch macOS Sleep, S3
- Comprehensive sleep/wake patch.
2020-11-14 10:19:55 -06:00
- Fixes restart on shutdown.
2020-11-03 11:58:35 -06:00
**Needs `OpenCore Patches/ Sleep.plist`**
2020-03-31 00:38:22 -05:00
2021-07-17 17:01:50 -05:00
### SSDT-EC - Alow Reads/Write and Provide an Interface with Embedded Controller via YogaSMC
2020-11-03 11:58:35 -06:00
Two parts:
- Allow access to EC
- Sample SSDT from YogaSMC
2020-03-31 00:38:22 -05:00
2021-07-17 17:01:50 -05:00
### SSDT-XHC1 - USB 2.0/3.0
2020-11-03 11:58:35 -06:00
**Needs `OpenCore Patches/ XHC1.plist`**
- Map USB 2.0/3.0
2020-11-14 10:19:55 -06:00
- Patch USB Power Properties
2021-07-17 17:01:50 -05:00
### SSDT-TB-DSB0 to SSDT-TB-DSB6
2020-11-03 11:58:35 -06:00
- Patch USB 3.1
2020-11-14 10:19:55 -06:00
- Patch Thunderbolt 3 Hotplug
- Patch Thunderbolt 3 Power Management
- Patch Thunderbolt 3 native interfacing with macOS's System Report
2020-03-31 00:38:22 -05:00
2021-07-17 17:01:50 -05:00
### SSDT-DMAC - Patch Memory Controller
2020-04-05 19:00:52 -05:00
2020-03-31 00:38:22 -05:00
Why?: `PNP0200` is missing in DSDT.
2020-04-05 19:00:52 -05:00
2021-07-17 17:01:50 -05:00
### SSDT-PMCR
2020-04-05 19:00:52 -05:00
Why?: `PMCR`,`APP9876` missing in DSDT.
2020-03-31 00:38:22 -05:00
2021-07-17 17:01:50 -05:00
### SSDT-PWRB
2020-04-05 19:00:52 -05:00
2020-03-31 00:38:22 -05:00
Why?: `PNP0C0C` missing in DSDT.
2020-11-14 10:19:55 -06:00
- Patch power button.
2020-03-31 00:38:22 -05:00
2021-07-17 17:01:50 -05:00
### SSDT-ALS0
2020-04-05 19:00:52 -05:00
Starting with Catalina, an ambient light sensor device is required for brightness preservation. This patch fakes an ambient light sensor device `ALS0` since the x1c6 does not have one.
2020-03-31 00:38:22 -05:00
Why?: `ACPI0008` missing in DSDT.
```
2020-11-03 11:58:35 -06:00
Special thanks to [@benbender](https://github.com/benbender) and [@daliansky](https://github.com/daliansky).
2020-04-05 19:00:52 -05:00
```