Misc Fixes

- Inital lint'ing
- Clean up README.md table
- Add CONTRIBUTING.md
- Add TROUBLESHOOTING.md
This commit is contained in:
Mykola Grymalyuk
2020-04-18 13:29:12 -06:00
parent fb33ef4979
commit 17f7c8aba3
43 changed files with 13509 additions and 164 deletions

View File

@@ -8,8 +8,7 @@ With most modern laptop DSDTs, there's a variable called `GPEN` or `GPHD` which
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:
![](https://media.discordapp.net/attachments/456913818467958789/677279455525208096/Screen_Shot_2020-02-12_at_3.25.27_PM.png?width=1674&height=1256)
![](/images/Laptops/trackpad-md/gpi0.png)
What we care about from this is the `_STA` method:
@@ -24,24 +23,25 @@ Method (_STA, 0, NotSerialized)
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/khronokernel/Getting-Started-With-ACPI/blob/master/extra-files/SSDT-GPI0.dsl) and make the required edits. Then clean up with compiling it
## More examples
## More examples:
![](https://media.discordapp.net/attachments/456913818467958789/677283983322775572/Screen_Shot_2020-02-12_at_3.34.26_PM.png?width=1674&height=1704)
![](/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"))