Skip to content

Instantly share code, notes, and snippets.

@al3xtjames
Last active February 28, 2023 15:48
Show Gist options
  • Save al3xtjames/39ebea4d615c8aed829109a9ea2cd0b5 to your computer and use it in GitHub Desktop.
Save al3xtjames/39ebea4d615c8aed829109a9ea2cd0b5 to your computer and use it in GitHub Desktop.
# Requires ACPI debugging to be enabled; see https://pikeralpha.wordpress.com/2013/12/23/enabling-acpi-debugging/
# For streaming ACPI debug logs (e.g. hot (un)plugging USB-C/TB3 devices)
log stream --predicate 'process == "kernel" AND senderImagePath CONTAINS "AppleACPIPlatform"' --style syslog | awk '/ACPI Debug/{getline; getline; print}'
# For viewing previous ACPI debug logs (since boot)
log show --last boot --predicate 'process == "kernel" AND senderImagePath CONTAINS "AppleACPIPlatform"' --style syslog | awk '/ACPI Debug/{getline; getline; print}
DefinitionBlock ("", "SSDT", 1, "APPLE ", "Debug", 0x00001000)
{
/*
* Many OEM ACPI implementations have a ADBG function which is used for
* debug logging. In almost all cases, this function calls MDBG, which is
* supposed to be defined in a ACPI debug SSDT (but is usually missing).
* This should make ADBG functional.
*/
Method (MDBG, 1, NotSerialized)
{
Debug = Arg0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment