ACPI(4)
straight outta the Kernel Interfaces Manual, section 4, no cap π
πΈ NAME πΈ
acpi β Advanced Configuration and Power Management support
β¨ SYNOPSIS β¨
device acpi
options ACPI_DEBUG
options DDB
π DESCRIPTION π
okay so bestie, the acpi driver is literally the whole vibe behind the Intel/Microsoft/Compaq/Toshiba ACPI standard. it's giving main character energy for your whole machine, fr fr.
what does it actually do? two big things and then some:
- platform hardware discovery β and yes, it supersedes the
PnPandPCI BIOSera of doing that π - power management β and it supersedes
APM, iconic behavior honestly - plus other features, because it contains multitudes β¨
the ACPI core support itself? that's provided by the ACPI CA reference implementation from Intel. king behavior π
heads up bestie: theacpidriver is automatically loaded by theloader(8), so you should only compile it into the kernel on platforms where ACPI is mandatory. don't be out here compiling it in for fun, that's not the move π«Ά
π SYSCTL VARIABLES π
so the whole point of the acpi driver is to give you power management without user intervention β it just handles it, no notes π
. but if the default settings aren't optimal for your setup, these sysctls let you modify or monitor acpi behavior.
important: some of these variables will only show up if your hardware actually supports them (like hw.acpi.acline). if it's not there, your hardware just said "no" π
debug.acpi.enable_debug_objectsβ lets you dump Debug objects without havingoptions ACPI_DEBUGcompiled in. Default is0, which means ignore Debug objects.dev.cpu.N.cx_usageβ debugging info that lists the percent of total usage for each sleep state. the values get reset wheneverdev.cpu.N.cx_lowestis modified, so don't be confused when they zero out πdev.cpu.N.cx_lowestβ the lowest Cx state to use for idling the CPU. a scheduling algorithm picks states betweenC1and this setting as system load dictates. to enable ACPI CPU idling control, setmachdep.idletoacpiβ but only if it's listed inmachdep.idle_available. check first bestie π«Άhw.acpi.cpu.cx_supportedβ the list of supported CPU idle states plus their transition latency in microseconds. each state has a type (e.g.,C2). the lore:C1is equivalent to the ia32 HLT instructionC2provides a deeper sleep with the same semanticsC3provides the deepest sleep, but additionally requires bus mastering to be disabled- states greater than
C3provide even more power savings with the same semantics as theC3state
and the tradeoff, because of course there's a tradeoff π: deeper sleeps give you more power savings but increased transition latency when an interrupt occurs.
dev.cpu.N.cx_methodβ the list of supported CPU idle states and their transition methods, as directed by the firmware.hw.acpi.aclineβ the AC line state.1means online,0means on battery power. simple as πhw.acpi.disable_on_rebootβ disables ACPI during the reboot process. most systems reboot fine with ACPI still enabled, but some require exiting to legacy mode first. default is0, leave ACPI enabled.hw.acpi.handle_rebootβ use the ACPI Reset Register capability to reboot the system. some newer systems require use of this register, while some only work with legacy rebooting support. hardware is messy, iykyk πhw.acpi.lid_switch_stateβ the suspend state (S1βS5) to enter when the lid switch (i.e., a notebook screen) is closed. default is"NONE"(do nothing).hw.acpi.power_button_stateβ the suspend state (S1βS5) to enter when the power button is pressed. default isS5(power-off nicely). polite πhw.acpi.reset_videoβ reset the video adapter from real mode during the resume path. some systems need this help, others have display problems if it's enabled. default is0(disabled).hw.acpi.s4biosβ indicates whether the system supports S4BIOS. that means 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. not the vibe for most of y'all πhw.acpi.sleep_button_stateβ the suspend state (S1βS5) to enter when the sleep button is pressed. this is usually a special function button on the keyboard. default isS3(suspend-to-RAM).hw.acpi.sleep_delayβ wait this number of seconds between preparing the system to suspend and actually entering the suspend state. default is1second.hw.acpi.supported_sleep_stateβ the suspend states (S1βS5) supported by the BIOS. here's the full breakdown, get comfy:S1β quick suspend to RAM. the CPU enters a lower power state, but most peripherals are left running.S2β lower power state thanS1, but with the same basic characteristics. not supported by many systems.S3β suspend to RAM. most devices are powered off, and the system stops running except for memory refresh.S4β suspend to disk. all devices are powered off, and the system stops running. when resuming, the system starts as if from a cold power on. not yet supported by FreeBSD unless S4BIOS is available.S5β system shuts down cleanly and powers off. the classic goodbye π«‘
hw.acpi.verboseβ enable verbose printing from the various ACPI subsystems. chatty mode, activated β¨
π LOADER TUNABLES π
you can set these tunables at the loader(8) prompt before booting the kernel, or store them in /boot/loader.conf. and the bestie bonus: many of these also have a matching sysctl(8) entry so you can poke at them after boot too π
acpi_dsdt_loadβ enables loading of a custom ACPI DSDT.acpi_dsdt_nameβ the name of the DSDT table to load, if loading is enabled.debug.acpi.cpu_unorderedβ do not use the MADT to match ACPI Processor objects to CPUs. this is needed on a few systems with a buggy BIOS that does not use consistent processor IDs. default is0(disabled).debug.acpi.disabledβ selectively disables portions of ACPI for debugging purposes.debug.acpi.interpreter_slackβ enable less strict ACPI implementations. default is1, ignore common BIOS mistakes. generous of us honestly π«Άdebug.acpi.max_threadsβ specify the number of task threads that are started on boot. limiting this to1may help work around various BIOSes that cannot handle parallel requests. the default value is3.debug.acpi.quirksβ override any automatic quirks completely.debug.acpi.resume_beepβ beep the PC speaker on resume. this can help diagnose suspend/resume problems. default is0(disabled).hint.acpi.0.disabledβ set this to1to disable all of ACPI. and if ACPI has been disabled on your system due to a blacklist entry for your BIOS, you can set this to0to re-enable ACPI for testing. sneaky little workaround, we love it π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.install_interface,hw.acpi.remove_interfaceβ install or remove OS interface(s) to control the return value of theβ_OSIβquery method. when an OS interface is specified inhw.acpi.install_interface, the_OSIquery for that interface returns that it is supported. conversely, when an OS interface is specified inhw.acpi.remove_interface, the_OSIquery returns that 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". slay πhw.acpi.reset_videoβ enables calling the VESA reset BIOS vector on the resume path. this can fix some graphics cards that have problems such as LCD white-out after resume. default is0(disabled).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. yeah, that's a real warning, don't just flip it on πhw.acpi.verboseβ turn on verbose debugging information about what ACPI is doing.hw.pci.link.%s.%d.irqβ override the interrupt to use for this link and index. this capability should be used carefully, and only if a device is not working withacpienabled."%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.hw.pci.link.%s.irqβ override the interrupt to use. this capability should be used carefully, and only if a device is not working withacpienabled."%s"is the name of the link (e.g.,LNKA).
π« DISABLING ACPI π«
Okay bestie, real talk: ACPI support is wildly different from platform to platform, so of course there are a ton of debugging and tuning options available. Not me being surprised, it's giving "of course she has options" π
For machines that are known to just not work with acpi enabled, there's a BIOS blacklist. Currently, the blacklist only controls whether acpi should be disabled or not. In the future, it's gonna have more granularity to control features (the infrastructure for that is already there, she's just waiting for her moment β¨).
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. But before you try this, consider updating your BIOS to a more recent version that may be compatible with ACPI. Fr fr, try that first π
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. And 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. Not me warning you, this is serious π
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.mwaitβ (feature) Do not ask firmware for available x86-vendor specific methods to enter 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β (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) Supportsacpi_video(4)which may conflict withagp(4)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. So like, it's ghosted by the bus but still exists in the group chat π
π 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. Two axes, both iconic π
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") functionsACPI_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 componentsACPI_AC_ADAPTERβ AC adapter driverACPI_BATTERYβ Control-method battery driverACPI_BUSβ ACPI, ISA, and PCI bus driversACPI_BUTTONβ Power and sleep button driverACPI_ECβ Embedded controller driverACPI_FANβ Fan driverACPI_OEMβ Platform-specific driver for hotkeys, LED, etc.ACPI_POWERβ Power resource driverACPI_PROCESSORβ CPU driverACPI_THERMALβ Thermal zone driverACPI_TIMERβ Timer driverACPI_ALL_DRIVERSβ All the above FreeBSD ACPI drivers
The supported levels are:
ACPI_LV_INITβ Initialization progressACPI_LV_DEBUG_OBJECTβ Stores to objectsACPI_LV_INFOβ General information and progressACPI_LV_REPAIRβ Repair a common problem with predefined methodsACPI_LV_ALL_EXCEPTIONSβ All the previous levelsACPI_LV_PARSEACPI_LV_DISPATCHACPI_LV_EXECACPI_LV_NAMESACPI_LV_OPREGIONACPI_LV_BFIELDACPI_LV_TABLESACPI_LV_VALUESACPI_LV_OBJECTSACPI_LV_RESOURCESACPI_LV_USER_REQUESTSACPI_LV_PACKAGEACPI_LV_VERBOSITY1β All the previous levelsACPI_LV_ALLOCATIONSACPI_LV_FUNCTIONSACPI_LV_OPTIMIZATIONSACPI_LV_VERBOSITY2β All the previous levelsACPI_LV_ALLβ Synonym for "ACPI_LV_VERBOSITY2"ACPI_LV_MUTEXACPI_LV_THREADSACPI_LV_IOACPI_LV_INTERRUPTSACPI_LV_VERBOSITY3β All the previous levelsACPI_LV_AML_DISASSEMBLEACPI_LV_VERBOSE_INFOACPI_LV_FULL_TABLESACPI_LV_EVENTSACPI_LV_VERBOSEβ All levels after "ACPI_LV_VERBOSITY3"ACPI_LV_INIT_NAMESACPI_LV_LOAD
Selection of the appropriate layer and level values is important to avoid massive amounts of debugging output. Like bestie, you will be flooded. 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. lowercase = CA subsystem, UPPERCASE = FreeBSD local, that's the tell π
π 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) and iasl(8) utilities and some ACPI knowledge. Skill issue check: if you don't have the knowledge, go get it first π
π«Ά COMPATIBILITY π«Ά
ACPI is only found and supported on i386/ia32 and amd64. That's the whole list, she's exclusive π
π SEE ALSO π
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.
π 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. Legends, every single one π
This manual page was written by Michael Smith <msmith@FreeBSD.org>.
π BUGS π
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. Not me blaming the BIOS but likeβ¦ it's the BIOS π«
And that's the whole page bestie, we ate and left no crumbs β¨ This one came from the Debian folks, dated May 9, 2015 β vintage but still serving, mwah π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2001 Michael Smith
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms