LinuxCommandLibrary

acpi

Display ACPI information

TLDR

Show battery information

$ acpi
copy

Show thermal information
$ acpi [[-t|--thermal]]
copy

Show cooling device information
$ acpi [[-c|--cooling]]
copy

Show thermal information in Fahrenheit
$ acpi [[-tf|--thermal --fahrenheit]]
copy

Show all information
$ acpi [[-V|--everything]]
copy

Extract information from /proc instead of /sys
$ acpi [[-p|--proc]]
copy

SYNOPSIS

acpi [ options ]

PARAMETERS

-b, --battery
    Show only battery information. This includes current charge, remaining capacity, and charging/discharging status.

-a, --ac-adapter
    Show only AC adapter information, indicating if the system is running on AC power.

-t, --thermal
    Show only thermal information, such as temperatures of various sensors or thermal zones.

-c, --cooling
    Show only cooling device information, including fan status or processor cooling states.

-V, --everything
    Show all available ACPI information (battery, AC adapter, thermal, and cooling). This is often the default behavior if no specific option is given.

-s, --show-symbols
    Display power symbols (e.g., '+', '-', '=') next to battery percentages to indicate charging, discharging, or full status.

-i, --show-empty-items
    Show items even if no information is available for them (e.g., a thermal zone with no reported temperature).

-f, --fahrenheit
    Show temperatures in Fahrenheit instead of the default Celsius.

-h, --help
    Display a brief help message and exit.

-v, --version
    Display version information and exit.

DESCRIPTION

The acpi command provides a straightforward way to query and display information related to the Advanced Configuration and Power Interface (ACPI) on a Linux system. It is commonly used by users to check the status of their laptop battery, whether the AC adapter is plugged in, and to monitor thermal zones or cooling devices. The command reads information exposed by the kernel, typically through filesystems like /proc/acpi (on older systems) or /sys/class/power_supply and /sys/class/thermal (on modern kernels).

It is particularly useful for scripting power-related actions, such as dimming the screen on battery power, or for quickly checking the remaining battery life and charge status without needing a full graphical user interface. By default, when invoked without options, it displays comprehensive power information including battery status, AC adapter presence, and thermal data.

CAVEATS

The acpi command relies heavily on the underlying Linux kernel's ACPI support and the information exposed by the system's hardware. If ACPI is not properly configured or if the hardware doesn't expose certain details (e.g., specific thermal sensors), acpi might show incomplete or no data.

While acpi can display status, it is not designed for handling ACPI events (like lid close or power button press). For such reactive power management, the acpid daemon is typically used in conjunction with custom scripts.

DATA SOURCES

The acpi command primarily reads data from the Linux kernel's exposed ACPI interfaces. On older systems, this information was often found in the /proc/acpi/ filesystem. On modern kernels, it typically queries information from /sys/class/power_supply/ for battery and AC adapter status, and /sys/class/hwmon/ or /sys/class/thermal/ for thermal data. This approach allows it to provide real-time power and thermal status without requiring root privileges for basic queries.

HISTORY

The acpi command emerged as a simple utility to interface with the ACPI (Advanced Configuration and Power Interface) power management system on Linux. Its development paralleled the increasing adoption of ACPI in PC hardware and the Linux kernel's growing support for it. It provided a user-friendly command-line interface to status information primarily found in the /proc/acpi filesystem, and later /sys/class/power_supply and /sys/class/thermal. It largely superseded tools that interfaced with the older APM (Advanced Power Management) specification, becoming a standard utility in many Linux distributions due to its simplicity and directness in querying power status.

SEE ALSO

acpid(8), upower(7), pm-utils(8), dmesg(1)

Copied to clipboard