Massive overhaul(hopefully helps new users a bti)

This commit is contained in:
Mykola Grymalyuk
2020-05-30 23:54:37 -06:00
parent 1f776dfb8c
commit 0c2d4b492d
60 changed files with 945 additions and 706 deletions

View File

@@ -0,0 +1,68 @@
# Fixing Backlight: Manual
* [Finding the ACPI path](#finding-the-acpi-path)
* [Edits to the sample SSDT](#edits-to-the-sample-ssdt)
* [Compiling the SSDT](#compiling-the-ssdt)
* [Wrapping up](#wrapping-up)
## Finding the ACPI path
For this guide, we're gonna assume Windows is already on this laptop, as otherwise creating this SSDT is a bit more difficult.
Now open DeviceManager, and head to the following:
```text
Device Manager -> Display Adapters -> Properties -> Details > BIOS device name
```
* Note some GPU ACPI pathing may be hiding under "BIOS device name"
![Credit to 1Revenger1 for the image](/images/Laptops/backlight-md/devicemanager.png)
From the above example, we can see our display is hooked up to `PCI0.GFX0`
## Edits to the sample SSDT
Now that we have our ACPI path, lets grab our SSDT and get to work:
* [SSDT-PNLF.dsl](https://github.com/acidanthera/WhateverGreen/blob/master/Manual/SSDT-PNLF.dsl)
* [SSDT-PNLF-CFL.dsl](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/decompiled/SSDT-PNLF-CFL.dsl.zip)
* For Coffee Lake and newer
By default, this uses `PCI0.GFX0` for the pathing. you'll want to rename accordingly. For this example, we'll assume your pathing is `PCI0.GPU0`:
**Before**:
```
External (_SB_.PCI0.GFX0, DeviceObj) <- Rename this
Scope (_SB.PCI0.GFX0) <- Rename this
Device(_SB.PCI0.GFX0.PNLF) <- Rename this
```
![](/images/Laptops/backlight-md/ssdt-before.png)
Following the example pathing we found, the SSDT should look something like this:
**After**:
```
External (_SB_.PCI0.GPU0, DeviceObj) <- Renamed
Scope (_SB.PCI0.GPU0) <- Renamed
Device(_SB.PCI0.GPU0.PNLF) <- Renamed
```
![](/images/Laptops/backlight-md/ssdt-after.png)
## Compiling the SSDT
With the SSDT done, you're now [ready to compile the SSDT!](/Manual/compile.md)
## Wrapping up
Once you're done making your SSDT, either head to the next page to finish the rest of the SSDTs or head here if you're ready to warp up:
* [**Cleanup**](/cleanup.md)

View File

@@ -0,0 +1,16 @@
# Fixing Backlight: Prebuilt
By far the easiest method, all you need to do is download the following file:
* [SSDT-PNLF.aml](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/compiled/SSDT-PNLF.aml)\
* For most users
* [SSDT-PNLF-CFL.aml](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/compiled/SSDT-PNLF-CFL.aml)
* For Coffee Lake and newer
Main things to note with this method:
* Assumes GPU pathing, works great for 99% of devices but if you're having issues controlling backlight this may be something to look at
* Doesn't really teach you anything
* For most, this doesn't matter. But to some knowing what makes your hackintosh tick is part of the journey

View File

@@ -1,22 +1,15 @@
# Fixing Backlight
# Fixing Backlight (SSDT-PNLF)
So what this SSDT does is create a PNLF device for macOS to play with, specifically one with a hardware ID of `APP0002`. WhateverGreen will handle the rest of the work
* [What this SSDT does](#what-this-ssdt-does)
* [Methods to make this SSDT](#methods-to-make-this-ssdt)
No configuration required for most, just drop the pre-built file into your EFI:
## What this SSDT does
* [SSDT-PNLF](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/compiled/SSDT-PNLF.aml)
* For most users
* [SSDT-PNLF-CFL](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/compiled/SSDT-PNLF-CFL.aml)
* For Coffee Lake and newer
The purpose of this SSDT is to create a PNLF device for macOS to play with, specifically one with a hardware ID of `APP0002`. Luckily WhateverGreen will handle the rest of the work for us.
Note: there are some rare cases where the iGPU is called `GPU0` or `VID`in the DSDT, you can double check by searching for `PCI0.GFX0`, `PCI0.VID` and `PCI0.GPU0`. Whichever shows up is your device
## Methods to make this SSDT
If Windows has been installed on the device, you can also do the following:
For the backlight fix, there are 2 methods you can choose from:
```text
Device Manager -> Display Adapters -> Properties -> Details > BIOS device name
```
* Note some GPUs may be hiding under "BIOS device name"
![Credit to 1Revenger1 for the image](/images/Desktops/nvidia.png)
* [Prebuilt](/Laptops/backlight-methods/prebuilt.md)
* [Manual](/Laptops/backlight-methods/manual.md)

View File

@@ -1,4 +1,13 @@
# Disabling laptop dGPUs
# Disabling laptop dGPUs (SSDT-dGPU-Off/NoHybGfx)
* [What this SSDT does](#what-this-ssdt-does)
* [Methods to make this SSDT](#methods-to-make-this-ssdt)
* [Prebuilt](#prebuilts)
* [SSDTTime](#ssdttime)
* [Manual](#manual)
* [Finding the ACPI path](#finding-the-acpi-path)
* [Edits to the sample SSDT](#edits-to-the-sample-ssdt)
* [Compiling the SSDT](#compiling-the-ssdt)
So with laptops, we can hide the dGPU from macOS with the little boot-arg called `-wegnoegpu` from WhateverGreen. But one small problem, the dGPU is still pulling power draining your battery slowly. We'll be going over 2 methods for disabling the dGPU in a laptop:

View File

@@ -1,54 +1,3 @@
# Fixing Embedded Controller (Laptop)
## You'll want to go to [SSDT-EC under the Universal tab](/Universal/desktop-ec.md) for the new SSDT-EC page
To fix the ECs found in laptops, we'll be renaming them to look like the ones macOS expects. The reason for this is that many laptops break when you turn off their EC with an SSDT. So this is why we can't use the fancy SSDTTime to make a patch for us.
To find out what EC you have, open your decompiled DSDT and search for `PNP0C09`. This should give you a result like this:
![](/images/Laptops/laptop-ec-md/dsdt-pnp.png)
As you can see our `PNP0C09` is found within the `Device (EC0)` meaning this is the device we want to rename.
> What happens if multiple `PNP0C09` show up
When this happens you need to figure out which is the main and which is not, it's fairly easy to figure out. Check each controller for the following properties:
* `_HID` (Hardware ID)
* `_CRS` (Current Resource Settings)
* `_GPE` (General Purpose Events)
Note that only the main EC needs renaming, if you only have one `PNP0C09` then it is automatically your main regardless of properties.
> What if my main `PNP0C09` device is already called `Device (EC)`?
Mainly relevant for Lenovo and a few other OEMs, when this happens that means that your Embedded Controller is ready to use in macOS! Do make sure that this `Device (EC)` is actually your main EC and not a secondary one.
**And please verify that the DSDT hasn't already been patched by Clover or OpenCore**, please dump it without booting either of them to be sure or triple check that there aren't any EC renames in your config already
![](/images/Laptops/laptop-ec-md/ec.png)
For those having issues, you can also check `Device Manager -> Embedded Controller -> BIOS device Name`. Widows will only report the main EC so will save you some headache on that
# Applying your EC patch
As you can see from the table below, we'll be renaming our EC listed in the DSDT. Do note you cannot just throw random renames without checking which is the main EC first, as **this can cause actual damage to your laptop.**
|Comment|Find\*\[HEX\]|Replace\[HEX\]|
|:-|:-|:-|
|change EC0 to EC|4543305f|45435f5f|
|change H\_EC to EC|485f4543|45435f5f|
|change ECDV to EC|45434456|45435f5f|
|change PGEC to EC|50474543|45435f5f|
## Inside your config
| Comment | String | Change XXXX to EC |
| :--- | :--- | :--- |
| Enabled | String | YES |
| Count | Number | 0 |
| Limit | Number | 0 |
| Find | Data | xxxxxxxx |
| Replace | Data | xxxxxxxx |
![](/images/Laptops/laptop-ec-md/config.png)

View File

@@ -0,0 +1,83 @@
# Fixing Trackpads: Manual
* [Finding the ACPI path](#finding-the-acpi-path)
* [Edits to the sample SSDT](#edits-to-the-sample-ssdt)
* [Compiling the SSDT](#compiling-the-ssdt)
* [Wrapping up](#wrapping-up)
## Finding the ACPI path
Finding the ACPI pathing is quite easy actually, first open your decompiled DSDT you got from [Dumping the DSDT](/Manual/dump.md) and [Decompiling and Compiling](/Manual/compile.md) with either maciASL(if in macOS) or any other text editor if in Windows or Linux(VSCode has an [ACPI extension](https://marketplace.visualstudio.com/items?itemName=Thog.vscode-asl) that can also help).
Next search for `Device (GPI0)`. Should give you a result similar to this:
![](/images/Laptops/trackpad-md/gpi0.png)
What we care about from this is the `_STA` method:
```
Method (_STA, 0, NotSerialized)
{
If ((GPHD == One))
{
Return (0x03)
}
Return (0x0F)
}
```
What we want is for this to always return `0x0F` when booting macOS, so we want to make an SSDT that will return `GPHD == Zero` in macOS.
**NOTE that you may have the other way around where GPHD needs to be set as `One` to return `0x0F`**. And your device name may also be different, don't throw random SSDTs in thinking it'll work
Here's some more examples:
![](/images/Laptops/trackpad-md/gpi0-2.png)
With this example, we can see that we need both `SBRG` and `GPEN` to return `One`. If only one is present, it'll create some issues so in our SSDT we'll want to have both of them return `One`:
## Edits to the sample SSDT
Now that we have our ACPI path, lets grab our SSDT and get to work:
* [SSDT-GPI0.dsl](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/decompiled/SSDT-GPI0.dsl)
From the second example, we'll want to set both GPEN and SBRG to `One` to allow it to operate in macOS:
**Before**:
```
If (_OSI ("Darwin"))
{
GPEN = One <- Change to the right variables
SBRG = One <- Change to the right variables
}
```
![](/images/Laptops/trackpad-md/ssdt-before.png)
Following the example pathing we found, the SSDT should look something like this:
**After**:
```
If (_OSI ("Darwin"))
{
GPEN = One <- Proper variables
}
```
![](/images/Laptops/trackpad-md/ssdt-after.png)
## Compiling the SSDT
With the SSDT done, you're now [ready to compile the SSDT!](/Manual/compile.md)
## Wrapping up
Once you're done making your SSDT, either head to the next page to finish the rest of the SSDTs or head here if you're ready to warp up:
* [**Cleanup**](/cleanup.md)

View File

@@ -0,0 +1,15 @@
# Fixing Trackpads: Prebuilt
This is a one-size fits all solution where we basically trick our hardware into thinking it's booting Windows. The problem with this method is that it's common to break Windows booting so avoid unless troubleshooting.
* [SSDT-XOSI](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/compiled/SSDT-XOSI.aml)
* XOSI Rename(add this under config.plist -> ACPI -> Patch):
| Comment | String | Change _OSI to XOSI |
| :--- | :--- | :--- |
| Enabled | Boolean | YES |
| Count | Number | 0 |
| Limit | Number | 0 |
| Find | Data | 5f4f5349 |
| Replace | Data | 584f5349 |

View File

@@ -1,70 +1,18 @@
# Fixing Trackpads
# Fixing Trackpads (SSDT-GPI0/XOSI)
* [What this SSDT does](#what-this-ssdt-does)
* [Methods to make this SSDT](#methods-to-make-this-ssdt)
## What this SSDT does
This SSDT is used to force enable our GPI0 for VoodooI2C to connect onto.
With most modern laptop DSDTs, there's a variable called `GPEN` or `GPHD` which are used for setting the status of the GPI0 device. For us, we want to enable the device.
## Finding our GPI0
## Methods to make this SSDT
So first things we need to do is find out what variable is used to enable our GPI0 device, lets open up our decompiled SSDT and search for `Device (GPI0)`. Should give you a desult similar to this:
For the trackpad fix, there are 2 methods you can choose from:
![](/images/Laptops/trackpad-md/gpi0.png)
What we care about from this is the `_STA` method:
```
Method (_STA, 0, NotSerialized)
{
If ((GPHD == One))
{
Return (0x03)
}
Return (0x0F)
}
```
What we want is for this to always return `0x0F` when booting macOS, so we want to make an SSDT that will return `GPHD == Zero` in macOS.
**NOTE that you may have the other way around where GPHD needs to be set as `One` to return `0x0F`**. And your device name may also be different, don't throw random SSDTs in thinking it'll work
Once you found the variable and what it should be set to, grab a copy of [SSDT-GPI0.dsl](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/decompiled/SSDT-GPI0.dsl) and make the required edits. Then clean up with compiling it
## More examples
![](/images/Laptops/trackpad-md/gpi0-2.png)
With this example, we can see that we need both `SBRG` and `GPEN` to return `One`. If only one is present, it'll create some issues so in our SSDT we'll want to have both of them return `One`:
```
DefinitionBlock("", "SSDT", 2, "ACDT", "GPI0", 0)
{
External(GPEN, FieldUnitObj)
External(SBRG, FieldUnitObj)
Scope (\)
{
If (_OSI ("Darwin"))
{
GPEN = One
SBRG = One
}
}
}
```
## GPIO Troubleshooting
So if you're still having issues enabling your trackpad in macOS, you can try removing SSDT-GPIO and instead swap for the following. Note that using these 2 will most likely break Windows and Linux so only use XOSI when troubleshooting:
* [SSDT-XOSI](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/compiled/SSDT-XOSI.aml)
* XOSI Rename:
| Comment | String | Change _OSI to XOSI |
| :--- | :--- | :--- |
| Enabled | Boolean | YES |
| Count | Number | 0 |
| Limit | Number | 0 |
| Find | Data | 5f4f5349 |
| Replace | Data | 584f5349 |
* [Prebuilt](/Laptops/trackpad-methods/prebuilt.md)
* [Manual](/Laptops/trackpad-methods/manual.md)