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 Note that some variables will be available only if the given hardware supports
66 .Va hw.acpi.acline ) .
67 .Bl -tag -width indent
68 .It Va debug.acpi.enable_debug_objects
69 Enable dumping Debug objects without
70 .Cd "options ACPI_DEBUG" .
71 Default is 0, ignore Debug objects.
72 .It Va dev.cpu.N.cx_usage
73 Debugging information listing the percent of total usage for each sleep state.
74 The values are reset when
75 .Va dev.cpu.N.cx_lowest
77 .It Va dev.cpu.N.cx_lowest
78 Lowest Cx state to use for idling the CPU.
79 A scheduling algorithm will select states between
82 as system load dictates.
83 To enable ACPI CPU idling control,
88 .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 dev.cpu.N.cx_method
113 List of supported CPU idle states and their transition methods, as
114 directed by the firmware.
115 .It Va hw.acpi.acline
116 AC line state (1 means online, 0 means on battery power).
117 .It Va hw.acpi.disable_on_reboot
118 Disable ACPI during the reboot process.
119 Most systems reboot fine with ACPI still enabled, but some require
120 exiting to legacy mode first.
121 Default is 0, leave ACPI enabled.
122 .It Va hw.acpi.handle_reboot
123 Use the ACPI Reset Register capability to reboot the system.
124 Some newer systems require use of this register, while some only work
125 with legacy rebooting support.
126 .It Va hw.acpi.lid_switch_state
128 .Pq Li S1 Ns \[en] Ns Li S5
129 to enter when the lid switch (i.e., a notebook screen) is closed, or
134 .It Va hw.acpi.power_button_state
136 .Pq Li S1 Ns \[en] Ns Li S5
137 to enter when the power button is pressed, or
143 .It Va hw.acpi.reset_video
144 Reset the video adapter from real mode during the resume path.
145 Some systems need this help, others have display problems if it is enabled.
146 Default is 0 (disabled).
147 .It Va hw.acpi.s4bios
148 Indicate whether the system supports
150 This means that the BIOS can handle all the functions of suspending the
152 Otherwise, the OS is responsible for suspending to disk
154 Most current systems do not support
156 .It Va hw.acpi.sleep_button_state
158 .Pq Li S1 Ns \[en] Ns Li S5
159 to enter when the sleep button is pressed.
160 This is usually a special function button on the keyboard.
164 .It Va hw.acpi.sleep_delay
165 Wait this number of seconds between preparing the system to suspend and
166 actually entering the suspend state.
168 .It Va hw.acpi.supported_sleep_state
170 .Pq Li S1 Ns \[en] Ns Li S5
171 supported by the BIOS.
172 .Bl -tag -width indent
174 Quick suspend to RAM.
175 The CPU enters a lower power state, but most peripherals are left running.
177 Lower power state than
179 but with the same basic characteristics.
180 Not supported by many systems.
183 Most devices are powered off, and the system stops running except for
187 All devices are powered off, and the system stops running.
188 When resuming, the system starts as if from a cold power on.
195 System shuts down cleanly and powers off.
197 .It Va hw.acpi.verbose
198 Enable verbose printing from the various ACPI subsystems.
201 Tunables can be set at the
203 prompt before booting the kernel or stored in
204 .Pa /boot/loader.conf .
205 Many of these tunables also have a matching
207 entry for access after boot.
208 .Bl -tag -width indent
209 .It Va acpi_dsdt_load
210 Enables loading of a custom ACPI DSDT.
211 .It Va acpi_dsdt_name
212 Name of the DSDT table to load, if loading is enabled.
213 .It Va debug.acpi.cpu_unordered
214 Do not use the MADT to match ACPI Processor objects to CPUs.
215 This is needed on a few systems with a buggy BIOS that does not use
216 consistent processor IDs.
217 Default is 0 (disabled).
218 .It Va debug.acpi.disabled
219 Selectively disables portions of ACPI for debugging purposes.
220 .It Va debug.acpi.interpreter_slack
221 Enable less strict ACPI implementations.
222 Default is 1, ignore common BIOS mistakes.
223 .It Va debug.acpi.max_threads
224 Specify the number of task threads that are started on boot.
225 Limiting this to 1 may help work around various BIOSes that cannot
226 handle parallel requests.
227 The default value is 3.
228 .It Va debug.acpi.quirks
229 Override any automatic quirks completely.
230 .It Va debug.acpi.resume_beep
231 Beep the PC speaker on resume.
232 This can help diagnose suspend/resume problems.
233 Default is 0 (disabled).
234 .It Va hint.acpi.0.disabled
235 Set this to 1 to disable all of ACPI.
236 If ACPI has been disabled on your system due to a blacklist entry for your
237 BIOS, you can set this to 0 to re-enable ACPI for testing.
238 .It Va hw.acpi.ec.poll_timeout
239 Delay in milliseconds to wait for the EC to respond.
240 Try increasing this number if you get the error
241 .Qq Li AE_NO_HARDWARE_RESPONSE .
242 .It Va hw.acpi.host_mem_start
243 Override the assumed memory starting address for PCI host bridges.
244 .It Va hw.acpi.install_interface , hw.acpi.remove_interface
245 Install or remove OS interface(s) to control return value of
248 When an OS interface is specified in
249 .Va hw.acpi.install_interface ,
251 query for the interface returns it is
253 Conversely, when an OS interface is specified in
254 .Va hw.acpi.remove_interface ,
258 Multiple interfaces can be specified in a comma-separated list and
259 any leading white spaces will be ignored.
261 .Qq Li FreeBSD, Linux
262 is a valid list of two interfaces
266 .It Va hw.acpi.reset_video
267 Enables calling the VESA reset BIOS vector on the resume path.
268 This can fix some graphics cards that have problems such as LCD white-out
270 Default is 0 (disabled).
271 .It Va hw.acpi.serialize_methods
272 Allow override of whether methods execute in parallel or not.
273 Enable this for serial behavior, which fixes
274 .Qq Li AE_ALREADY_EXISTS
276 AML that really cannot handle parallel method execution.
277 It is off by default since this breaks recursive methods and some IBMs use
279 .It Va hw.acpi.verbose
280 Turn on verbose debugging information about what ACPI is doing.
281 .It Va hw.pci.link.%s.%d.irq
282 Override the interrupt to use for this link and index.
283 This capability should be used carefully, and only if a device is not
288 is the name of the link (e.g., LNKA).
290 is the resource index when the link supports multiple IRQs.
291 Most PCI links only have one IRQ resource, so the below form should be used.
292 .It Va hw.pci.link.%s.irq
293 Override the interrupt to use.
294 This capability should be used carefully, and only if a device is not
299 is the name of the link (e.g., LNKA).
302 Since ACPI support on different platforms varies greatly, there are many
303 debugging and tuning options available.
305 For machines known not to work with
307 enabled, there is a BIOS blacklist.
308 Currently, the blacklist only controls whether
310 should be disabled or not.
311 In the future, it will have more granularity to control features (the
312 infrastructure for that is already there).
316 (for debugging purposes, etc.) on machines that are on the blacklist, set the
317 kernel environment variable
318 .Va hint.acpi.0.disabled
320 Before trying this, consider updating your BIOS to a more recent version that
321 may be compatible with ACPI.
325 driver completely, set the kernel environment variable
326 .Va hint.acpi.0.disabled
329 Some i386 machines totally fail to operate with some or all of ACPI disabled.
330 Other i386 machines fail with ACPI enabled.
331 Disabling all or part of ACPI on non-i386 platforms (i.e., platforms where
332 ACPI support is mandatory) may result in a non-functional system.
336 driver comprises a set of drivers, which may be selectively disabled
338 To disable a sub-driver, list it in the kernel
340 .Va debug.acpi.disabled .
341 Multiple entries can be listed, separated by a space.
343 ACPI sub-devices and features that can be disabled:
344 .Bl -tag -width ".Li sysresource"
346 Disable all ACPI features and devices.
352 Probes and attaches subdevices.
353 Disabling will avoid scanning the ACPI namespace entirely.
356 Attaches standard ACPI sub-drivers and devices enumerated in the
358 Disabling this has a similar effect to disabling
361 ACPI namespace will still be scanned.
364 Supports ACPI button devices (typically power and sleep buttons).
367 Control-method batteries device.
370 Supports CPU power-saving and speed-setting functions.
373 Supports the ACPI Embedded Controller interface, used to communicate
374 with embedded platform controllers.
377 Supports an ISA bus bridge defined in the ACPI namespace,
378 typically as a child of a PCI bus.
381 Supports an ACPI laptop lid switch, which typically puts a
385 Do not ask firmware for available x86-vendor specific methods to enter
388 Only query and use the generic I/O-based entrance method.
389 The knob is provided to work around inconsistencies in the tables
394 Quirks automatically disable ACPI functionality based on the XSDT table's
395 OEM vendor name and revision date.
398 Supports Host to PCI bridges.
401 Performs PCI interrupt routing.
404 Pseudo-devices containing resources which ACPI claims.
407 Supports system cooling and heat management.
410 Implements a timecounter using the ACPI fixed-frequency timer.
415 which may conflict with
420 It is also possible to avoid portions of the ACPI namespace which
421 may be causing problems, by listing the full path of the root of
422 the region to be avoided in the kernel environment variable
423 .Va debug.acpi.avoid .
424 The object and all of its children will be ignored during the
425 bus/children scan of the namespace.
426 The ACPI CA code will still know about the avoided region.
428 To enable debugging output,
430 must be compiled with
431 .Cd "options ACPI_DEBUG" .
432 Debugging output is separated between layers and levels, where a layer is
433 a component of the ACPI subsystem, and a level is a particular kind
436 Both layers and levels are specified as a whitespace-separated list of
437 tokens, with layers listed in
440 .Va debug.acpi.level .
442 The first set of layers is for ACPI-CA components, and the second is for
445 The ACPI-CA layer descriptions include the prefix for the files they
447 The supported layers are:
449 .Bl -tag -compact -width ".Li ACPI_CA_DISASSEMBLER"
450 .It Li ACPI_UTILITIES
451 Utility ("ut") functions
453 Hardware access ("hw")
458 .It Li ACPI_NAMESPACE
459 Namespace evaluation ("ns")
462 .It Li ACPI_DISPATCHER
463 Internal representation of interpreter state ("ds")
465 Execute AML methods ("ex")
466 .It Li ACPI_RESOURCES
467 Resource parsing ("rs")
468 .It Li ACPI_CA_DEBUGGER
469 Debugger implementation ("db", "dm")
470 .It Li ACPI_OS_SERVICES
471 Usermode support routines ("os")
472 .It Li ACPI_CA_DISASSEMBLER
473 Disassembler implementation (unused)
474 .It Li ACPI_ALL_COMPONENTS
475 All the above ACPI-CA components
476 .It Li ACPI_AC_ADAPTER
479 Control-method battery driver
481 ACPI, ISA, and PCI bus drivers
483 Power and sleep button driver
485 Embedded controller driver
489 Platform-specific driver for hotkeys, LED, etc.
491 Power resource driver
492 .It Li ACPI_PROCESSOR
498 .It Li ACPI_ALL_DRIVERS
504 The supported levels are:
506 .Bl -tag -compact -width ".Li ACPI_LV_AML_DISASSEMBLE"
508 Initialization progress
509 .It Li ACPI_LV_DEBUG_OBJECT
512 General information and progress
513 .It Li ACPI_LV_REPAIR
514 Repair a common problem with predefined methods
515 .It Li ACPI_LV_ALL_EXCEPTIONS
516 All the previous levels
518 .It Li ACPI_LV_DISPATCH
521 .It Li ACPI_LV_OPREGION
522 .It Li ACPI_LV_BFIELD
523 .It Li ACPI_LV_TABLES
524 .It Li ACPI_LV_VALUES
525 .It Li ACPI_LV_OBJECTS
526 .It Li ACPI_LV_RESOURCES
527 .It Li ACPI_LV_USER_REQUESTS
528 .It Li ACPI_LV_PACKAGE
529 .It Li ACPI_LV_VERBOSITY1
530 All the previous levels
531 .It Li ACPI_LV_ALLOCATIONS
532 .It Li ACPI_LV_FUNCTIONS
533 .It Li ACPI_LV_OPTIMIZATIONS
534 .It Li ACPI_LV_VERBOSITY2
535 All the previous levels
538 .Qq Li ACPI_LV_VERBOSITY2
540 .It Li ACPI_LV_THREADS
542 .It Li ACPI_LV_INTERRUPTS
543 .It Li ACPI_LV_VERBOSITY3
544 All the previous levels
545 .It Li ACPI_LV_AML_DISASSEMBLE
546 .It Li ACPI_LV_VERBOSE_INFO
547 .It Li ACPI_LV_FULL_TABLES
548 .It Li ACPI_LV_EVENTS
549 .It Li ACPI_LV_VERBOSE
551 .Qq Li ACPI_LV_VERBOSITY3
552 .It Li ACPI_LV_INIT_NAMES
556 Selection of the appropriate layer and level values is important
557 to avoid massive amounts of debugging output.
558 For example, the following configuration is a good way to gather initial
560 It enables debug output for both ACPI-CA and the
562 driver, printing basic information about errors, warnings, and progress.
563 .Bd -literal -offset indent
564 debug.acpi.layer="ACPI_ALL_COMPONENTS ACPI_ALL_DRIVERS"
565 debug.acpi.level="ACPI_LV_ALL_EXCEPTIONS"
568 Debugging output by the ACPI CA subsystem is prefixed with the
569 module name in lowercase, followed by a source line number.
572 code follows the same format, but
573 the module name is uppercased.
574 .Sh OVERRIDING YOUR BIOS BYTECODE
575 ACPI interprets bytecode named AML
576 (ACPI Machine Language)
577 provided by the BIOS vendor as a memory image at boot time.
578 Sometimes, the AML code contains a bug that does not appear when parsed
579 by the Microsoft implementation.
581 provides a way to override it with your own AML code to work around
582 or debug such problems.
583 Note that all AML in your DSDT and any SSDT tables is overridden.
585 In order to load your AML code, you must edit
586 .Pa /boot/loader.conf
587 and include the following lines.
588 .Bd -literal -offset indent
590 acpi_dsdt_name="/boot/acpi_dsdt.aml" # You may change this name.
593 In order to prepare your AML code, you will need the
597 utilities and some ACPI knowledge.
599 ACPI is only found and supported on i386/ia32 and amd64.
610 .%A "Compaq Computer Corporation"
611 .%A "Intel Corporation"
612 .%A "Microsoft Corporation"
613 .%A "Phoenix Technologies Ltd."
614 .%A "Toshiba Corporation"
616 .%T "Advanced Configuration and Power Interface Specification"
617 .%U http://acpi.info/spec.htm
621 The ACPI CA subsystem is developed and maintained by
622 Intel Architecture Labs.
624 The following people made notable contributions to the ACPI subsystem
628 .An Takanori Watanabe Aq Mt takawata@jp.FreeBSD.org ,
629 .An Mitsuru IWASAKI Aq Mt iwasaki@jp.FreeBSD.org ,
630 .An Munehiro Matsuda ,
632 the ACPI-jp mailing list at
633 .Aq Mt acpi-jp@jp.FreeBSD.org ,
634 and many other contributors.
636 This manual page was written by
637 .An Michael Smith Aq Mt msmith@FreeBSD.org .
639 Many BIOS versions have serious bugs that may cause system instability,
640 break suspend/resume, or prevent devices from operating properly due to
641 IRQ routing problems.
642 Upgrade your BIOS to the latest version available from the vendor before
643 deciding it is a problem with