Overview
Diagnosing hardware power states and analyzing low-level firmware tables in Ubuntu requires direct access to kernel diagnostic utilities. This walkthrough explores practical applications of acpidbg, guiding systems engineers through mounting kernel debug endpoints, interacting with the runtime AML debugger, and extracting ACPI tables for static disassembly.
Setting Up Tooling and Validating Debug Environments
Begin by installing the fundamental diagnostic suites—acpidump, acpica-tools, and linux-tools-common—to supply both userland disassemblers and kernel execution bridges.

The acpidbg utility establishes an interactive pipeline directly into the kernel’s internal ACPI interpreter. Verify whether the binary exists locally; if missing, resolve dependencies against the matching kernel tool metapackage.
⚙️ [Core Flags]
-b : Launches the AML debugger interface in non-interactive batch processing mode.-f : Loads an external script file populated with pre-staged AML diagnostic directives.

Query the active kernel build string using uname -r to pinpoint the exact release profile your system currently boots.

Next, audit /sys/kernel/debug/acpi to check whether the ACPI debug control nodes are already exposed via debugfs.

Mounting debugfs and Exposing the ACPI Debugger Interface
Interactive debugging relies on the kernel’s virtual debug filesystem. Mount debugfs at its conventional mount point if it has not been automatically initialized by your init system.

Confirm that the ACPI-specific subsystem tree within debugfs is now readable and accessible by privileged users.

Initialize the in-kernel AML debugger module by loading acpi_dbg, which exposes the bidirectional communication pipe needed for userland debugging.

Ensure the character interface node /sys/kernel/debug/acpi/acpidbg is active and ready to process commands.

Querying acpidbg Syntax and Executing Automated Commands
Inspect the argument parsing syntax and basic invocation flags of the tool using the standard help switch.

Rather than maintaining a persistent terminal session, pipe standard text commands directly into the debugger process. This demonstrates how scripts can orchestrate headless AML diagnostics.

Validate the operational state and version handshake of the kernel’s ACPI subsystem by dispatching a batch version request through standard input.

Extracting Firmware Tables and Decompiling AML Code
Allocate an isolated scratch directory to store extracted binary blobs and decompiled source files.

Capture the raw binary payload of the primary DSDT (Differentiated System Description Table), which defines motherboard peripherals and power management routines.

Decompile the raw ACPI Machine Language bytecode (.dat) into human-readable ACPI Source Language (.dsl) using the ACPICA compiler.

Review the generated disassembly file on disk to verify that conversion completed without corruption and note its overall footprint.

Inspect the top metadata records in the disassembled source to extract critical hardware identifiers, OEM designations, compilation timestamps, and revision standards.

This workflow outlines the core lifecycle of tracking ACPI firmware events, interfacing directly with runtime kernel debug interfaces via acpidbg, and correlating bytecode routines against disassembled system tables on Ubuntu platforms.