xref: /linux/kernel/power/Kconfig (revision 464ed18ebdb6236fcff59d2a35d4d2e28668435a)
1296699deSRafael J. Wysockiconfig SUSPEND
2296699deSRafael J. Wysocki	bool "Suspend to RAM and standby"
31eb208aeSRafael J. Wysocki	depends on ARCH_SUSPEND_POSSIBLE
4296699deSRafael J. Wysocki	default y
5296699deSRafael J. Wysocki	---help---
6296699deSRafael J. Wysocki	  Allow the system to enter sleep states in which main memory is
7296699deSRafael J. Wysocki	  powered and thus its contents are preserved, such as the
8f4cb5700SJohannes Berg	  suspend-to-RAM state (e.g. the ACPI S3 state).
9296699deSRafael J. Wysocki
10b28f5081SJohannes Bergconfig SUSPEND_FREEZER
11b28f5081SJohannes Berg	bool "Enable freezer for suspend to RAM/standby" \
12b28f5081SJohannes Berg		if ARCH_WANTS_FREEZER_CONTROL || BROKEN
13b28f5081SJohannes Berg	depends on SUSPEND
14b28f5081SJohannes Berg	default y
15b28f5081SJohannes Berg	help
16b28f5081SJohannes Berg	  This allows you to turn off the freezer for suspend. If this is
17b28f5081SJohannes Berg	  done, no tasks are frozen for suspend to RAM/standby.
18b28f5081SJohannes Berg
19b28f5081SJohannes Berg	  Turning OFF this setting is NOT recommended! If in doubt, say Y.
20b28f5081SJohannes Berg
211f112ceeSRafael J. Wysockiconfig HIBERNATE_CALLBACKS
221f112ceeSRafael J. Wysocki	bool
231f112ceeSRafael J. Wysocki
24b0cb1a19SRafael J. Wysockiconfig HIBERNATION
25296699deSRafael J. Wysocki	bool "Hibernation (aka 'suspend to disk')"
261eb208aeSRafael J. Wysocki	depends on SWAP && ARCH_HIBERNATION_POSSIBLE
271f112ceeSRafael J. Wysocki	select HIBERNATE_CALLBACKS
28f996fc96SBojan Smojver	select LZO_COMPRESS
29f996fc96SBojan Smojver	select LZO_DECOMPRESS
30081a9d04SBojan Smojver	select CRC32
311da177e4SLinus Torvalds	---help---
32a7ee2e5fSDavid Brownell	  Enable the suspend to disk (STD) functionality, which is usually
33a7ee2e5fSDavid Brownell	  called "hibernation" in user interfaces.  STD checkpoints the
34a7ee2e5fSDavid Brownell	  system and powers it off; and restores that checkpoint on reboot.
351da177e4SLinus Torvalds
3623b168d4SPavel Machek	  You can suspend your machine with 'echo disk > /sys/power/state'
3723b168d4SPavel Machek	  after placing resume=/dev/swappartition on the kernel command line
3823b168d4SPavel Machek	  in your bootloader's configuration file.
3923b168d4SPavel Machek
40c7276fdeSRafael J. Wysocki	  Alternatively, you can use the additional userland tools available
41c7276fdeSRafael J. Wysocki	  from <http://suspend.sf.net>.
42c7276fdeSRafael J. Wysocki
43c7276fdeSRafael J. Wysocki	  In principle it does not require ACPI or APM, although for example
44a7ee2e5fSDavid Brownell	  ACPI will be used for the final steps when it is available.  One
45a7ee2e5fSDavid Brownell	  of the reasons to use software suspend is that the firmware hooks
46a7ee2e5fSDavid Brownell	  for suspend states like suspend-to-RAM (STR) often don't work very
47a7ee2e5fSDavid Brownell	  well with Linux.
48c7276fdeSRafael J. Wysocki
49c7276fdeSRafael J. Wysocki	  It creates an image which is saved in your active swap. Upon the next
501da177e4SLinus Torvalds	  boot, pass the 'resume=/dev/swappartition' argument to the kernel to
511da177e4SLinus Torvalds	  have it detect the saved image, restore memory state from it, and
521da177e4SLinus Torvalds	  continue to run as before. If you do not want the previous state to
53c7276fdeSRafael J. Wysocki	  be reloaded, then use the 'noresume' kernel command line argument.
54c7276fdeSRafael J. Wysocki	  Note, however, that fsck will be run on your filesystems and you will
55c7276fdeSRafael J. Wysocki	  need to run mkswap against the swap partition used for the suspend.
561da177e4SLinus Torvalds
57c7276fdeSRafael J. Wysocki	  It also works with swap files to a limited extent (for details see
58c7276fdeSRafael J. Wysocki	  <file:Documentation/power/swsusp-and-swap-files.txt>).
59c7276fdeSRafael J. Wysocki
60c7276fdeSRafael J. Wysocki	  Right now you may boot without resuming and resume later but in the
61c7276fdeSRafael J. Wysocki	  meantime you cannot use the swap partition(s)/file(s) involved in
62c7276fdeSRafael J. Wysocki	  suspending.  Also in this case you must not use the filesystems
63c7276fdeSRafael J. Wysocki	  that were mounted before the suspend.  In particular, you MUST NOT
64c7276fdeSRafael J. Wysocki	  MOUNT any journaled filesystems mounted before the suspend or they
65c7276fdeSRafael J. Wysocki	  will get corrupted in a nasty way.
661da177e4SLinus Torvalds
671da177e4SLinus Torvalds	  For more information take a look at <file:Documentation/power/swsusp.txt>.
681da177e4SLinus Torvalds
6985055dd8SMartin Schwidefskyconfig ARCH_SAVE_PAGE_KEYS
7085055dd8SMartin Schwidefsky	bool
7185055dd8SMartin Schwidefsky
721da177e4SLinus Torvaldsconfig PM_STD_PARTITION
731da177e4SLinus Torvalds	string "Default resume partition"
74b0cb1a19SRafael J. Wysocki	depends on HIBERNATION
751da177e4SLinus Torvalds	default ""
761da177e4SLinus Torvalds	---help---
771da177e4SLinus Torvalds	  The default resume partition is the partition that the suspend-
781da177e4SLinus Torvalds	  to-disk implementation will look for a suspended disk image.
791da177e4SLinus Torvalds
801da177e4SLinus Torvalds	  The partition specified here will be different for almost every user.
811da177e4SLinus Torvalds	  It should be a valid swap partition (at least for now) that is turned
821da177e4SLinus Torvalds	  on before suspending.
831da177e4SLinus Torvalds
841da177e4SLinus Torvalds	  The partition specified can be overridden by specifying:
851da177e4SLinus Torvalds
861da177e4SLinus Torvalds		resume=/dev/<other device>
871da177e4SLinus Torvalds
881da177e4SLinus Torvalds	  which will set the resume partition to the device specified.
891da177e4SLinus Torvalds
901da177e4SLinus Torvalds	  Note there is currently not a way to specify which device to save the
911da177e4SLinus Torvalds	  suspended image to. It will simply pick the first available swap
921da177e4SLinus Torvalds	  device.
931da177e4SLinus Torvalds
94196ec243SRafael J. Wysockiconfig PM_SLEEP
95cf4fb80cSJan Beulich	def_bool y
96d419e4c0SShriram Rajagopalan	depends on SUSPEND || HIBERNATE_CALLBACKS
97*464ed18eSRafael J. Wysocki	select PM
98196ec243SRafael J. Wysocki
99196ec243SRafael J. Wysockiconfig PM_SLEEP_SMP
100cf4fb80cSJan Beulich	def_bool y
101196ec243SRafael J. Wysocki	depends on SMP
102196ec243SRafael J. Wysocki	depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
103196ec243SRafael J. Wysocki	depends on PM_SLEEP
104196ec243SRafael J. Wysocki	select HOTPLUG_CPU
105196ec243SRafael J. Wysocki
1067483b4a4SRafael J. Wysockiconfig PM_AUTOSLEEP
1077483b4a4SRafael J. Wysocki	bool "Opportunistic sleep"
1087483b4a4SRafael J. Wysocki	depends on PM_SLEEP
1097483b4a4SRafael J. Wysocki	default n
1107483b4a4SRafael J. Wysocki	---help---
1117483b4a4SRafael J. Wysocki	Allow the kernel to trigger a system transition into a global sleep
1127483b4a4SRafael J. Wysocki	state automatically whenever there are no active wakeup sources.
1137483b4a4SRafael J. Wysocki
114b86ff982SRafael J. Wysockiconfig PM_WAKELOCKS
115b86ff982SRafael J. Wysocki	bool "User space wakeup sources interface"
116b86ff982SRafael J. Wysocki	depends on PM_SLEEP
117b86ff982SRafael J. Wysocki	default n
118b86ff982SRafael J. Wysocki	---help---
119b86ff982SRafael J. Wysocki	Allow user space to create, activate and deactivate wakeup source
120b86ff982SRafael J. Wysocki	objects with the help of a sysfs-based interface.
121b86ff982SRafael J. Wysocki
122c73893e2SRafael J. Wysockiconfig PM_WAKELOCKS_LIMIT
123c73893e2SRafael J. Wysocki	int "Maximum number of user space wakeup sources (0 = no limit)"
124c73893e2SRafael J. Wysocki	range 0 100000
125c73893e2SRafael J. Wysocki	default 100
126c73893e2SRafael J. Wysocki	depends on PM_WAKELOCKS
127c73893e2SRafael J. Wysocki
1284e585d25SRafael J. Wysockiconfig PM_WAKELOCKS_GC
1294e585d25SRafael J. Wysocki	bool "Garbage collector for user space wakeup sources"
1304e585d25SRafael J. Wysocki	depends on PM_WAKELOCKS
1314e585d25SRafael J. Wysocki	default y
1324e585d25SRafael J. Wysocki
133*464ed18eSRafael J. Wysockiconfig PM
134*464ed18eSRafael J. Wysocki	bool "Device power management core functionality"
135196ec243SRafael J. Wysocki	---help---
136196ec243SRafael J. Wysocki	  Enable functionality allowing I/O devices to be put into energy-saving
137*464ed18eSRafael J. Wysocki	  (low power) states, for example after a specified period of inactivity
138*464ed18eSRafael J. Wysocki	  (autosuspended), and woken up in response to a hardware-generated
139196ec243SRafael J. Wysocki	  wake-up event or a driver's request.
140196ec243SRafael J. Wysocki
141196ec243SRafael J. Wysocki	  Hardware support is generally required for this functionality to work
142196ec243SRafael J. Wysocki	  and the bus type drivers of the buses the devices are on are
143*464ed18eSRafael J. Wysocki	  responsible for the actual handling of device suspend requests and
144196ec243SRafael J. Wysocki	  wake-up events.
145196ec243SRafael J. Wysocki
146196ec243SRafael J. Wysockiconfig PM_DEBUG
147196ec243SRafael J. Wysocki	bool "Power Management Debug Support"
148196ec243SRafael J. Wysocki	depends on PM
149196ec243SRafael J. Wysocki	---help---
150196ec243SRafael J. Wysocki	This option enables various debugging support in the Power Management
151196ec243SRafael J. Wysocki	code. This is helpful when debugging and reporting PM bugs, like
152196ec243SRafael J. Wysocki	suspend support.
153196ec243SRafael J. Wysocki
154196ec243SRafael J. Wysockiconfig PM_ADVANCED_DEBUG
155196ec243SRafael J. Wysocki	bool "Extra PM attributes in sysfs for low-level debugging/testing"
156196ec243SRafael J. Wysocki	depends on PM_DEBUG
157196ec243SRafael J. Wysocki	---help---
158196ec243SRafael J. Wysocki	Add extra sysfs attributes allowing one to access some Power Management
159196ec243SRafael J. Wysocki	fields of device objects from user space.  If you are not a kernel
160196ec243SRafael J. Wysocki	developer interested in debugging/testing Power Management, say "no".
161196ec243SRafael J. Wysocki
162196ec243SRafael J. Wysockiconfig PM_TEST_SUSPEND
163196ec243SRafael J. Wysocki	bool "Test suspend/resume and wakealarm during bootup"
164196ec243SRafael J. Wysocki	depends on SUSPEND && PM_DEBUG && RTC_CLASS=y
165196ec243SRafael J. Wysocki	---help---
166196ec243SRafael J. Wysocki	This option will let you suspend your machine during bootup, and
167196ec243SRafael J. Wysocki	make it wake up a few seconds later using an RTC wakeup alarm.
168196ec243SRafael J. Wysocki	Enable this with a kernel parameter like "test_suspend=mem".
169196ec243SRafael J. Wysocki
170196ec243SRafael J. Wysocki	You probably want to have your system's RTC driver statically
171196ec243SRafael J. Wysocki	linked, ensuring that it's available when this test runs.
172196ec243SRafael J. Wysocki
173b2df1d4fSRafael J. Wysockiconfig PM_SLEEP_DEBUG
174196ec243SRafael J. Wysocki	def_bool y
17588a6f33eSRafael J. Wysocki	depends on PM_DEBUG && PM_SLEEP
176196ec243SRafael J. Wysocki
17770fea60dSBenoit Gobyconfig DPM_WATCHDOG
17870fea60dSBenoit Goby	bool "Device suspend/resume watchdog"
17970fea60dSBenoit Goby	depends on PM_DEBUG && PSTORE
18070fea60dSBenoit Goby	---help---
18170fea60dSBenoit Goby	  Sets up a watchdog timer to capture drivers that are
18270fea60dSBenoit Goby	  locked up attempting to suspend/resume a device.
18370fea60dSBenoit Goby	  A detected lockup causes system panic with message
18470fea60dSBenoit Goby	  captured in pstore device for inspection in subsequent
18570fea60dSBenoit Goby	  boot session.
18670fea60dSBenoit Goby
18770fea60dSBenoit Gobyconfig DPM_WATCHDOG_TIMEOUT
18870fea60dSBenoit Goby	int "Watchdog timeout in seconds"
18970fea60dSBenoit Goby	range 1 120
19070fea60dSBenoit Goby	default 12
19170fea60dSBenoit Goby	depends on DPM_WATCHDOG
19270fea60dSBenoit Goby
193196ec243SRafael J. Wysockiconfig PM_TRACE
194196ec243SRafael J. Wysocki	bool
195196ec243SRafael J. Wysocki	help
196196ec243SRafael J. Wysocki	  This enables code to save the last PM event point across
197196ec243SRafael J. Wysocki	  reboot. The architecture needs to support this, x86 for
198196ec243SRafael J. Wysocki	  example does by saving things in the RTC, see below.
199196ec243SRafael J. Wysocki
200196ec243SRafael J. Wysocki	  The architecture specific code must provide the extern
201196ec243SRafael J. Wysocki	  functions from <linux/resume-trace.h> as well as the
202196ec243SRafael J. Wysocki	  <asm/resume-trace.h> header with a TRACE_RESUME() macro.
203196ec243SRafael J. Wysocki
204196ec243SRafael J. Wysocki	  The way the information is presented is architecture-
205196ec243SRafael J. Wysocki	  dependent, x86 will print the information during a
206196ec243SRafael J. Wysocki	  late_initcall.
207196ec243SRafael J. Wysocki
208196ec243SRafael J. Wysockiconfig PM_TRACE_RTC
209196ec243SRafael J. Wysocki	bool "Suspend/resume event tracing"
210b2df1d4fSRafael J. Wysocki	depends on PM_SLEEP_DEBUG
211196ec243SRafael J. Wysocki	depends on X86
212196ec243SRafael J. Wysocki	select PM_TRACE
213196ec243SRafael J. Wysocki	---help---
214196ec243SRafael J. Wysocki	This enables some cheesy code to save the last PM event point in the
215196ec243SRafael J. Wysocki	RTC across reboots, so that you can debug a machine that just hangs
216196ec243SRafael J. Wysocki	during suspend (or more commonly, during resume).
217196ec243SRafael J. Wysocki
218196ec243SRafael J. Wysocki	To use this debugging feature you should attempt to suspend the
219196ec243SRafael J. Wysocki	machine, reboot it and then run
220196ec243SRafael J. Wysocki
221196ec243SRafael J. Wysocki		dmesg -s 1000000 | grep 'hash matches'
222196ec243SRafael J. Wysocki
223196ec243SRafael J. Wysocki	CAUTION: this option will cause your machine's real-time clock to be
224196ec243SRafael J. Wysocki	set to an invalid time after a resume.
225196ec243SRafael J. Wysocki
2267726942fSRalf Baechleconfig APM_EMULATION
2277726942fSRalf Baechle	tristate "Advanced Power Management Emulation"
2287726942fSRalf Baechle	depends on PM && SYS_SUPPORTS_APM_EMULATION
2297726942fSRalf Baechle	help
2307726942fSRalf Baechle	  APM is a BIOS specification for saving power using several different
2317726942fSRalf Baechle	  techniques. This is mostly useful for battery powered laptops with
2327726942fSRalf Baechle	  APM compliant BIOSes. If you say Y here, the system time will be
2337726942fSRalf Baechle	  reset after a RESUME operation, the /proc/apm device will provide
2347726942fSRalf Baechle	  battery status information, and user-space programs will receive
2357726942fSRalf Baechle	  notification of APM "events" (e.g. battery status change).
2367726942fSRalf Baechle
2377726942fSRalf Baechle	  In order to use APM, you will need supporting software. For location
2382dc98fd3SMichael Witten	  and more information, read <file:Documentation/power/apm-acpi.txt>
2392dc98fd3SMichael Witten	  and the Battery Powered Linux mini-HOWTO, available from
2407726942fSRalf Baechle	  <http://www.tldp.org/docs.html#howto>.
2417726942fSRalf Baechle
2427726942fSRalf Baechle	  This driver does not spin down disk drives (see the hdparm(8)
2437726942fSRalf Baechle	  manpage ("man 8 hdparm") for that), and it doesn't turn off
2447726942fSRalf Baechle	  VESA-compliant "green" monitors.
2457726942fSRalf Baechle
2467726942fSRalf Baechle	  Generally, if you don't have a battery in your machine, there isn't
2477726942fSRalf Baechle	  much point in using this driver and you should say N. If you get
2487726942fSRalf Baechle	  random kernel OOPSes or reboots that don't seem to be related to
2497726942fSRalf Baechle	  anything, try disabling/enabling this option (or disabling/enabling
2507726942fSRalf Baechle	  APM in your BIOS).
2515e928f77SRafael J. Wysocki
252e1f60b29SNishanth Menonconfig PM_OPP
253049d595aSMark Brown	bool
254e1f60b29SNishanth Menon	---help---
255e1f60b29SNishanth Menon	  SOCs have a standard set of tuples consisting of frequency and
256e1f60b29SNishanth Menon	  voltage pairs that the device will support per voltage domain. This
257e1f60b29SNishanth Menon	  is called Operating Performance Point or OPP. The actual definitions
258e1f60b29SNishanth Menon	  of OPP varies over silicon within the same family of devices.
259e1f60b29SNishanth Menon
260e1f60b29SNishanth Menon	  OPP layer organizes the data internally using device pointers
261e1f60b29SNishanth Menon	  representing individual voltage domains and provides SOC
262e1f60b29SNishanth Menon	  implementations a ready to use framework to manage OPPs.
263e1f60b29SNishanth Menon	  For more information, read <file:Documentation/power/opp.txt>
26485eb8c8dSRafael J. Wysocki
265b7b95920SRafael J. Wysockiconfig PM_CLK
26685eb8c8dSRafael J. Wysocki	def_bool y
267b7b95920SRafael J. Wysocki	depends on PM && HAVE_CLK
268f721889fSRafael J. Wysocki
269f721889fSRafael J. Wysockiconfig PM_GENERIC_DOMAINS
270f721889fSRafael J. Wysocki	bool
271f721889fSRafael J. Wysocki	depends on PM
27217f2ae7fSRafael J. Wysocki
273cee22a15SViresh Kumarconfig WQ_POWER_EFFICIENT_DEFAULT
274cee22a15SViresh Kumar	bool "Enable workqueue power-efficient mode by default"
275cee22a15SViresh Kumar	depends on PM
276cee22a15SViresh Kumar	default n
277cee22a15SViresh Kumar	help
278cee22a15SViresh Kumar	  Per-cpu workqueues are generally preferred because they show
279cee22a15SViresh Kumar	  better performance thanks to cache locality; unfortunately,
280cee22a15SViresh Kumar	  per-cpu workqueues tend to be more power hungry than unbound
281cee22a15SViresh Kumar	  workqueues.
282cee22a15SViresh Kumar
283cee22a15SViresh Kumar	  Enabling workqueue.power_efficient kernel parameter makes the
284cee22a15SViresh Kumar	  per-cpu workqueues which were observed to contribute
285cee22a15SViresh Kumar	  significantly to power consumption unbound, leading to measurably
286cee22a15SViresh Kumar	  lower power usage at the cost of small performance overhead.
287cee22a15SViresh Kumar
288cee22a15SViresh Kumar	  This config option determines whether workqueue.power_efficient
289cee22a15SViresh Kumar	  is enabled by default.
290cee22a15SViresh Kumar
291cee22a15SViresh Kumar	  If in doubt, say N.
292cee22a15SViresh Kumar
29377f827deSRafael J. Wysockiconfig PM_GENERIC_DOMAINS_SLEEP
29477f827deSRafael J. Wysocki	def_bool y
29577f827deSRafael J. Wysocki	depends on PM_SLEEP && PM_GENERIC_DOMAINS
29677f827deSRafael J. Wysocki
297aa42240aSTomasz Figaconfig PM_GENERIC_DOMAINS_OF
298aa42240aSTomasz Figa	def_bool y
299a4a8c2c4STomasz Figa	depends on PM_GENERIC_DOMAINS && OF
300aa42240aSTomasz Figa
301ab10023eSColin Crossconfig CPU_PM
302ab10023eSColin Cross	bool
303