apm_available
Check if Advanced Power Management is available
SYNOPSIS
apm_available (shell function or test; no direct invocation)
DESCRIPTION
The apm_available is not a standard standalone Linux command but commonly refers to a shell test or function used in init scripts and power management configurations to determine if the Advanced Power Management (APM) driver is loaded and functional.
Typically implemented as a check against /proc/apm, it verifies if the APM BIOS interface is accessible. If /proc/apm exists and reports valid status (e.g., '1.0 0x07 0x01 0x00 0x00 0x00 0x00 0x00 0x00'), APM is considered available.
Example usage in scripts: APM_AVAILABLE=$(test -r /proc/apm && awk '/^1\.0/{print $3}' /proc/apm)
APM was prevalent in pre-ACPI laptops (Linux kernels up to ~2.6). Modern systems use ACPI instead, making this check largely obsolete. It's often seen in legacy distributions like older Debian or Slackware init.d/apmd scripts to conditionally start APM daemons.
CAVEATS
Deprecated; APM replaced by ACPI since kernel 2.6+. /proc/apm may not exist on modern hardware/kernels. Fails silently if not compiled into kernel (CONFIG_APM).
EXAMPLE CHECK
if [ -r /proc/apm ]; then
echo 'APM available';
fi
ALTERNATIVES
Use acpi_available or grep -q '^Driver:\s*ac' in /proc/acpi/info for modern systems.
HISTORY
Originated in early Linux (1990s-2000s) for laptop power management via APM BIOS spec (Intel/Microsoft). Integrated into kernel ~1.3; peaked in 2.4 era. Declined post-2004 with ACPI adoption. Removed from many distros by 2010s.


