Remove SSDT disabling Wi-Fi and SD card reader

This commit is contained in:
Hoang Hong Quan
2024-08-03 08:18:18 +07:00
parent 619ae104f8
commit b228f3c369

40
Scripts/acpi_guru.py Executable file → Normal file
View File

@@ -854,44 +854,6 @@ DefinitionBlock ("", "SSDT", 2, "ZPSS", "DNVMe", 0x00000000)
}
}
"""
elif "WiFi" in device_name or "SD Controller" in device_name:
ssdt_name = "SSDT-Disable_{}".format("WiFi" if "WiFi" in device_name else "SD_Card_Reader")
ssdt_content = """
// Replace all "_SB.PCI0.RP01" with the ACPI path of your [[DeviceType]]
DefinitionBlock ("", "SSDT", 2, "ZPSS", "[[DeviceType]]", 0)
{
External (_SB.PCI0.RP01, DeviceObj)
Scope (_SB.PCI0.RP01)
{
OperationRegion (DE01, PCI_Config, 0x50, 1)
Field (DE01, AnyAcc, NoLock, Preserve)
{
, 4,
DDDD, 1
}
Method (_STA, 0, Serialized)
{
If (_OSI ("Darwin"))
{
Return (0)
}
Else
{
Return (0x0F)
}
}
}
Scope (\\)
{
If (_OSI ("Darwin"))
{
\\_SB.PCI0.RP01.DDDD = One
}
}
}""".replace("[[DeviceType]]", "DWiFi" if "WiFi" in device_name else "DSDC")
if ssdt_name:
self.result["Add"].append({
@@ -2971,4 +2933,4 @@ DefinitionBlock ("", "SSDT", 2, "ZPSS", "GPUSPOOF", 0x00001000)
self.result["Add"] = sorted(self.result["Add"], key=lambda x: x["Path"])
self.apply_acpi_patches()
return self.result
return self.result