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 Oct 31, 2023
1 parent 97003ad commit 700396e
Show file tree
Hide file tree
Showing 6 changed files with 94 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 @@ -7,28 +7,55 @@ 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:
## Finding the ACPI Path

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)
### Windows

Next we need to get on Windows, and head to the following:
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 @@ -48,18 +75,7 @@ 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
6 changes: 5 additions & 1 deletion Manual/dump.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ 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`
* Fix permissions: `chown "$(whoami):$(id -gn)" 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
23 changes: 23 additions & 0 deletions Universal/ec-methods/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ To find the ACPI pathing, you have 2 methods:

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

### DSDT

Expand Down Expand Up @@ -62,6 +63,28 @@ From the above, we can see that our pathing is `SB.PC00.LPC0.EC0`

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

### Linux

Use `find` over the ACPI tree:

```
find /sys/devices/LNXSYSTM:00 -name 'PNP0C09:*'
```

The above command finds all PNP0C09 devices in the ACPI tree. The output may be something like:

```
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:18/PNP0C09:00
```

To get the pathing, cat the `path`, taking the results from above, like so:

```
cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:18/PNP0C09:00/path
```

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

## Edits to the sample SSDT

Now that we have our ACPI path, lets grab our SSDT and get to work:
Expand Down
13 changes: 11 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,14 @@ 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
20 changes: 19 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,23 @@ 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
1 change: 1 addition & 0 deletions dictionary/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,7 @@ stolenmem
subreddit
sudo
sysctl
sysfs
takedowns
tbh
threadripper
Expand Down

0 comments on commit 700396e

Please sign in to comment.