xref: /linux/kernel/power/Kconfig (revision 93a0886e2368eafb9df5e2021fb185195cee88b2)
11da177e4SLinus Torvaldsconfig PM
21da177e4SLinus Torvalds	bool "Power Management support"
3eb7b6b32SLen Brown	depends on !IA64_HP_SIM
41da177e4SLinus Torvalds	---help---
51da177e4SLinus Torvalds	  "Power Management" means that parts of your computer are shut
61da177e4SLinus Torvalds	  off or put into a power conserving "sleep" mode if they are not
71da177e4SLinus Torvalds	  being used.  There are two competing standards for doing this: APM
81da177e4SLinus Torvalds	  and ACPI.  If you want to use either one, say Y here and then also
91da177e4SLinus Torvalds	  to the requisite support below.
101da177e4SLinus Torvalds
111da177e4SLinus Torvalds	  Power Management is most important for battery powered laptop
121da177e4SLinus Torvalds	  computers; if you have a laptop, check out the Linux Laptop home
131da177e4SLinus Torvalds	  page on the WWW at <http://www.linux-on-laptops.com/> or
141da177e4SLinus Torvalds	  Tuxmobil - Linux on Mobile Computers at <http://www.tuxmobil.org/>
151da177e4SLinus Torvalds	  and the Battery Powered Linux mini-HOWTO, available from
161da177e4SLinus Torvalds	  <http://www.tldp.org/docs.html#howto>.
171da177e4SLinus Torvalds
181da177e4SLinus Torvalds	  Note that, even if you say N here, Linux on the x86 architecture
191da177e4SLinus Torvalds	  will issue the hlt instruction if nothing is to be done, thereby
201da177e4SLinus Torvalds	  sending the processor to sleep and saving power.
211da177e4SLinus Torvalds
221da177e4SLinus Torvaldsconfig PM_DEBUG
231da177e4SLinus Torvalds	bool "Power Management Debug Support"
241da177e4SLinus Torvalds	depends on PM
251da177e4SLinus Torvalds	---help---
26a0349828SBen Collins	This option enables various debugging support in the Power Management
27a0349828SBen Collins	code. This is helpful when debugging and reporting PM bugs, like
28a0349828SBen Collins	suspend support.
29a0349828SBen Collins
30a0349828SBen Collinsconfig PM_VERBOSE
31a0349828SBen Collins	bool "Verbose Power Management debugging"
32a0349828SBen Collins	depends on PM_DEBUG
33a0349828SBen Collins	default n
34a0349828SBen Collins	---help---
35a0349828SBen Collins	This option enables verbose messages from the Power Management code.
361da177e4SLinus Torvalds
3790dda1cbSJohannes Bergconfig CAN_PM_TRACE
3890dda1cbSJohannes Berg	def_bool y
3990dda1cbSJohannes Berg	depends on PM_DEBUG && PM_SLEEP && EXPERIMENTAL
4090dda1cbSJohannes Berg
41eb71c87aSLinus Torvaldsconfig PM_TRACE
4290dda1cbSJohannes Berg	bool
4390dda1cbSJohannes Berg	help
4490dda1cbSJohannes Berg	  This enables code to save the last PM event point across
4590dda1cbSJohannes Berg	  reboot. The architecture needs to support this, x86 for
4690dda1cbSJohannes Berg	  example does by saving things in the RTC, see below.
4790dda1cbSJohannes Berg
4890dda1cbSJohannes Berg	  The architecture specific code must provide the extern
4990dda1cbSJohannes Berg	  functions from <linux/resume-trace.h> as well as the
5090dda1cbSJohannes Berg	  <asm/resume-trace.h> header with a TRACE_RESUME() macro.
5190dda1cbSJohannes Berg
5290dda1cbSJohannes Berg	  The way the information is presented is architecture-
5390dda1cbSJohannes Berg	  dependent, x86 will print the information during a
5490dda1cbSJohannes Berg	  late_initcall.
5590dda1cbSJohannes Berg
5690dda1cbSJohannes Bergconfig PM_TRACE_RTC
57eb71c87aSLinus Torvalds	bool "Suspend/resume event tracing"
5890dda1cbSJohannes Berg	depends on CAN_PM_TRACE
5990dda1cbSJohannes Berg	depends on X86
6090dda1cbSJohannes Berg	select PM_TRACE
615c31f273SAndrew Morton	default n
62eb71c87aSLinus Torvalds	---help---
63eb71c87aSLinus Torvalds	This enables some cheesy code to save the last PM event point in the
64eb71c87aSLinus Torvalds	RTC across reboots, so that you can debug a machine that just hangs
65eb71c87aSLinus Torvalds	during suspend (or more commonly, during resume).
66eb71c87aSLinus Torvalds
6723b168d4SPavel Machek	To use this debugging feature you should attempt to suspend the
6823b168d4SPavel Machek	machine, reboot it and then run
695c31f273SAndrew Morton
705c31f273SAndrew Morton		dmesg -s 1000000 | grep 'hash matches'
715c31f273SAndrew Morton
725c31f273SAndrew Morton	CAUTION: this option will cause your machine's real-time clock to be
735c31f273SAndrew Morton	set to an invalid time after a resume.
745c31f273SAndrew Morton
75f3de4be9SRafael J. Wysockiconfig PM_SLEEP_SMP
76296699deSRafael J. Wysocki	bool
77801e4062SJohannes Berg	depends on SMP
78f4cb5700SJohannes Berg	depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
79f3de4be9SRafael J. Wysocki	depends on PM_SLEEP
80296699deSRafael J. Wysocki	select HOTPLUG_CPU
81296699deSRafael J. Wysocki	default y
82296699deSRafael J. Wysocki
83296699deSRafael J. Wysockiconfig PM_SLEEP
84296699deSRafael J. Wysocki	bool
85*93a0886eSJeremy Fitzhardinge	depends on SUSPEND || HIBERNATION || XEN_SAVE_RESTORE
86296699deSRafael J. Wysocki	default y
87296699deSRafael J. Wysocki
88296699deSRafael J. Wysockiconfig SUSPEND
89296699deSRafael J. Wysocki	bool "Suspend to RAM and standby"
90f4cb5700SJohannes Berg	depends on PM && ARCH_SUSPEND_POSSIBLE
91296699deSRafael J. Wysocki	default y
92296699deSRafael J. Wysocki	---help---
93296699deSRafael J. Wysocki	  Allow the system to enter sleep states in which main memory is
94296699deSRafael J. Wysocki	  powered and thus its contents are preserved, such as the
95f4cb5700SJohannes Berg	  suspend-to-RAM state (e.g. the ACPI S3 state).
96296699deSRafael J. Wysocki
97b28f5081SJohannes Bergconfig SUSPEND_FREEZER
98b28f5081SJohannes Berg	bool "Enable freezer for suspend to RAM/standby" \
99b28f5081SJohannes Berg		if ARCH_WANTS_FREEZER_CONTROL || BROKEN
100b28f5081SJohannes Berg	depends on SUSPEND
101b28f5081SJohannes Berg	default y
102b28f5081SJohannes Berg	help
103b28f5081SJohannes Berg	  This allows you to turn off the freezer for suspend. If this is
104b28f5081SJohannes Berg	  done, no tasks are frozen for suspend to RAM/standby.
105b28f5081SJohannes Berg
106b28f5081SJohannes Berg	  Turning OFF this setting is NOT recommended! If in doubt, say Y.
107b28f5081SJohannes Berg
108b0cb1a19SRafael J. Wysockiconfig HIBERNATION
109296699deSRafael J. Wysocki	bool "Hibernation (aka 'suspend to disk')"
110801e4062SJohannes Berg	depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
1111da177e4SLinus Torvalds	---help---
112a7ee2e5fSDavid Brownell	  Enable the suspend to disk (STD) functionality, which is usually
113a7ee2e5fSDavid Brownell	  called "hibernation" in user interfaces.  STD checkpoints the
114a7ee2e5fSDavid Brownell	  system and powers it off; and restores that checkpoint on reboot.
1151da177e4SLinus Torvalds
11623b168d4SPavel Machek	  You can suspend your machine with 'echo disk > /sys/power/state'
11723b168d4SPavel Machek	  after placing resume=/dev/swappartition on the kernel command line
11823b168d4SPavel Machek	  in your bootloader's configuration file.
11923b168d4SPavel Machek
120c7276fdeSRafael J. Wysocki	  Alternatively, you can use the additional userland tools available
121c7276fdeSRafael J. Wysocki	  from <http://suspend.sf.net>.
122c7276fdeSRafael J. Wysocki
123c7276fdeSRafael J. Wysocki	  In principle it does not require ACPI or APM, although for example
124a7ee2e5fSDavid Brownell	  ACPI will be used for the final steps when it is available.  One
125a7ee2e5fSDavid Brownell	  of the reasons to use software suspend is that the firmware hooks
126a7ee2e5fSDavid Brownell	  for suspend states like suspend-to-RAM (STR) often don't work very
127a7ee2e5fSDavid Brownell	  well with Linux.
128c7276fdeSRafael J. Wysocki
129c7276fdeSRafael J. Wysocki	  It creates an image which is saved in your active swap. Upon the next
1301da177e4SLinus Torvalds	  boot, pass the 'resume=/dev/swappartition' argument to the kernel to
1311da177e4SLinus Torvalds	  have it detect the saved image, restore memory state from it, and
1321da177e4SLinus Torvalds	  continue to run as before. If you do not want the previous state to
133c7276fdeSRafael J. Wysocki	  be reloaded, then use the 'noresume' kernel command line argument.
134c7276fdeSRafael J. Wysocki	  Note, however, that fsck will be run on your filesystems and you will
135c7276fdeSRafael J. Wysocki	  need to run mkswap against the swap partition used for the suspend.
1361da177e4SLinus Torvalds
137c7276fdeSRafael J. Wysocki	  It also works with swap files to a limited extent (for details see
138c7276fdeSRafael J. Wysocki	  <file:Documentation/power/swsusp-and-swap-files.txt>).
139c7276fdeSRafael J. Wysocki
140c7276fdeSRafael J. Wysocki	  Right now you may boot without resuming and resume later but in the
141c7276fdeSRafael J. Wysocki	  meantime you cannot use the swap partition(s)/file(s) involved in
142c7276fdeSRafael J. Wysocki	  suspending.  Also in this case you must not use the filesystems
143c7276fdeSRafael J. Wysocki	  that were mounted before the suspend.  In particular, you MUST NOT
144c7276fdeSRafael J. Wysocki	  MOUNT any journaled filesystems mounted before the suspend or they
145c7276fdeSRafael J. Wysocki	  will get corrupted in a nasty way.
1461da177e4SLinus Torvalds
1471da177e4SLinus Torvalds	  For more information take a look at <file:Documentation/power/swsusp.txt>.
1481da177e4SLinus Torvalds
1491da177e4SLinus Torvaldsconfig PM_STD_PARTITION
1501da177e4SLinus Torvalds	string "Default resume partition"
151b0cb1a19SRafael J. Wysocki	depends on HIBERNATION
1521da177e4SLinus Torvalds	default ""
1531da177e4SLinus Torvalds	---help---
1541da177e4SLinus Torvalds	  The default resume partition is the partition that the suspend-
1551da177e4SLinus Torvalds	  to-disk implementation will look for a suspended disk image.
1561da177e4SLinus Torvalds
1571da177e4SLinus Torvalds	  The partition specified here will be different for almost every user.
1581da177e4SLinus Torvalds	  It should be a valid swap partition (at least for now) that is turned
1591da177e4SLinus Torvalds	  on before suspending.
1601da177e4SLinus Torvalds
1611da177e4SLinus Torvalds	  The partition specified can be overridden by specifying:
1621da177e4SLinus Torvalds
1631da177e4SLinus Torvalds		resume=/dev/<other device>
1641da177e4SLinus Torvalds
1651da177e4SLinus Torvalds	  which will set the resume partition to the device specified.
1661da177e4SLinus Torvalds
1671da177e4SLinus Torvalds	  Note there is currently not a way to specify which device to save the
1681da177e4SLinus Torvalds	  suspended image to. It will simply pick the first available swap
1691da177e4SLinus Torvalds	  device.
1701da177e4SLinus Torvalds
1717726942fSRalf Baechleconfig APM_EMULATION
1727726942fSRalf Baechle	tristate "Advanced Power Management Emulation"
1737726942fSRalf Baechle	depends on PM && SYS_SUPPORTS_APM_EMULATION
1747726942fSRalf Baechle	help
1757726942fSRalf Baechle	  APM is a BIOS specification for saving power using several different
1767726942fSRalf Baechle	  techniques. This is mostly useful for battery powered laptops with
1777726942fSRalf Baechle	  APM compliant BIOSes. If you say Y here, the system time will be
1787726942fSRalf Baechle	  reset after a RESUME operation, the /proc/apm device will provide
1797726942fSRalf Baechle	  battery status information, and user-space programs will receive
1807726942fSRalf Baechle	  notification of APM "events" (e.g. battery status change).
1817726942fSRalf Baechle
1827726942fSRalf Baechle	  In order to use APM, you will need supporting software. For location
18353471121SRandy Dunlap	  and more information, read <file:Documentation/power/pm.txt> and the
1847726942fSRalf Baechle	  Battery Powered Linux mini-HOWTO, available from
1857726942fSRalf Baechle	  <http://www.tldp.org/docs.html#howto>.
1867726942fSRalf Baechle
1877726942fSRalf Baechle	  This driver does not spin down disk drives (see the hdparm(8)
1887726942fSRalf Baechle	  manpage ("man 8 hdparm") for that), and it doesn't turn off
1897726942fSRalf Baechle	  VESA-compliant "green" monitors.
1907726942fSRalf Baechle
1917726942fSRalf Baechle	  Generally, if you don't have a battery in your machine, there isn't
1927726942fSRalf Baechle	  much point in using this driver and you should say N. If you get
1937726942fSRalf Baechle	  random kernel OOPSes or reboots that don't seem to be related to
1947726942fSRalf Baechle	  anything, try disabling/enabling this option (or disabling/enabling
1957726942fSRalf Baechle	  APM in your BIOS).
196