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
26 .\" $FreeBSD: src/share/man/man4/acpi.4,v 1.61.8.1 2009/04/15 03:14:26 kensmith Exp $
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
66 AC line state (1 means online, 0 means on battery power).
67 .It Va hw.acpi.cpu.cx_usage
68 Debugging information listing the percent of total usage for each sleep state.
69 The values are reset when
70 .Va hw.acpi.cpu.cx_lowest
72 .It Va hw.acpi.cpu.cx_lowest
73 Lowest Cx state to use for idling the CPU.
74 A scheduling algorithm will select states between
77 as system load dictates.
78 To enable ACPI CPU idling control,
79 .Va machdep.cpu_idle_hlt
80 must be set to 2 (the default value).
81 .It Va hw.acpi.cpu.cx_supported
82 List of supported CPU idle states and their transition latency
84 Each state has a type (e.g.,
87 is equivalent to the ia32
92 sleep with the same semantics, and
94 provides the deepest sleep
95 but additionally requires bus mastering to be disabled.
98 provide even more power savings with the same
102 Deeper sleeps provide more power savings but increased transition
103 latency when an interrupt occurs.
104 .It Va hw.acpi.disable_on_reboot
105 Disable ACPI during the reboot process.
106 Most systems reboot fine with ACPI still enabled, but some require
107 exiting to legacy mode first.
108 Default is 0, leave ACPI enabled.
109 .It Va hw.acpi.handle_reboot
110 Use the ACPI Reset Register capability to reboot the system.
111 Default is 0, use legacy reboot support.
112 Some newer systems require use of this register, while some only work
113 with legacy rebooting support.
114 .It Va hw.acpi.lid_switch_state
116 .Pq Li S1 Ns \[en] Ns Li S5
117 to enter when the lid switch (i.e., a notebook screen) is closed.
121 .It Va hw.acpi.power_button_state
123 .Pq Li S1 Ns \[en] Ns Li S5
124 to enter when the power button is pressed.
128 .It Va hw.acpi.reset_video
129 Reset the video adapter from real mode during the resume path.
130 Some systems need this help, others have display problems if it is enabled.
131 Default is 0 (disabled).
132 .It Va hw.acpi.s4bios
133 Indicate whether the system supports
135 This means that the BIOS can handle all the functions of suspending the
137 Otherwise, the OS is responsible for suspending to disk
139 Most current systems do not support
141 .It Va hw.acpi.sleep_button_state
143 .Pq Li S1 Ns \[en] Ns Li S5
144 to enter when the sleep button is pressed.
145 This is usually a special function button on the keyboard.
149 .It Va hw.acpi.sleep_delay
150 Wait this number of seconds between preparing the system to suspend and
151 actually entering the suspend state.
153 .It Va hw.acpi.supported_sleep_state
155 .Pq Li S1 Ns \[en] Ns Li S5
156 supported by the BIOS.
157 .Bl -tag -width indent
159 Quick suspend to RAM.
160 The CPU enters a lower power state, but most peripherals are left running.
162 Lower power state than
164 but with the same basic characteristics.
165 Not supported by many systems.
168 Most devices are powered off, and the system stops running except for
172 All devices are powered off, and the system stops running.
173 When resuming, the system starts as if from a cold power on.
180 System shuts down cleanly and powers off.
182 .It Va hw.acpi.verbose
183 Enable verbose printing from the various ACPI subsystems.
186 Tunables can be set at the
188 prompt before booting the kernel or stored in
189 .Pa /boot/loader.conf .
190 Many of these tunables also have a matching
192 entry for access after boot.
193 .Bl -tag -width indent
194 .It Va acpi_dsdt_load
195 Enables loading of a custom ACPI DSDT.
196 .It Va acpi_dsdt_name
197 Name of the DSDT table to load, if loading is enabled.
200 .It Va debug.acpi.disabled
201 Selectively disables portions of ACPI that are enabled by default, for
203 .It Va debug.acpi.enabled
204 Selectively enables portions of ACPI that are disabled by default, for
206 .It Va debug.acpi.max_threads
207 Specify the number of task threads that are started on boot.
208 Limiting this to 1 may help work around various BIOSes that cannot
209 handle parallel requests.
210 The default value is 3.
211 .It Va debug.acpi.quirks
212 Override any automatic quirks completely.
213 .It Va debug.acpi.resume_beep
214 Beep the PC speaker on resume.
215 This can help diagnose suspend/resume problems.
216 Default is 0 (disabled).
217 .It Va hint.acpi.0.disabled
218 Set this to 1 to disable all of ACPI.
219 If ACPI has been disabled on your system due to a blacklist entry for your
220 BIOS, you can set this to 0 to re-enable ACPI for testing.
221 .It Va hw.acpi.ec.poll_timeout
222 Delay in milliseconds to wait for the EC to respond.
223 Try increasing this number if you get the error
224 .Qq Li AE_NO_HARDWARE_RESPONSE .
225 .It Va hw.acpi.host_mem_start
226 Override the assumed memory starting address for PCI host bridges.
227 .It Va hw.acpi.reset_video
228 Enables calling the VESA reset BIOS vector on the resume path.
229 This can fix some graphics cards that have problems such as LCD white-out
231 Default is 0 (disabled).
232 .It Va hw.acpi.auto_serialize_methods
233 Auto-serialization of control methods to proactively prevent problems with
234 ill-behaved reentrant control methods that create named ACPI objects.
235 Default is 1 (enabled).
236 .It Va hw.acpi.verbose
237 Turn on verbose debugging information about what ACPI is doing.
238 .It Va hw.pci.link.%s.%d.irq
239 Override the interrupt to use for this link and index.
240 This capability should be used carefully, and only if a device is not
245 is the name of the link (e.g., LNKA).
247 is the resource index when the link supports multiple IRQs.
248 Most PCI links only have one IRQ resource, so the below form should be used.
249 .It Va hw.pci.link.%s.irq
250 Override the interrupt to use.
251 This capability should be used carefully, and only if a device is not
256 is the name of the link (e.g., LNKA).
259 Since ACPI support on different platforms varies greatly, there are many
260 debugging and tuning options available.
262 For machines known not to work with
264 enabled, there is a BIOS blacklist.
265 Currently, the blacklist only controls whether
267 should be disabled or not.
268 In the future, it will have more granularity to control features (the
269 infrastructure for that is already there).
273 (for debugging purposes, etc.) on machines that are on the blacklist, set the
274 kernel environment variable
275 .Va hint.acpi.0.disabled
277 Before trying this, consider updating your BIOS to a more recent version that
278 may be compatible with ACPI.
282 driver completely, set the kernel environment variable
283 .Va hint.acpi.0.disabled
286 Some i386 machines totally fail to operate with some or all of ACPI disabled.
287 Other i386 machines fail with ACPI enabled.
288 Disabling all or part of ACPI on non-i386 platforms (i.e., platforms where
289 ACPI support is mandatory) may result in a non-functional system.
293 driver comprises a set of drivers, which may be selectively disabled
295 To disable a sub-driver, list it in the kernel
297 .Va debug.acpi.disabled .
298 Multiple entries can be listed, separated by a space.
300 ACPI sub-devices and features that can be disabled:
301 .Bl -tag -width ".Li sysresource"
303 Disable all ACPI features and devices.
309 Probes and attaches subdevices.
310 Disabling will avoid scanning the ACPI namespace entirely.
313 Attaches standard ACPI sub-drivers and devices enumerated in the
315 Disabling this has a similar effect to disabling
318 ACPI namespace will still be scanned.
321 Supports ACPI button devices (typically power and sleep buttons).
324 Control-method batteries device.
327 Supports CPU power-saving and speed-setting functions.
330 Supports CPU power-saving.
333 will also disable this device.
336 Supports CPU speed-setting.
339 will also disable this device.
342 Supports the ACPI Embedded Controller interface, used to communicate
343 with embedded platform controllers.
346 Supports an ISA bus bridge defined in the ACPI namespace,
347 typically as a child of a PCI bus.
350 Supports an ACPI laptop lid switch, which typically puts a
355 Quirks automatically disable ACPI functionality based on the XSDT table's
356 OEM vendor name and revision date.
359 Supports Host to PCI bridges.
362 Performs PCI interrupt routing.
365 Pseudo-devices containing resources which ACPI claims.
368 Supports system cooling and heat management.
371 Implements a timecounter using the ACPI fixed-frequency timer.
374 Supports the High Precision Event Timer.
379 which may conflict with
386 .\"driver comprises a set of drivers,
387 .\"which may be selectively enabled in case of testing.
388 .\"To enable a sub-driver,
389 .\"list it in the kernel environment variable
390 .\".Va debug.acpi.enabled .
391 .\"Multiple entries can be listed,
392 .\"separated by a space.
394 .\"ACPI sub-devices and features that can be enabled:
395 .\".Bl -tag -width ".Li sysresource"
399 It is also possible to avoid portions of the ACPI namespace which
400 may be causing problems, by listing the full path of the root of
401 the region to be avoided in the kernel environment variable
402 .Va debug.acpi.avoid .
403 The object and all of its children will be ignored during the
404 bus/children scan of the namespace.
405 The ACPI CA code will still know about the avoided region.
407 To enable debugging output,
409 must be compiled with
410 .Cd "options ACPI_DEBUG" .
411 Debugging output is separated between layers and levels, where a layer is
412 a component of the ACPI subsystem, and a level is a particular kind
415 Both layers and levels are specified as a whitespace-separated list of
416 tokens, with layers listed in
419 .Va debug.acpi.level .
421 The first set of layers is for ACPI-CA components, and the second is for
424 The ACPI-CA layer descriptions include the prefix for the files they
426 The supported layers are:
428 .Bl -tag -compact -width ".Li ACPI_CA_DISASSEMBLER"
429 .It Li ACPI_UTILITIES
430 Utility ("ut") functions
432 Hardware access ("hw")
437 .It Li ACPI_NAMESPACE
438 Namespace evaluation ("ns")
441 .It Li ACPI_DISPATCHER
442 Internal representation of interpreter state ("ds")
444 Execute AML methods ("ex")
445 .It Li ACPI_RESOURCES
446 Resource parsing ("rs")
447 .It Li ACPI_CA_DEBUGGER
448 Debugger implementation ("db", "dm")
449 .It Li ACPI_OS_SERVICES
450 Usermode support routines ("os")
451 .It Li ACPI_CA_DISASSEMBLER
452 Disassembler implementation (unused)
453 .It Li ACPI_ALL_COMPONENTS
454 All the above ACPI-CA components
455 .It Li ACPI_AC_ADAPTER
458 Control-method battery driver
460 ACPI, ISA, and PCI bus drivers
462 Power and sleep button driver
464 Embedded controller driver
468 Platform-specific driver for hotkeys, LED, etc.
470 Power resource driver
471 .It Li ACPI_PROCESSOR
477 .It Li ACPI_ALL_DRIVERS
483 The supported levels are:
485 .Bl -tag -compact -width ".Li ACPI_LV_AML_DISASSEMBLE"
487 Initialization progress
488 .It Li ACPI_LV_DEBUG_OBJECT
491 General information and progress
492 .It Li ACPI_LV_REPAIR
493 Repair a common problem with predefined methods
494 .It Li ACPI_LV_ALL_EXCEPTIONS
495 All the previous levels
497 .It Li ACPI_LV_DISPATCH
500 .It Li ACPI_LV_OPREGION
501 .It Li ACPI_LV_BFIELD
502 .It Li ACPI_LV_TABLES
503 .It Li ACPI_LV_VALUES
504 .It Li ACPI_LV_OBJECTS
505 .It Li ACPI_LV_RESOURCES
506 .It Li ACPI_LV_USER_REQUESTS
507 .It Li ACPI_LV_PACKAGE
508 .It Li ACPI_LV_VERBOSITY1
509 All the previous levels
510 .It Li ACPI_LV_ALLOCATIONS
511 .It Li ACPI_LV_FUNCTIONS
512 .It Li ACPI_LV_OPTIMIZATIONS
513 .It Li ACPI_LV_VERBOSITY2
514 All the previous levels
517 .Qq Li ACPI_LV_VERBOSITY2
519 .It Li ACPI_LV_THREADS
521 .It Li ACPI_LV_INTERRUPTS
522 .It Li ACPI_LV_VERBOSITY3
523 All the previous levels
524 .It Li ACPI_LV_AML_DISASSEMBLE
525 .It Li ACPI_LV_VERBOSE_INFO
526 .It Li ACPI_LV_FULL_TABLES
527 .It Li ACPI_LV_EVENTS
528 .It Li ACPI_LV_VERBOSE
530 .Qq Li ACPI_LV_VERBOSITY3
531 .It Li ACPI_LV_INIT_NAMES
532 Needs to be specified separately
534 Needs to be specified separately
537 Selection of the appropriate layer and level values is important
538 to avoid massive amounts of debugging output.
539 For example, the following configuration is a good way to gather initial
541 It enables debug output for both ACPI-CA and the
543 driver, printing basic information about errors, warnings, and progress.
544 .Bd -literal -offset indent
545 debug.acpi.layer="ACPI_ALL_COMPONENTS ACPI_ALL_DRIVERS"
546 debug.acpi.level="ACPI_LV_ALL_EXCEPTIONS"
549 Debugging output by the ACPI CA subsystem is prefixed with the
550 module name in lowercase, followed by a source line number.
553 code follows the same format, but
554 the module name is uppercased.
555 .Sh OVERRIDING YOUR BIOS BYTECODE
556 ACPI interprets bytecode named AML
557 (ACPI Machine Language)
558 provided by the BIOS vendor as a memory image at boot time.
559 Sometimes, the AML code contains a bug that does not appear when parsed
560 by the Microsoft implementation.
562 provides a way to override it with your own AML code to work around
563 or debug such problems.
564 Note that all AML in your DSDT and any SSDT tables is overridden.
566 In order to load your AML code, copy it to
567 .Pa /boot/kernel/acpi_dsdt.aml
568 and add the following line to
569 .Pa /boot/loader.conf.
570 .Bd -literal -offset indent
574 In order to prepare your AML code, you will need the
578 utilities and some ACPI knowledge.
580 ACPI is only found and supported on i386/ia32, ia64, and x86_64.
586 .Xr acpi_panasonic 4 ,
589 .Xr acpi_thinkpad 4 ,
603 .%A "Compaq Computer Corporation"
604 .%A "Intel Corporation"
605 .%A "Microsoft Corporation"
606 .%A "Phoenix Technologies Ltd."
607 .%A "Toshiba Corporation"
609 .%T "Advanced Configuration and Power Interface Specification"
610 .%O http://acpi.info/spec.htm
614 The ACPI CA subsystem is developed and maintained by
615 Intel Architecture Labs.
617 The following people made notable contributions to the ACPI subsystem
621 .An Takanori Watanabe Aq Mt takawata@jp.FreeBSD.org ,
622 .An Mitsuru IWASAKI Aq Mt iwasaki@jp.FreeBSD.org ,
623 .An Munehiro Matsuda ,
625 the ACPI-jp mailing list at
626 .Aq Mt acpi-jp@jp.FreeBSD.org ,
627 and many other contributors.
629 This manual page was written by
630 .An Michael Smith Aq Mt msmith@FreeBSD.org .
632 Many BIOS versions have serious bugs that may cause system instability,
633 break suspend/resume, or prevent devices from operating properly due to
634 IRQ routing problems.
635 Upgrade your BIOS to the latest version available from the vendor before
636 deciding it is a problem with
641 .\"CPU idle power management drive conflicts with the local APIC (LAPIC)
643 .\"Disable APIC mode with
644 .\".Va hint.apic.0.disabled
649 .\"states if APIC mode is enabled.