ACPI(4) | Device Drivers Manual | ACPI(4) |
acpi
— Advanced
Configuration and Power Management support
device acpi
options ACPI_DEBUG
options DDB
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), and should only be compiled into
the kernel on platforms where ACPI is mandatory.
The acpi
driver is intended to provide
power management without user intervention. If the default settings are not
optimal, the following sysctls can be used to modify or monitor
acpi
behavior. Note that some variables will be
available only if the given hardware supports them (such as
hw.acpi.acline).
options
ACPI_DEBUG
. Default is 0, ignore Debug objects.C1
and this setting as
system load dictates. To enable ACPI CPU idling control,
machdep.idle should be set to
acpi
if it is listed in
machdep.idle_available.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.S1
–S5
) to enter
when the lid switch (i.e., a notebook screen) is closed. Default is
“NONE
” (do nothing).S1
–S5
) to enter
when the power button is pressed. Default is S5
(power-off nicely).S4BIOS
. This
means that the BIOS can handle all the functions of suspending the system
to disk. Otherwise, the OS is responsible for suspending to disk
(S4OS
). Most current systems do not support
S4BIOS
.S1
–S5
) to enter
when the sleep button is pressed. This is usually a special function
button on the keyboard. Default is S3
(suspend-to-RAM).S1
–S5
) supported
by the BIOS.
S1
S2
S1
, but with the same
basic characteristics. Not supported by many systems.S3
S4
S4BIOS
is available.S5
Tunables can be set at the loader(8) prompt before booting the kernel or stored in /boot/loader.conf. Many of these tunables also have a matching sysctl(8) entry for access after boot.
AE_NO_HARDWARE_RESPONSE
"._OSI
’ query method. When an OS
interface is specified in hw.acpi.install_interface,
_OSI
query for the interface returns it is
supported.
Conversely, when an OS interface is specified in
hw.acpi.remove_interface,
_OSI
query returns it is
not
supported. Multiple interfaces can be specified in a
comma-separated list and any leading white spaces will be ignored. For
example, "FreeBSD, Linux
" is a valid
list of two interfaces "FreeBSD
" and
"Linux
".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.acpi
enabled. "%s" is the name of the
link (e.g., LNKA). "%d" is the resource index when the link
supports multiple IRQs. Most PCI links only have one IRQ resource, so the
below form should be used.acpi
enabled. "%s" is the name of the link (e.g., LNKA).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
acad
bus
children
bus
”, except
that the ACPI namespace will still be scanned.cmbat
cpu
ec
isa
lid
mwait
Cx
sleep
states. Only query and use the generic I/O-based entrance method. The knob
is provided to work around inconsistencies in the tables filled by
firmware.quirks
pci
pci_link
sysresource
thermal
timer
video
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.
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
ACPI_HARDWARE
ACPI_EVENTS
ACPI_TABLES
ACPI_NAMESPACE
ACPI_PARSER
ACPI_DISPATCHER
ACPI_EXECUTER
ACPI_RESOURCES
ACPI_CA_DEBUGGER
ACPI_OS_SERVICES
ACPI_CA_DISASSEMBLER
ACPI_ALL_COMPONENTS
ACPI_AC_ADAPTER
ACPI_BATTERY
ACPI_BUS
ACPI_BUTTON
ACPI_EC
ACPI_FAN
ACPI_OEM
ACPI_POWER
ACPI_PROCESSOR
ACPI_THERMAL
ACPI_TIMER
ACPI_ALL_DRIVERS
The supported levels are:
ACPI_LV_INIT
ACPI_LV_DEBUG_OBJECT
ACPI_LV_INFO
ACPI_LV_REPAIR
ACPI_LV_ALL_EXCEPTIONS
ACPI_LV_PARSE
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
ACPI_LV_ALLOCATIONS
ACPI_LV_FUNCTIONS
ACPI_LV_OPTIMIZATIONS
ACPI_LV_VERBOSITY2
ACPI_LV_ALL
ACPI_LV_VERBOSITY2
"ACPI_LV_MUTEX
ACPI_LV_THREADS
ACPI_LV_IO
ACPI_LV_INTERRUPTS
ACPI_LV_VERBOSITY3
ACPI_LV_AML_DISASSEMBLE
ACPI_LV_VERBOSE_INFO
ACPI_LV_FULL_TABLES
ACPI_LV_EVENTS
ACPI_LV_VERBOSE
ACPI_LV_VERBOSITY3
"ACPI_LV_INIT_NAMES
ACPI_LV_LOAD
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.
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) and iasl(8) utilities and some ACPI knowledge.
ACPI is only found and supported on i386/ia32 and amd64.
kenv(1), acpi_thermal(4), device.hints(5), loader.conf(5), acpiconf(8), acpidump(8), config(8), iasl(8)
Compaq Computer Corporation, Intel Corporation, Microsoft Corporation, Phoenix Technologies Ltd., and Toshiba Corporation, Advanced Configuration and Power Interface Specification, http://acpi.info/spec.htm, August 25, 2003.
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>.
Many BIOS versions have serious bugs that may cause system
instability, break suspend/resume, or prevent devices from operating
properly due to IRQ routing problems. Upgrade your BIOS to the latest
version available from the vendor before deciding it is a problem with
acpi
.
May 9, 2015 | Debian |