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/4_README-ACPIpatching.md

155 lines
6.3 KiB
Markdown
Raw Normal View History

> ## ACPI Patching:
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.
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 disasemebled 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
2020-04-05 19:00:52 -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 disasemebled DSDT file in `ACPI/Disassembled ACPI/BIOS-v*`.
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
## Some patches here may be unused. Refer to the current OpenCore-EFI folder to see which one I am currently using. While other patches may be needed case-by-case, such as the WiFi/Bluetooth patches.
2020-04-05 19:00:52 -05:00
## Some Thinkpad machines are `LPC` and some are`LPCB`. Please examine your own DSDT and modify patches as needed.
2020-03-31 00:38:22 -05:00
> ### Non-native WiFi and Bluetooth
2020-04-05 19:00:52 -05:00
2020-03-31 00:38:22 -05:00
`OpenCore Patches/ Config-DW1560.plist` for DW1560 model cards.
2020-04-05 19:00:52 -05:00
`OpenCore Patches/ Config-DW1820A.plist` for WD1820A model 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
> ### SSDT-OCBAT0-TP_tx80_x1c6th - Enabling Battery Status in macOS
2020-04-05 19:00:52 -05:00
2020-04-07 01:01:14 -05:00
**Need `OpenCore Patches/ TPbattery.plist`**
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
> ### SSDT-PLUG-\_PR.PR00 - Enablaing 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){}
}
```
> ### SSDT-PNLF-SKL_KBL - Enabling Brightness Mangement in macOS
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.
Used in conjuction with `WhateverGreen.kext`
> ### SSDT-HPET
2020-04-05 19:00:52 -05:00
- Patch out IRQ conflicts. Credits to [corpnewt/SSDTTime](https://github.com/corpnewt/SSDTTime).
**Needs `OpenCore Patches/ HPET.plist`**
2020-04-05 19:00:52 -05:00
2020-03-31 00:38:22 -05:00
> ### SSDT-Keyboard - Remapping Fn and PrtSc Keys
2020-04-05 19:00:52 -05:00
Keyboard path is `\ _SB.PCI0.LPCB.KBD`.  
2020-04-05 19:00:52 -05:00
For multimedia functions:
- Remap 1: F4 (Network) to F4
- Remap 2: F5 (Brightness Down)
- Remap 3: F6 (Brightness Up)
- Remap 4: F7 (Dual Display) to F16
- Remap 5: F8 (Network) to F8
- Remap 6: F9 (Settings) to F19
- Remap 7: F10 (Bluetooth) to F20
- Remap 8: F11 (Keyboard) to F17
- Remap 9: F12 (Star) to F18
2020-03-31 00:38:22 -05:00
- Remap 10: PrtSc to F13
- Remap 11: Fn + K to Deadkey
- Remap 12: Fn + P to Deadkey
2020-04-05 19:00:52 -05:00
For Fn 1-12 functions, check the following option within `Preferences/Keyboard`:
![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
**Needs `OpenCore Patches/ x1c6-keyboard.plist`**
2020-04-05 19:00:52 -05:00
> ### SSDT-PTSWAK
2020-04-05 19:00:52 -05:00
- Comprehensive sleep/wake patch.
**Needs `OpenCore Patches/ PTSWAK.plist`**
2020-04-05 19:00:52 -05:00
Look up `_PTS` and `_WAK` in source DSDT and confirm the following, modify if different:
2020-03-31 00:38:22 -05:00
`_PTS` is `NotSerialized` in my DSDT
2020-04-05 19:00:52 -05:00
`_WAK` is `Serialized` in my DSDT
2020-03-31 00:38:22 -05:00
### SSDT-EXT1-FixShutdown
2020-03-31 00:38:22 -05:00
- PTSWAK extension patch. Fixes reboot after shutdown.
### SSDT-EXT3-LedReset-TP
- PTSWAK extension patch. Solve the problem that the breathing light does not return to normal after the TP machine wakes up.
### SSDT-EXT4-WakeScreen
2020-03-31 00:38:22 -05:00
- PTSWAK extension patch. Solve the problem that some machines need to press any key to light up the screen after waking up. When using, you should inquire whether the `PNP0C0D` device name and path already exist in the patch file, such as`_SB.PCI0.LPCB.LID0`. If not, add it yourself.
2020-03-31 00:38:22 -05:00
> ### SSDT-SBUS
2020-04-05 19:00:52 -05:00
2020-03-31 00:38:22 -05:00
Why?: `0x001F0004` under Device (SBUS).
> ### SSDT-DMAC
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
2020-03-31 00:38:22 -05:00
> ### SSDT-MCHC
2020-04-05 19:00:52 -05:00
Why?: `MCHC` is missing in DSDT.
2020-03-31 00:38:22 -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
> ### SSDT-PWRB
2020-04-05 19:00:52 -05:00
2020-03-31 00:38:22 -05:00
Why?: `PNP0C0C` missing in DSDT.
> ### 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.
> ### SSDT-GPRW
2020-04-05 19:00:52 -05:00
2020-03-31 00:38:22 -05:00
Why?: Fix instant wake by hooking GPRW (0D/6D Patch)
```
Special thanks to [daliansky](https://github.com/daliansky).
2020-04-05 19:00:52 -05:00
```