2 .\" Copyright (c) 2001 Michael Smith
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .Nd Advanced Configuration and Power Management support
37 .Cd "options ACPI_DEBUG"
42 driver provides support for the Intel/Microsoft/Compaq/Toshiba ACPI
44 This support includes platform hardware discovery (superseding the
45 PnP and PCI BIOS), as well as power management (superseding APM) and
47 ACPI core support is provided by the ACPI CA reference implementation
52 driver is automatically loaded by the
55 compiled into the kernel on platforms where ACPI is mandatory.
59 driver is intended to provide power management without user intervention.
60 If the default settings are not optimal, the following sysctls can be
61 used to modify or monitor
64 .Bl -tag -width indent
65 .It Va debug.acpi.enable_debug_objects
66 Enable dumping Debug objects without
67 .Cd "options ACPI_DEBUG" .
68 Default is 0, ignore Debug objects.
70 AC line state (1 means online, 0 means on battery power).
71 .It Va hw.acpi.cpu.cx_usage
72 Debugging information listing the percent of total usage for each sleep state.
73 The values are reset when
74 .Va hw.acpi.cpu.cx_lowest
76 .It Va hw.acpi.cpu.cx_lowest
77 Lowest Cx state to use for idling the CPU.
78 A scheduling algorithm will select states between
81 as system load dictates.
82 To enable ACPI CPU idling control,
87 .Va machdep.idle_available
89 .It Va hw.acpi.cpu.cx_supported
90 List of supported CPU idle states and their transition latency
92 Each state has a type (e.g.,
95 is equivalent to the ia32
100 sleep with the same semantics, and
102 provides the deepest sleep
103 but additionally requires bus mastering to be disabled.
106 provide even more power savings with the same
110 Deeper sleeps provide more power savings but increased transition
111 latency when an interrupt occurs.
112 .It Va hw.acpi.disable_on_reboot
113 Disable ACPI during the reboot process.
114 Most systems reboot fine with ACPI still enabled, but some require
115 exiting to legacy mode first.
116 Default is 0, leave ACPI enabled.
117 .It Va hw.acpi.handle_reboot
118 Use the ACPI Reset Register capability to reboot the system.
119 Some newer systems require use of this register, while some only work
120 with legacy rebooting support.
121 .It Va hw.acpi.lid_switch_state
123 .Pq Li S1 Ns \[en] Ns Li S5
124 to enter when the lid switch (i.e., a notebook screen) is closed.
128 .It Va hw.acpi.power_button_state
130 .Pq Li S1 Ns \[en] Ns Li S5
131 to enter when the power button is pressed.
135 .It Va hw.acpi.reset_video
136 Reset the video adapter from real mode during the resume path.
137 Some systems need this help, others have display problems if it is enabled.
138 Default is 0 (disabled).
139 .It Va hw.acpi.s4bios
140 Indicate whether the system supports
142 This means that the BIOS can handle all the functions of suspending the
144 Otherwise, the OS is responsible for suspending to disk
146 Most current systems do not support
148 .It Va hw.acpi.sleep_button_state
150 .Pq Li S1 Ns \[en] Ns Li S5
151 to enter when the sleep button is pressed.
152 This is usually a special function button on the keyboard.
156 .It Va hw.acpi.sleep_delay
157 Wait this number of seconds between preparing the system to suspend and
158 actually entering the suspend state.
160 .It Va hw.acpi.supported_sleep_state
162 .Pq Li S1 Ns \[en] Ns Li S5
163 supported by the BIOS.
164 .Bl -tag -width indent
166 Quick suspend to RAM.
167 The CPU enters a lower power state, but most peripherals are left running.
169 Lower power state than
171 but with the same basic characteristics.
172 Not supported by many systems.
175 Most devices are powered off, and the system stops running except for
179 All devices are powered off, and the system stops running.
180 When resuming, the system starts as if from a cold power on.
187 System shuts down cleanly and powers off.
189 .It Va hw.acpi.verbose
190 Enable verbose printing from the various ACPI subsystems.
193 Tunables can be set at the
195 prompt before booting the kernel or stored in
196 .Pa /boot/loader.conf .
197 Many of these tunables also have a matching
199 entry for access after boot.
200 .Bl -tag -width indent
201 .It Va acpi_dsdt_load
202 Enables loading of a custom ACPI DSDT.
203 .It Va acpi_dsdt_name
204 Name of the DSDT table to load, if loading is enabled.
205 .It Va debug.acpi.cpu_unordered
206 Do not use the MADT to match ACPI Processor objects to CPUs.
207 This is needed on a few systems with a buggy BIOS that does not use
208 consistent processor IDs.
209 Default is 0 (disabled).
210 .It Va debug.acpi.disabled
211 Selectively disables portions of ACPI for debugging purposes.
212 .It Va debug.acpi.interpreter_slack
213 Enable less strict ACPI implementations.
214 Default is 1, ignore common BIOS mistakes.
215 .It Va debug.acpi.max_threads
216 Specify the number of task threads that are started on boot.
217 Limiting this to 1 may help work around various BIOSes that cannot
218 handle parallel requests.
219 The default value is 3.
220 .It Va debug.acpi.quirks
221 Override any automatic quirks completely.
222 .It Va debug.acpi.resume_beep
223 Beep the PC speaker on resume.
224 This can help diagnose suspend/resume problems.
225 Default is 0 (disabled).
226 .It Va hint.acpi.0.disabled
227 Set this to 1 to disable all of ACPI.
228 If ACPI has been disabled on your system due to a blacklist entry for your
229 BIOS, you can set this to 0 to re-enable ACPI for testing.
230 .It Va hw.acpi.ec.poll_timeout
231 Delay in milliseconds to wait for the EC to respond.
232 Try increasing this number if you get the error
233 .Qq Li AE_NO_HARDWARE_RESPONSE .
234 .It Va hw.acpi.host_mem_start
235 Override the assumed memory starting address for PCI host bridges.
236 .It Va hw.acpi.install_interface , hw.acpi.remove_interface
237 Install or remove OS interface(s) to control return value of
239 query method. When an OS interface is specified in
240 .Va hw.acpi.install_interface ,
242 query for the interface returns it is
244 Conversely, when an OS interface is specified in
245 .Va hw.acpi.remove_interface ,
249 Multiple interfaces can be specified in a comma-separated list and
250 any leading white spaces will be ignored. For example,
251 .Qq Li FreeBSD, Linux
252 is a valid list of two interfaces
256 .It Va hw.acpi.reset_video
257 Enables calling the VESA reset BIOS vector on the resume path.
258 This can fix some graphics cards that have problems such as LCD white-out
260 Default is 0 (disabled).
261 .It Va hw.acpi.serialize_methods
262 Allow override of whether methods execute in parallel or not.
263 Enable this for serial behavior, which fixes
264 .Qq Li AE_ALREADY_EXISTS
266 AML that really cannot handle parallel method execution.
267 It is off by default since this breaks recursive methods and some IBMs use
269 .It Va hw.acpi.verbose
270 Turn on verbose debugging information about what ACPI is doing.
271 .It Va hw.pci.link.%s.%d.irq
272 Override the interrupt to use for this link and index.
273 This capability should be used carefully, and only if a device is not
278 is the name of the link (e.g., LNKA).
280 is the resource index when the link supports multiple IRQs.
281 Most PCI links only have one IRQ resource, so the below form should be used.
282 .It Va hw.pci.link.%s.irq
283 Override the interrupt to use.
284 This capability should be used carefully, and only if a device is not
289 is the name of the link (e.g., LNKA).
292 Since ACPI support on different platforms varies greatly, there are many
293 debugging and tuning options available.
295 For machines known not to work with
297 enabled, there is a BIOS blacklist.
298 Currently, the blacklist only controls whether
300 should be disabled or not.
301 In the future, it will have more granularity to control features (the
302 infrastructure for that is already there).
306 (for debugging purposes, etc.) on machines that are on the blacklist, set the
307 kernel environment variable
308 .Va hint.acpi.0.disabled
310 Before trying this, consider updating your BIOS to a more recent version that
311 may be compatible with ACPI.
315 driver completely, set the kernel environment variable
316 .Va hint.acpi.0.disabled
319 Some i386 machines totally fail to operate with some or all of ACPI disabled.
320 Other i386 machines fail with ACPI enabled.
321 Disabling all or part of ACPI on non-i386 platforms (i.e., platforms where
322 ACPI support is mandatory) may result in a non-functional system.
326 driver comprises a set of drivers, which may be selectively disabled
328 To disable a sub-driver, list it in the kernel
330 .Va debug.acpi.disabled .
331 Multiple entries can be listed, separated by a space.
333 ACPI sub-devices and features that can be disabled:
334 .Bl -tag -width ".Li sysresource"
336 Disable all ACPI features and devices.
342 Probes and attaches subdevices.
343 Disabling will avoid scanning the ACPI namespace entirely.
346 Attaches standard ACPI sub-drivers and devices enumerated in the
348 Disabling this has a similar effect to disabling
351 ACPI namespace will still be scanned.
354 Supports ACPI button devices (typically power and sleep buttons).
357 Control-method batteries device.
360 Supports CPU power-saving and speed-setting functions.
363 Supports the ACPI Embedded Controller interface, used to communicate
364 with embedded platform controllers.
367 Supports an ISA bus bridge defined in the ACPI namespace,
368 typically as a child of a PCI bus.
371 Supports an ACPI laptop lid switch, which typically puts a
376 Quirks automatically disable ACPI functionality based on the XSDT table's
377 OEM vendor name and revision date.
380 Supports Host to PCI bridges.
383 Performs PCI interrupt routing.
386 Pseudo-devices containing resources which ACPI claims.
389 Supports system cooling and heat management.
392 Implements a timecounter using the ACPI fixed-frequency timer.
397 which may conflict with
402 It is also possible to avoid portions of the ACPI namespace which
403 may be causing problems, by listing the full path of the root of
404 the region to be avoided in the kernel environment variable
405 .Va debug.acpi.avoid .
406 The object and all of its children will be ignored during the
407 bus/children scan of the namespace.
408 The ACPI CA code will still know about the avoided region.
410 To enable debugging output,
412 must be compiled with
413 .Cd "options ACPI_DEBUG" .
414 Debugging output is separated between layers and levels, where a layer is
415 a component of the ACPI subsystem, and a level is a particular kind
418 Both layers and levels are specified as a whitespace-separated list of
419 tokens, with layers listed in
422 .Va debug.acpi.level .
424 The first set of layers is for ACPI-CA components, and the second is for
427 The ACPI-CA layer descriptions include the prefix for the files they
429 The supported layers are:
431 .Bl -tag -compact -width ".Li ACPI_CA_DISASSEMBLER"
432 .It Li ACPI_UTILITIES
433 Utility ("ut") functions
435 Hardware access ("hw")
440 .It Li ACPI_NAMESPACE
441 Namespace evaluation ("ns")
444 .It Li ACPI_DISPATCHER
445 Internal representation of interpreter state ("ds")
447 Execute AML methods ("ex")
448 .It Li ACPI_RESOURCES
449 Resource parsing ("rs")
450 .It Li ACPI_CA_DEBUGGER
451 Debugger implementation ("db", "dm")
452 .It Li ACPI_OS_SERVICES
453 Usermode support routines ("os")
454 .It Li ACPI_CA_DISASSEMBLER
455 Disassembler implementation (unused)
456 .It Li ACPI_ALL_COMPONENTS
457 All the above ACPI-CA components
458 .It Li ACPI_AC_ADAPTER
461 Control-method battery driver
463 ACPI, ISA, and PCI bus drivers
465 Power and sleep button driver
467 Embedded controller driver
471 Platform-specific driver for hotkeys, LED, etc.
473 Power resource driver
474 .It Li ACPI_PROCESSOR
480 .It Li ACPI_ALL_DRIVERS
486 The supported levels are:
488 .Bl -tag -compact -width ".Li ACPI_LV_AML_DISASSEMBLE"
490 Initialization progress
491 .It Li ACPI_LV_DEBUG_OBJECT
494 General information and progress
495 .It Li ACPI_LV_REPAIR
496 Repair a common problem with predefined methods
497 .It Li ACPI_LV_ALL_EXCEPTIONS
498 All the previous levels
500 .It Li ACPI_LV_DISPATCH
503 .It Li ACPI_LV_OPREGION
504 .It Li ACPI_LV_BFIELD
505 .It Li ACPI_LV_TABLES
506 .It Li ACPI_LV_VALUES
507 .It Li ACPI_LV_OBJECTS
508 .It Li ACPI_LV_RESOURCES
509 .It Li ACPI_LV_USER_REQUESTS
510 .It Li ACPI_LV_PACKAGE
511 .It Li ACPI_LV_VERBOSITY1
512 All the previous levels
513 .It Li ACPI_LV_ALLOCATIONS
514 .It Li ACPI_LV_FUNCTIONS
515 .It Li ACPI_LV_OPTIMIZATIONS
516 .It Li ACPI_LV_VERBOSITY2
517 All the previous levels
520 .Qq Li ACPI_LV_VERBOSITY2
522 .It Li ACPI_LV_THREADS
524 .It Li ACPI_LV_INTERRUPTS
525 .It Li ACPI_LV_VERBOSITY3
526 All the previous levels
527 .It Li ACPI_LV_AML_DISASSEMBLE
528 .It Li ACPI_LV_VERBOSE_INFO
529 .It Li ACPI_LV_FULL_TABLES
530 .It Li ACPI_LV_EVENTS
531 .It Li ACPI_LV_VERBOSE
533 .Qq Li ACPI_LV_VERBOSITY3
534 .It Li ACPI_LV_INIT_NAMES
538 Selection of the appropriate layer and level values is important
539 to avoid massive amounts of debugging output.
540 For example, the following configuration is a good way to gather initial
542 It enables debug output for both ACPI-CA and the
544 driver, printing basic information about errors, warnings, and progress.
545 .Bd -literal -offset indent
546 debug.acpi.layer="ACPI_ALL_COMPONENTS ACPI_ALL_DRIVERS"
547 debug.acpi.level="ACPI_LV_ALL_EXCEPTIONS"
550 Debugging output by the ACPI CA subsystem is prefixed with the
551 module name in lowercase, followed by a source line number.
554 code follows the same format, but
555 the module name is uppercased.
556 .Sh OVERRIDING YOUR BIOS BYTECODE
557 ACPI interprets bytecode named AML
558 (ACPI Machine Language)
559 provided by the BIOS vendor as a memory image at boot time.
560 Sometimes, the AML code contains a bug that does not appear when parsed
561 by the Microsoft implementation.
563 provides a way to override it with your own AML code to work around
564 or debug such problems.
565 Note that all AML in your DSDT and any SSDT tables is overridden.
567 In order to load your AML code, you must edit
568 .Pa /boot/loader.conf
569 and include the following lines.
570 .Bd -literal -offset indent
572 acpi_dsdt_name="/boot/acpi_dsdt.aml" # You may change this name.
575 In order to prepare your AML code, you will need the
579 utilities and some ACPI knowledge.
581 ACPI is only found and supported on i386/ia32, ia64, and amd64.
592 .%A "Compaq Computer Corporation"
593 .%A "Intel Corporation"
594 .%A "Microsoft Corporation"
595 .%A "Phoenix Technologies Ltd."
596 .%A "Toshiba Corporation"
598 .%T "Advanced Configuration and Power Interface Specification"
599 .%U http://acpi.info/spec.htm
603 The ACPI CA subsystem is developed and maintained by
604 Intel Architecture Labs.
606 The following people made notable contributions to the ACPI subsystem
610 .An Takanori Watanabe Aq takawata@jp.FreeBSD.org ,
611 .An Mitsuru IWASAKI Aq iwasaki@jp.FreeBSD.org ,
612 .An Munehiro Matsuda ,
614 the ACPI-jp mailing list at
615 .Aq acpi-jp@jp.FreeBSD.org ,
616 and many other contributors.
618 This manual page was written by
619 .An Michael Smith Aq msmith@FreeBSD.org .
621 Many BIOS versions have serious bugs that may cause system instability,
622 break suspend/resume, or prevent devices from operating properly due to
623 IRQ routing problems.
624 Upgrade your BIOS to the latest version available from the vendor before
625 deciding it is a problem with
630 CPU idle power management drive conflicts with the local APIC (LAPIC)
632 Disable the local APIC timer with
633 .Va hint.apic.0.clock=0
636 and deeper states if the local APIC timer is enabled.