Skip to content

Commit fc1ba7e

Browse files
committed
Add more Linux instructions to finding acpi paths
1 parent 97003ad commit fc1ba7e

File tree

6 files changed

+93
-23
lines changed

6 files changed

+93
-23
lines changed

Laptops/laptop-disable.md

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,55 @@ So with laptops, we can hide the dGPU from macOS with the little boot-arg called
77

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

10-
## Optimus Method
11-
12-
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:
10+
## Finding the ACPI Path
1311

14-
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)
12+
### Windows
1513

16-
Next we need to get on Windows, and head to the following:
14+
Head to the following:
1715

1816
```
1917
Device Manager -> Display Adapters -> dGPU -> Properties -> Details > BIOS device name
2018
```
2119

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

24-
This should provided you with an ACPI path for your dGPU, most commonly:
22+
This should have provided you with an ACPI path for your dGPU, most commonly:
2523

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

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

31-
Now with that, we'll need to change the ACPI path in the SSDT. Main sections:
29+
### Linux
30+
31+
Use `lcpci` to find the PCI path of your device:
32+
33+
```sh
34+
$ lspci -D | grep VGA
35+
0000:00:02.0 VGA compatible controller: Intel Corporation UHD Graphics (rev 05)
36+
0000:01:00.0 VGA compatible controller: NVIDIA Corporation TU106M [GeForce RTX 2060 Max-Q] (rev a1)
37+
```
38+
39+
Make a note of the PCI path of the dedicated graphics card (`0000:01:00.0` in my case).
40+
41+
Then use `cat` to get the ACPI path (substituting `[PCI path]` with the path obtained above):
42+
43+
```
44+
cat /sys/bus/pci/devices/[PCI path]/firmware_node/path
45+
```
46+
47+
This should have provided you with an ACPI path for your dGPU, most commonly:
48+
49+
* Nvidia dGPU: `\_SB.PCI0.PEG0.PEGP`
50+
* AMD dGPU: `\_SB.PCI0.PEGP.DGFX`
51+
52+
## Optimus Method
53+
54+
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:
55+
56+
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)
57+
58+
Using the ACPI path you acquired, we'll need to change the ACPI path in the SSDT. Main sections:
3259

3360
```
3461
External(_SB.PCI0.PEG0.PEGP._OFF, MethodObj)
@@ -48,18 +75,7 @@ With some machines, the simple `.off` call won't keep the card off properly, tha
4875

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

51-
Next we need to get on Windows, and head to the following:
52-
53-
```
54-
Device Manager -> Display Adapters -> dGPU -> Properties -> Details > BIOS device name
55-
```
56-
57-
This should provided you with an ACPI path for your dGPU, most commonly:
58-
59-
* Nvidia dGPU: `\_SB.PCI0.PEG0.PEGP`
60-
* AMD dGPU: `\_SB.PCI0.PEGP.DGFX`
61-
62-
Now with that, we'll need to change the ACPI path in the SSDT. Main sections:
78+
Using the ACPI path you acquired, we'll need to change the ACPI path in the SSDT. Main sections:
6379

6480
```
6581
External (_SB_.PCI0.PEG0.PEGP._DSM, MethodObj) // dGPU ACPI Path

Manual/dump.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ So to start, we'll need to get a copy of your DSDT from your firmware. The easie
1717
* [SSDTTime](https://github.com/corpnewt/SSDTTime)
1818
* Supports both Windows and Linux for DSDT dumping
1919
* `4. Dump DSDT - Automatically dump the system DSDT`
20-
* Do note that all ACPI patches from clover/OpenCore will be applied to the DSDT with the above method
20+
* sysfs
21+
* Run `sudo cat /sys/firmware/acpi/tables/DSDT > DSDT.aml`
22+
23+
* Do note that all ACPI patches from clover/OpenCore will be applied to the DSDT with the above 2 methods
2124

2225
## From Clover
2326

Universal/ec-methods/manual.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ To find the ACPI pathing, you have 2 methods:
2323

2424
* [DSDT](#dsdt)
2525
* [DeviceManager](#devicemanager)
26+
* [Linux](#linux)
2627

2728
### DSDT
2829

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

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

66+
### Linux
67+
68+
Use `find` over the ACPI tree:
69+
70+
```
71+
find /sys/devices/LNXSYSTM:00 -name 'PNP0C09:*'
72+
```
73+
74+
The above command finds all PNP0C09 devices in the ACPI tree. The output may be something like:
75+
76+
```
77+
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:18/PNP0C09:00
78+
```
79+
80+
To get the pathing, cat the `path`, taking the results from above, like so:
81+
82+
```
83+
cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:18/PNP0C09:00/path
84+
```
85+
86+
Now with the pathing, you can head here: [Edits to the sample SSDT](#edits-to-the-sample-ssdt)
87+
6588
## Edits to the sample SSDT
6689

6790
Now that we have our ACPI path, lets grab our SSDT and get to work:

Universal/plug-methods/manual.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99

1010
## Finding the ACPI path
1111

12-
To find the ACPI pathing, you have 2 methods:
12+
To find the ACPI pathing, you have 3 methods:
1313

1414
* [DSDT](#dsdt)
1515
* [DeviceManager](#devicemanager)
16+
* [Linux](#linux)
1617

1718
### DSDT
1819

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

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

39-
##### DeviceManager
40+
### DeviceManager
4041

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

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

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

65+
### Linux
66+
67+
Finding the CPU's ACPI path with Linux is very simple. Simply `cat` the firmware_node path:
68+
69+
```
70+
cat /sys/devices/system/cpu/cpu0/firmware_node/path
71+
```
72+
6473
## Edits to the sample SSDT
6574

6675
Now that we have our ACPI path, lets grab our SSDT and get to work:

Universal/smbus-methods/manual.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99

1010
## Finding the ACPI path
1111

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

1414
* [Hackintool](#hackintool)
1515
* [DeviceManager](#devicemanager)
16+
* [Linux](#linux)
1617

1718
### Hackintool
1819

@@ -40,6 +41,23 @@ From the above example, we can see the SMBus is located at:
4041
PC00.SMBS
4142
```
4243

44+
### Linux
45+
46+
Use `lcpci` to find the PCI path of the SMBus:
47+
48+
```sh
49+
$ lspci -D | grep SMBus
50+
0000:00:1f.4 SMBus: Intel Corporation Alder Lake-S PCH SMBus Controller (rev 11)
51+
```
52+
53+
Make a note of the PCI path of the SMBus controller (`0000:00:1f.4` in my case).
54+
55+
Then use `cat` to get the ACPI path (substituting `[PCI path]` with the path obtained above):
56+
57+
```
58+
cat /sys/bus/pci/devices/[PCI path]/firmware_node/path
59+
```
60+
4361
With the ACPI pathing, you can now head here: [Edits to the sample SSDT](#edits-to-the-sample-ssdt)
4462

4563
## Edits to the sample SSDT

dictionary/dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,7 @@ stolenmem
11571157
subreddit
11581158
sudo
11591159
sysctl
1160+
sysfs
11601161
takedowns
11611162
tbh
11621163
threadripper

0 commit comments

Comments
 (0)