---
name: "acpi"
section: "4"
platform: "linux"
package: "freebsd-manpages"
version: "6.0-5"
release: "Debian 4.0 (Etch)"
platforms: ["linux", "freebsd", "openbsd"]
url: "https://new.carta.tech/acpi/4"
---

# acpi(4)

Advanced Configuration and Power Management support

## NAME

**acpi** – Advanced Configuration and Power Management support

## SYNOPSIS

**device acpi**

**options ACPI\_DEBUG**

## DESCRIPTION

The **acpi** driver provides support for the Intel/Microsoft/Compaq/Toshiba ACPI standard. This support includes platform hardware discovery (superseding the PnP and PCI BIOS), as well as power management (superseding APM) and other features. ACPI core support is provided by the ACPI CA reference implementation from Intel.

Note that the **acpi** driver is automatically loaded by the [loader(8)](/loader/8.md), and should only be compiled into the kernel on platforms where ACPI is mandatory.

## SYSCTL VARIABLES

The **acpi** driver is intended to provide power management without user intervention. Thus, some of these sysctls are controlled automatically by the *power\_profile* [rc(8)](/rc/8.md) script, which can be configured via [rc.conf(5)](/rc.conf/5.md). If values are specified manually, they may be overridden.

- *hw.acpi.cpu.cx\_usage*

  Debugging information listing the percent of total usage for each sleep state. The values are reset when *hw.acpi.cpu.cx\_lowest* is modified.

- *hw.acpi.cpu.cx\_lowest*

  Lowest Cx state to use for idling the CPU. A scheduling algorithm will select states between C1 and this setting as system load dictates. To enable ACPI CPU idling control, *machdep.cpu\_idle\_hlt* must be set to 1.

- *hw.acpi.cpu.cx\_supported*

  List of supported CPU idle states and their transition latency in microseconds. Each state has a type (e.g., C2). C1 is equivalent to the ia32 HLT instruction, C2 provides a deeper sleep with the same semantics, and C3 provides the deepest sleep but additionally requires bus mastering to be disabled. States greater than C3 provide even more power savings with the same semantics as the C3 state. Deeper sleeps provide more power savings but increased transition latency when an interrupt occurs.

## LOADER TUNABLES

Tunables can be set at the [loader(8)](/loader/8.md) prompt before booting the kernel or stored in */boot/loader.conf*.

- *acpi\_dsdt\_load*

  Enables loading of a custom ACPI DSDT.

- *acpi\_dsdt\_name*

  Name of the DSDT table to load, if loading is enabled.

- *debug.acpi.disabled*

  Selectively disables portions of ACPI for debugging purposes.

- *debug.acpi.max\_threads*

  Specify the number of task threads that are started on boot. Limiting this to 1 may help work around various BIOSes that cannot handle parallel requests. The default value is 3.

- *debug.acpi.quirks*

  Override any automatic quirks completely.

- *hint.acpi.0.disabled*

  Set this to 1 to disable all of ACPI. If ACPI has been disabled on your system due to a blacklist entry for your BIOS, you can set this to 0 to re-enable ACPI for testing.

- *hw.acpi.ec.poll\_timeout*

  Delay in milliseconds to wait for the EC to respond. Try increasing this number if you get the error "AE\_NO\_HARDWARE\_RESPONSE".

- *hw.acpi.host\_mem\_start*

  Override the assumed memory starting address for PCI host bridges.

- *hw.acpi.pci.link.%d.%d.%d.irq*

  Override the interrupt to use.

- *hw.acpi.reset\_video*

  Enables calling the VESA reset BIOS vector on the resume path. Some graphic chips have problems such as LCD white-out after resume. Try setting this to 0 if this causes problems for you.

- *hw.acpi.serialize\_methods*

  Allow override of whether methods execute in parallel or not. Enable this for serial behavior, which fixes "AE\_ALREADY\_EXISTS" errors for AML that really cannot handle parallel method execution. It is off by default since this breaks recursive methods and some IBMs use such code.

- *hw.acpi.verbose*

  Turn on verbose debugging information about what ACPI is doing.

## DISABLING ACPI

Since ACPI support on different platforms varies greatly, there are many debugging and tuning options available.

For machines known not to work with **acpi** enabled, there is a BIOS blacklist. Currently, the blacklist only controls whether **acpi** should be disabled or not. In the future, it will have more granularity to control features (the infrastructure for that is already there).

To enable **acpi** (for debugging purposes, etc.) on machines that are on the blacklist, set the kernel environment variable *hint.acpi.0.disabled* to 0. Before trying this, consider updating your BIOS to a more recent version that may be compatible with ACPI.

To disable the **acpi** driver completely, set the kernel environment variable *hint.acpi.0.disabled* to 1.

Some i386 machines totally fail to operate with some or all of ACPI disabled. Other i386 machines fail with ACPI enabled. Disabling all or part of ACPI on non-i386 platforms (i.e., platforms where ACPI support is mandatory) may result in a non-functional system.

The **acpi** driver comprises a set of drivers, which may be selectively disabled in case of problems. To disable a sub-driver, list it in the kernel environment variable *debug.acpi.disabled*. Multiple entries can be listed, separated by a space.

ACPI sub-devices and features that can be disabled:

- all

  Disable all ACPI features and devices.

- acad

  (*device*) Supports AC adapter.

- bus

  (*feature*) Probes and attaches subdevices. Disabling will avoid scanning the ACPI namespace entirely.

- children

  (*feature*) Attaches standard ACPI sub-drivers and devices enumerated in the ACPI namespace. Disabling this has a similar effect to disabling “bus”, except that the ACPI namespace will still be scanned.

- button

  (*device*) Supports ACPI button devices (typically power and sleep buttons).

- cmbat

  (*device*) Control-method batteries device.

- cpu

  (*device*) Supports CPU power-saving and speed-setting functions.

- ec

  (*device*) Supports the ACPI Embedded Controller interface, used to communicate with embedded platform controllers.

- isa

  (*device*) Supports an ISA bus bridge defined in the ACPI namespace, typically as a child of a PCI bus.

- lid

  (*device*) Supports an ACPI laptop lid switch, which typically puts a system to sleep.

- quirks

  (*feature*) Do not honor quirks. Quirks automatically disable ACPI functionality based on the XSDT table's OEM vendor name and revision date.

- pci

  (*device*) Supports Host to PCI bridges.

- pci\_link

  (*feature*) Performs PCI interrupt routing.

- sysresource

  (*device*) Pseudo-devices containing resources which ACPI claims.

- thermal

  (*device*) Supports system cooling and heat management.

- timer

  (*device*) Implements a timecounter using the ACPI fixed-frequency timer.

- video

  (*device*) Supports [acpi\_video(4)](/acpi_video/4.md) which may conflict with [agp(4)](/agp/4.md) device.

It is also possible to avoid portions of the ACPI namespace which may be causing problems, by listing the full path of the root of the region to be avoided in the kernel environment variable *debug.acpi.avoid*. The object and all of its children will be ignored during the bus/children scan of the namespace. The ACPI CA code will still know about the avoided region.

## DEBUGGING OUTPUT

To enable debugging output, **acpi** must be compiled with **options ACPI\_DEBUG**. Debugging output is separated between layers and levels, where a layer is a component of the ACPI subsystem, and a level is a particular kind of debugging output.

Both layers and levels are specified as a whitespace-separated list of tokens, with layers listed in *debug.acpi.layer* and levels in *debug.acpi.level*.

The first set of layers is for ACPI-CA components, and the second is for FreeBSD drivers. The ACPI-CA layer descriptions include the prefix for the files they refer to. The supported layers are:

- ACPI\_UTILITIES

  Utility ("ut") functions

- ACPI\_HARDWARE

  Hardware access ("hw")

- ACPI\_EVENTS

  Event and GPE ("ev")

- ACPI\_TABLES

  Table access ("tb")

- ACPI\_NAMESPACE

  Namespace evaluation ("ns")

- ACPI\_PARSER

  AML parser ("ps")

- ACPI\_DISPATCHER

  Internal representation of interpreter state ("ds")

- ACPI\_EXECUTER

  Execute AML methods ("ex")

- ACPI\_RESOURCES

  Resource parsing ("rs")

- ACPI\_CA\_DEBUGGER

  Debugger implementation ("db", "dm")

- ACPI\_OS\_SERVICES

  Usermode support routines ("os")

- ACPI\_CA\_DISASSEMBLER

  Disassembler implementation (unused)

- ACPI\_ALL\_COMPONENTS

  All the above ACPI-CA components

- ACPI\_AC\_ADAPTER

  AC adapter driver

- ACPI\_BATTERY

  Control-method battery driver

- ACPI\_BUS

  ACPI, ISA, and PCI bus drivers

- ACPI\_BUTTON

  Power and sleep button driver

- ACPI\_EC

  Embedded controller driver

- ACPI\_FAN

  Fan driver

- ACPI\_OEM

  Platform-specific driver for hotkeys, LED, etc.

- ACPI\_POWER

  Power resource driver

- ACPI\_PROCESSOR

  CPU driver

- ACPI\_THERMAL

  Thermal zone driver

- ACPI\_TIMER

  Timer driver

- ACPI\_ALL\_DRIVERS

  All the above FreeBSD ACPI drivers

The supported levels are:

- ACPI\_LV\_ERROR

  Fatal error conditions

- ACPI\_LV\_WARN

  Warnings and potential problems

- ACPI\_LV\_INIT

  Initialization progress

- ACPI\_LV\_DEBUG\_OBJECT

  Stores to objects

- ACPI\_LV\_INFO

  General information and progress

- ACPI\_LV\_ALL\_EXCEPTIONS

  All the previous levels

- ACPI\_LV\_INIT\_NAMES

  - ACPI\_LV\_PARSE

  - ACPI\_LV\_LOAD

  - ACPI\_LV\_DISPATCH

  - ACPI\_LV\_EXEC

  - ACPI\_LV\_NAMES

  - ACPI\_LV\_OPREGION

  - ACPI\_LV\_BFIELD

  - ACPI\_LV\_TABLES

  - ACPI\_LV\_VALUES

  - ACPI\_LV\_OBJECTS

  - ACPI\_LV\_RESOURCES

  - ACPI\_LV\_USER\_REQUESTS

  - ACPI\_LV\_PACKAGE

  - ACPI\_LV\_VERBOSITY1

  All the previous levels

- ACPI\_LV\_ALLOCATIONS

  - ACPI\_LV\_FUNCTIONS

  - ACPI\_LV\_OPTIMIZATIONS

  - ACPI\_LV\_VERBOSITY2

  - ACPI\_LV\_ALL

  - ACPI\_LV\_MUTEX

  - ACPI\_LV\_THREADS

  - ACPI\_LV\_IO

  - ACPI\_LV\_INTERRUPTS

  - ACPI\_LV\_VERBOSITY3

  All the previous levels

- ACPI\_LV\_AML\_DISASSEMBLE

  - ACPI\_LV\_VERBOSE\_INFO

  - ACPI\_LV\_FULL\_TABLES

  - ACPI\_LV\_EVENTS

  - ACPI\_LV\_VERBOSE

  All levels after "ACPI\_LV\_VERBOSITY3"

Selection of the appropriate layer and level values is important to avoid massive amounts of debugging output. For example, the following configuration is a good way to gather initial information. It enables debug output for both ACPI-CA and the **acpi** driver, printing basic information about errors, warnings, and progress.

```
debug.acpi.layer="ACPI_ALL_COMPONENTS ACPI_ALL_DRIVERS"
debug.acpi.level="ACPI_LV_ALL_EXCEPTIONS"
```

Debugging output by the ACPI CA subsystem is prefixed with the module name in lowercase, followed by a source line number. Output from the FreeBSD-local code follows the same format, but the module name is uppercased.

## OVERRIDING YOUR BIOS BYTECODE

ACPI interprets bytecode named AML (ACPI Machine Language) provided by the BIOS vendor as a memory image at boot time. Sometimes, the AML code contains a bug that does not appear when parsed by the Microsoft implementation. FreeBSD provides a way to override it with your own AML code to work around or debug such problems. Note that all AML in your DSDT and any SSDT tables is overridden.

In order to load your AML code, you must edit */boot/loader.conf* and include the following lines.

```
acpi_dsdt_load="YES"
acpi_dsdt_name="/boot/acpi_dsdt.aml" # You may change this name.
```

In order to prepare your AML code, you will need the [acpidump(8)](/acpidump/8.md) and [iasl(8)](/iasl/8.md) utilities and some ACPI knowledge.

## COMPATIBILITY

ACPI is only found and supported on i386/ia32, ia64, and amd64.

## SEE ALSO

[kenv(1)](/kenv/1.md), [acpi\_thermal(4)](/acpi_thermal/4.md), [device.hints(5)](/device.hints/5.md), [loader.conf(5)](/loader.conf/5.md), [acpiconf(8)](/acpiconf/8.md), [acpidump(8)](/acpidump/8.md), [config(8)](/config/8.md), [iasl(8)](/iasl/8.md) Compaq Computer Corporation, Intel Corporation, Microsoft Corporation, Phoenix Technologies Ltd., and Toshiba Corporation, *Advanced Configuration and Power Interface Specification*, August 25, 2003, http://acpi.info/spec.htm.

## AUTHORS

The ACPI CA subsystem is developed and maintained by Intel Architecture Labs.

The following people made notable contributions to the ACPI subsystem in FreeBSD: Michael Smith, Takanori Watanabe ⟨takawata@jp.FreeBSD.org⟩, Mitsuru IWASAKI ⟨iwasaki@jp.FreeBSD.org⟩, Munehiro Matsuda, Nate Lawson, the ACPI-jp mailing list at ⟨acpi-jp@jp.FreeBSD.org⟩, and many other contributors.

This manual page was written by Michael Smith ⟨msmith@FreeBSD.org⟩.

## BUGS

If the **acpi** driver is loaded as a module when it is already linked as part of the kernel, odd things may happen.
