acpi_available
Check if ACPI is available
SYNOPSIS
acpi_available
DESCRIPTION
The acpi_available command is a lightweight utility designed to determine if Advanced Configuration and Power Interface (ACPI) support is present and functional on a Linux system.
It performs a quick check by examining key filesystem locations such as /proc/acpi or ACPI-related directories in /sys/class. If these paths exist and indicate active ACPI subsystems, the command exits successfully with code 0. Otherwise, it returns a non-zero exit status.
This tool is particularly useful in shell scripts, initramfs environments, or system startup processes to conditionally enable ACPI-dependent features, load kernel modules, or adjust boot parameters. For example, it helps avoid errors on older hardware lacking ACPI or systems with it disabled via kernel boot options like acpi=off.
Originally part of early Linux ACPI toolsets, it remains relevant for embedded systems, servers, and custom distributions where ACPI status must be verified programmatically without relying on complex queries.
CAVEATS
Requires /proc and possibly /sys filesystems to be mounted; ineffective on non-Linux systems or with ACPI disabled in kernel. Does not test full ACPI functionality, only basic availability.
EXIT STATUS
0: ACPI available.
>0: ACPI unavailable or error.
DEPENDENCIES
Part of acpi-utils or acpid package; no runtime dependencies beyond standard libc.
HISTORY
Introduced in early 2000s as part of Linux ACPI subsystem tools (circa kernel 2.4/2.6 era) to support the growing adoption of ACPI on x86 hardware. Maintained in distributions like Debian/Ubuntu via acpi or acpid packages; usage peaked with laptop power management scripts.
SEE ALSO
acpi(1), acpid(8), acpi_listen(1), poweroff(8)


