Skip to content

Commit

Permalink
Add more Linux instructions to finding acpi paths
Browse files Browse the repository at this point in the history
  • Loading branch information
xbjfk committed Feb 21, 2023
1 parent f519b77 commit 7aa570d
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 23 deletions.
54 changes: 35 additions & 19 deletions Laptops/laptop-disable.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,54 @@ So with laptops, we can hide the dGPU from macOS with the little boot-arg called

Note that this is not needed for install, but recommended for post-install

## Optimus Method

How this works is that we call the `.off` method found on Optimus GPUs, this is the expected way to power off a GPU but some may find their dGPU will power back up later on. Mainly seen in Lenovo's, the Optimus method should work for most users:

To start, grab [SSDT-dGPU-Off.dsl](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/decompiled/SSDT-dGPU-Off.dsl.zip)

Next we need to get on Windows, and head to the following:
## Finding the ACPI Path
### Windows
Head to the following:

```
Device Manager -> Display Adapters -> dGPU -> Properties -> Details > BIOS device name
```

* Note some GPUs may be hiding under "BIOS device name"

This should provided you with an ACPI path for your dGPU, most commonly:
This should have provided you with an ACPI path for your dGPU, most commonly:

* Nvidia dGPU: `\_SB.PCI0.PEG0.PEGP`
* AMD dGPU: `\_SB.PCI0.PEGP.DGFX`

![Credit to 1Revenger1 for the image](../images/Desktops/nvidia.png)

Now with that, we'll need to change the ACPI path in the SSDT. Main sections:
### Linux
Use `lcpci` to find the PCI path of your device:

```sh
$ lspci -D | grep VGA
0000:00:02.0 VGA compatible controller: Intel Corporation UHD Graphics (rev 05)
0000:01:00.0 VGA compatible controller: NVIDIA Corporation TU106M [GeForce RTX 2060 Max-Q] (rev a1)
```

Make a note of the PCI path of the dedicated graphics card (`0000:01:00.0` in my case).

Then use `cat` to get the ACPI path (substituting `[PCI path]` with the path obtained above):

```
cat /sys/bus/pci/devices/[PCI path]/firmware_node/path
```

This should have provided you with an ACPI path for your dGPU, most commonly:

* Nvidia dGPU: `\_SB.PCI0.PEG0.PEGP`
* AMD dGPU: `\_SB.PCI0.PEGP.DGFX`

## Optimus Method

How this works is that we call the `.off` method found on Optimus GPUs, this is the expected way to power off a GPU but some may find their dGPU will power back up later on. Mainly seen in Lenovo's, the Optimus method should work for most users:

To start, grab [SSDT-dGPU-Off.dsl](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/decompiled/SSDT-dGPU-Off.dsl.zip)


Using the ACPI path you acquired, we'll need to change the ACPI path in the SSDT. Main sections:

```
External(_SB.PCI0.PEG0.PEGP._OFF, MethodObj)
Expand All @@ -57,18 +83,8 @@ With some machines, the simple `.off` call won't keep the card off properly, tha

To start, grab [SSDT-NoHybGfx.dsl](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/decompiled/SSDT-NoHybGfx.dsl.zip)

Next we need to get on Windows, and head to the following:

```
Device Manager -> Display Adapters -> dGPU -> Properties -> Details > BIOS device name
```

This should provided you with an ACPI path for your dGPU, most commonly:

* Nvidia dGPU: `\_SB.PCI0.PEG0.PEGP`
* AMD dGPU: `\_SB.PCI0.PEGP.DGFX`

Now with that, we'll need to change the ACPI path in the SSDT. Main sections:
Using the ACPI path you acquired, we'll need to change the ACPI path in the SSDT. Main sections:

```
External (_SB_.PCI0.PEG0.PEGP._DSM, MethodObj) // dGPU ACPI Path
Expand Down
5 changes: 4 additions & 1 deletion Manual/dump.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ So to start, we'll need to get a copy of your DSDT from your firmware. The easie
* [SSDTTime](https://github.com/corpnewt/SSDTTime)
* Supports both Windows and Linux for DSDT dumping
* `4. Dump DSDT - Automatically dump the system DSDT`
* Do note that all ACPI patches from clover/OpenCore will be applied to the DSDT with the above method
* sysfs
* Run `sudo cat /sys/firmware/acpi/tables/DSDT > DSDT.aml`

* Do note that all ACPI patches from clover/OpenCore will be applied to the DSDT with the above 2 methods

## From Clover

Expand Down
12 changes: 10 additions & 2 deletions Universal/plug-methods/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@

## Finding the ACPI path

To find the ACPI pathing, you have 2 methods:
To find the ACPI pathing, you have 3 methods:

* [DSDT](#DSDT)
* [DeviceManager](#devicemanager)
* [Linux](#linux)

### DSDT

Expand All @@ -36,7 +37,7 @@ If we then search for instances of `CP00` we find that its full ACPI pathing is

Now with the pathing, you can head here: [Edits to the sample SSDT](#edits-to-the-sample-ssdt)

##### DeviceManager
### DeviceManager

If you already have Windows installed on this machine, finding the CPU pathing is fairly easy.

Expand All @@ -61,6 +62,13 @@ So with the above X299 example, our CPU pathing would be `SB.SCK0.CP00`

Now with the pathing, you can head here: [Edits to the sample SSDT](#edits-to-the-sample-ssdt)

### Linux

Finding the CPU's ACPI path with Linux is very simple. Simply `cat` the firmware_node path:
```
cat /sys/devices/system/cpu/cpu0/firmware_node/path
```

## Edits to the sample SSDT

Now that we have our ACPI path, lets grab our SSDT and get to work:
Expand Down
21 changes: 20 additions & 1 deletion Universal/smbus-methods/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@

## Finding the ACPI path

So to find the ACPI pathing of our SMBus, we've got 2 methods:
So to find the ACPI pathing of our SMBus, we've got 3 methods:

* [Hackintool](#hackintool)
* [DeviceManager](#devicemanager)
* [Linux](#linux)

### Hackintool

Expand Down Expand Up @@ -40,6 +41,24 @@ From the above example, we can see the SMBus is located at:
PC00.SMBS
```


### Linux

Use `lcpci` to find the PCI path of the SMBus:

```sh
$ lspci -D | grep SMBus
0000:00:1f.4 SMBus: Intel Corporation Alder Lake-S PCH SMBus Controller (rev 11)
```

Make a note of the PCI path of the SMBus controller (`0000:00:1f.4` in my case).

Then use `cat` to get the ACPI path (substituting `[PCI path]` with the path obtained above):

```
cat /sys/bus/pci/devices/[PCI path]/firmware_node/path
```

With the ACPI pathing, you can now head here: [Edits to the sample SSDT](#edits-to-the-sample-ssdt)

## Edits to the sample SSDT
Expand Down

0 comments on commit 7aa570d

Please sign in to comment.