xref: /linux/kernel/power/Kconfig (revision 196ec243224bb38fc5c41d9fa4050f70708b7fb4)
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
21b0cb1a19SRafael J. Wysockiconfig HIBERNATION
22296699deSRafael J. Wysocki	bool "Hibernation (aka 'suspend to disk')"
231eb208aeSRafael J. Wysocki	depends on SWAP && ARCH_HIBERNATION_POSSIBLE
24f996fc96SBojan Smojver	select LZO_COMPRESS
25f996fc96SBojan Smojver	select LZO_DECOMPRESS
261da177e4SLinus Torvalds	---help---
27a7ee2e5fSDavid Brownell	  Enable the suspend to disk (STD) functionality, which is usually
28a7ee2e5fSDavid Brownell	  called "hibernation" in user interfaces.  STD checkpoints the
29a7ee2e5fSDavid Brownell	  system and powers it off; and restores that checkpoint on reboot.
301da177e4SLinus Torvalds
3123b168d4SPavel Machek	  You can suspend your machine with 'echo disk > /sys/power/state'
3223b168d4SPavel Machek	  after placing resume=/dev/swappartition on the kernel command line
3323b168d4SPavel Machek	  in your bootloader's configuration file.
3423b168d4SPavel Machek
35c7276fdeSRafael J. Wysocki	  Alternatively, you can use the additional userland tools available
36c7276fdeSRafael J. Wysocki	  from <http://suspend.sf.net>.
37c7276fdeSRafael J. Wysocki
38c7276fdeSRafael J. Wysocki	  In principle it does not require ACPI or APM, although for example
39a7ee2e5fSDavid Brownell	  ACPI will be used for the final steps when it is available.  One
40a7ee2e5fSDavid Brownell	  of the reasons to use software suspend is that the firmware hooks
41a7ee2e5fSDavid Brownell	  for suspend states like suspend-to-RAM (STR) often don't work very
42a7ee2e5fSDavid Brownell	  well with Linux.
43c7276fdeSRafael J. Wysocki
44c7276fdeSRafael J. Wysocki	  It creates an image which is saved in your active swap. Upon the next
451da177e4SLinus Torvalds	  boot, pass the 'resume=/dev/swappartition' argument to the kernel to
461da177e4SLinus Torvalds	  have it detect the saved image, restore memory state from it, and
471da177e4SLinus Torvalds	  continue to run as before. If you do not want the previous state to
48c7276fdeSRafael J. Wysocki	  be reloaded, then use the 'noresume' kernel command line argument.
49c7276fdeSRafael J. Wysocki	  Note, however, that fsck will be run on your filesystems and you will
50c7276fdeSRafael J. Wysocki	  need to run mkswap against the swap partition used for the suspend.
511da177e4SLinus Torvalds
52c7276fdeSRafael J. Wysocki	  It also works with swap files to a limited extent (for details see
53c7276fdeSRafael J. Wysocki	  <file:Documentation/power/swsusp-and-swap-files.txt>).
54c7276fdeSRafael J. Wysocki
55c7276fdeSRafael J. Wysocki	  Right now you may boot without resuming and resume later but in the
56c7276fdeSRafael J. Wysocki	  meantime you cannot use the swap partition(s)/file(s) involved in
57c7276fdeSRafael J. Wysocki	  suspending.  Also in this case you must not use the filesystems
58c7276fdeSRafael J. Wysocki	  that were mounted before the suspend.  In particular, you MUST NOT
59c7276fdeSRafael J. Wysocki	  MOUNT any journaled filesystems mounted before the suspend or they
60c7276fdeSRafael J. Wysocki	  will get corrupted in a nasty way.
611da177e4SLinus Torvalds
621da177e4SLinus Torvalds	  For more information take a look at <file:Documentation/power/swsusp.txt>.
631da177e4SLinus Torvalds
641da177e4SLinus Torvaldsconfig PM_STD_PARTITION
651da177e4SLinus Torvalds	string "Default resume partition"
66b0cb1a19SRafael J. Wysocki	depends on HIBERNATION
671da177e4SLinus Torvalds	default ""
681da177e4SLinus Torvalds	---help---
691da177e4SLinus Torvalds	  The default resume partition is the partition that the suspend-
701da177e4SLinus Torvalds	  to-disk implementation will look for a suspended disk image.
711da177e4SLinus Torvalds
721da177e4SLinus Torvalds	  The partition specified here will be different for almost every user.
731da177e4SLinus Torvalds	  It should be a valid swap partition (at least for now) that is turned
741da177e4SLinus Torvalds	  on before suspending.
751da177e4SLinus Torvalds
761da177e4SLinus Torvalds	  The partition specified can be overridden by specifying:
771da177e4SLinus Torvalds
781da177e4SLinus Torvalds		resume=/dev/<other device>
791da177e4SLinus Torvalds
801da177e4SLinus Torvalds	  which will set the resume partition to the device specified.
811da177e4SLinus Torvalds
821da177e4SLinus Torvalds	  Note there is currently not a way to specify which device to save the
831da177e4SLinus Torvalds	  suspended image to. It will simply pick the first available swap
841da177e4SLinus Torvalds	  device.
851da177e4SLinus Torvalds
86*196ec243SRafael J. Wysockiconfig PM_SLEEP
87*196ec243SRafael J. Wysocki	bool
88*196ec243SRafael J. Wysocki	depends on SUSPEND || HIBERNATION || XEN_SAVE_RESTORE
89*196ec243SRafael J. Wysocki	default y
90*196ec243SRafael J. Wysocki
91*196ec243SRafael J. Wysockiconfig PM_SLEEP_SMP
92*196ec243SRafael J. Wysocki	bool
93*196ec243SRafael J. Wysocki	depends on SMP
94*196ec243SRafael J. Wysocki	depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
95*196ec243SRafael J. Wysocki	depends on PM_SLEEP
96*196ec243SRafael J. Wysocki	select HOTPLUG
97*196ec243SRafael J. Wysocki	select HOTPLUG_CPU
98*196ec243SRafael J. Wysocki	default y
99*196ec243SRafael J. Wysocki
100*196ec243SRafael J. Wysockiconfig PM_RUNTIME
101*196ec243SRafael J. Wysocki	bool "Run-time PM core functionality"
102*196ec243SRafael J. Wysocki	depends on !IA64_HP_SIM
103*196ec243SRafael J. Wysocki	---help---
104*196ec243SRafael J. Wysocki	  Enable functionality allowing I/O devices to be put into energy-saving
105*196ec243SRafael J. Wysocki	  (low power) states at run time (or autosuspended) after a specified
106*196ec243SRafael J. Wysocki	  period of inactivity and woken up in response to a hardware-generated
107*196ec243SRafael J. Wysocki	  wake-up event or a driver's request.
108*196ec243SRafael J. Wysocki
109*196ec243SRafael J. Wysocki	  Hardware support is generally required for this functionality to work
110*196ec243SRafael J. Wysocki	  and the bus type drivers of the buses the devices are on are
111*196ec243SRafael J. Wysocki	  responsible for the actual handling of the autosuspend requests and
112*196ec243SRafael J. Wysocki	  wake-up events.
113*196ec243SRafael J. Wysocki
114*196ec243SRafael J. Wysockiconfig PM
115*196ec243SRafael J. Wysocki	bool
116*196ec243SRafael J. Wysocki	depends on PM_SLEEP || PM_RUNTIME
117*196ec243SRafael J. Wysocki	default y
118*196ec243SRafael J. Wysocki
119*196ec243SRafael J. Wysockiconfig PM_DEBUG
120*196ec243SRafael J. Wysocki	bool "Power Management Debug Support"
121*196ec243SRafael J. Wysocki	depends on PM
122*196ec243SRafael J. Wysocki	---help---
123*196ec243SRafael J. Wysocki	This option enables various debugging support in the Power Management
124*196ec243SRafael J. Wysocki	code. This is helpful when debugging and reporting PM bugs, like
125*196ec243SRafael J. Wysocki	suspend support.
126*196ec243SRafael J. Wysocki
127*196ec243SRafael J. Wysockiconfig PM_VERBOSE
128*196ec243SRafael J. Wysocki	bool "Verbose Power Management debugging"
129*196ec243SRafael J. Wysocki	depends on PM_DEBUG
130*196ec243SRafael J. Wysocki	default n
131*196ec243SRafael J. Wysocki	---help---
132*196ec243SRafael J. Wysocki	This option enables verbose messages from the Power Management code.
133*196ec243SRafael J. Wysocki
134*196ec243SRafael J. Wysockiconfig PM_ADVANCED_DEBUG
135*196ec243SRafael J. Wysocki	bool "Extra PM attributes in sysfs for low-level debugging/testing"
136*196ec243SRafael J. Wysocki	depends on PM_DEBUG
137*196ec243SRafael J. Wysocki	default n
138*196ec243SRafael J. Wysocki	---help---
139*196ec243SRafael J. Wysocki	Add extra sysfs attributes allowing one to access some Power Management
140*196ec243SRafael J. Wysocki	fields of device objects from user space.  If you are not a kernel
141*196ec243SRafael J. Wysocki	developer interested in debugging/testing Power Management, say "no".
142*196ec243SRafael J. Wysocki
143*196ec243SRafael J. Wysockiconfig PM_SLEEP_ADVANCED_DEBUG
144*196ec243SRafael J. Wysocki	bool
145*196ec243SRafael J. Wysocki	depends on PM_ADVANCED_DEBUG
146*196ec243SRafael J. Wysocki	default n
147*196ec243SRafael J. Wysocki
148*196ec243SRafael J. Wysockiconfig PM_TEST_SUSPEND
149*196ec243SRafael J. Wysocki	bool "Test suspend/resume and wakealarm during bootup"
150*196ec243SRafael J. Wysocki	depends on SUSPEND && PM_DEBUG && RTC_CLASS=y
151*196ec243SRafael J. Wysocki	---help---
152*196ec243SRafael J. Wysocki	This option will let you suspend your machine during bootup, and
153*196ec243SRafael J. Wysocki	make it wake up a few seconds later using an RTC wakeup alarm.
154*196ec243SRafael J. Wysocki	Enable this with a kernel parameter like "test_suspend=mem".
155*196ec243SRafael J. Wysocki
156*196ec243SRafael J. Wysocki	You probably want to have your system's RTC driver statically
157*196ec243SRafael J. Wysocki	linked, ensuring that it's available when this test runs.
158*196ec243SRafael J. Wysocki
159*196ec243SRafael J. Wysockiconfig CAN_PM_TRACE
160*196ec243SRafael J. Wysocki	def_bool y
161*196ec243SRafael J. Wysocki	depends on PM_DEBUG && PM_SLEEP && EXPERIMENTAL
162*196ec243SRafael J. Wysocki
163*196ec243SRafael J. Wysockiconfig PM_TRACE
164*196ec243SRafael J. Wysocki	bool
165*196ec243SRafael J. Wysocki	help
166*196ec243SRafael J. Wysocki	  This enables code to save the last PM event point across
167*196ec243SRafael J. Wysocki	  reboot. The architecture needs to support this, x86 for
168*196ec243SRafael J. Wysocki	  example does by saving things in the RTC, see below.
169*196ec243SRafael J. Wysocki
170*196ec243SRafael J. Wysocki	  The architecture specific code must provide the extern
171*196ec243SRafael J. Wysocki	  functions from <linux/resume-trace.h> as well as the
172*196ec243SRafael J. Wysocki	  <asm/resume-trace.h> header with a TRACE_RESUME() macro.
173*196ec243SRafael J. Wysocki
174*196ec243SRafael J. Wysocki	  The way the information is presented is architecture-
175*196ec243SRafael J. Wysocki	  dependent, x86 will print the information during a
176*196ec243SRafael J. Wysocki	  late_initcall.
177*196ec243SRafael J. Wysocki
178*196ec243SRafael J. Wysockiconfig PM_TRACE_RTC
179*196ec243SRafael J. Wysocki	bool "Suspend/resume event tracing"
180*196ec243SRafael J. Wysocki	depends on CAN_PM_TRACE
181*196ec243SRafael J. Wysocki	depends on X86
182*196ec243SRafael J. Wysocki	select PM_TRACE
183*196ec243SRafael J. Wysocki	default n
184*196ec243SRafael J. Wysocki	---help---
185*196ec243SRafael J. Wysocki	This enables some cheesy code to save the last PM event point in the
186*196ec243SRafael J. Wysocki	RTC across reboots, so that you can debug a machine that just hangs
187*196ec243SRafael J. Wysocki	during suspend (or more commonly, during resume).
188*196ec243SRafael J. Wysocki
189*196ec243SRafael J. Wysocki	To use this debugging feature you should attempt to suspend the
190*196ec243SRafael J. Wysocki	machine, reboot it and then run
191*196ec243SRafael J. Wysocki
192*196ec243SRafael J. Wysocki		dmesg -s 1000000 | grep 'hash matches'
193*196ec243SRafael J. Wysocki
194*196ec243SRafael J. Wysocki	CAUTION: this option will cause your machine's real-time clock to be
195*196ec243SRafael J. Wysocki	set to an invalid time after a resume.
196*196ec243SRafael J. Wysocki
1977726942fSRalf Baechleconfig APM_EMULATION
1987726942fSRalf Baechle	tristate "Advanced Power Management Emulation"
1997726942fSRalf Baechle	depends on PM && SYS_SUPPORTS_APM_EMULATION
2007726942fSRalf Baechle	help
2017726942fSRalf Baechle	  APM is a BIOS specification for saving power using several different
2027726942fSRalf Baechle	  techniques. This is mostly useful for battery powered laptops with
2037726942fSRalf Baechle	  APM compliant BIOSes. If you say Y here, the system time will be
2047726942fSRalf Baechle	  reset after a RESUME operation, the /proc/apm device will provide
2057726942fSRalf Baechle	  battery status information, and user-space programs will receive
2067726942fSRalf Baechle	  notification of APM "events" (e.g. battery status change).
2077726942fSRalf Baechle
2087726942fSRalf Baechle	  In order to use APM, you will need supporting software. For location
20953471121SRandy Dunlap	  and more information, read <file:Documentation/power/pm.txt> and the
2107726942fSRalf Baechle	  Battery Powered Linux mini-HOWTO, available from
2117726942fSRalf Baechle	  <http://www.tldp.org/docs.html#howto>.
2127726942fSRalf Baechle
2137726942fSRalf Baechle	  This driver does not spin down disk drives (see the hdparm(8)
2147726942fSRalf Baechle	  manpage ("man 8 hdparm") for that), and it doesn't turn off
2157726942fSRalf Baechle	  VESA-compliant "green" monitors.
2167726942fSRalf Baechle
2177726942fSRalf Baechle	  Generally, if you don't have a battery in your machine, there isn't
2187726942fSRalf Baechle	  much point in using this driver and you should say N. If you get
2197726942fSRalf Baechle	  random kernel OOPSes or reboots that don't seem to be related to
2207726942fSRalf Baechle	  anything, try disabling/enabling this option (or disabling/enabling
2217726942fSRalf Baechle	  APM in your BIOS).
2225e928f77SRafael J. Wysocki
2236cbf8214SRafael J. Wysockiconfig PM_OPS
2246cbf8214SRafael J. Wysocki	bool
2256cbf8214SRafael J. Wysocki	depends on PM_SLEEP || PM_RUNTIME
2266cbf8214SRafael J. Wysocki	default y
227e1f60b29SNishanth Menon
22843e60861SMark Brownconfig ARCH_HAS_OPP
22943e60861SMark Brown	bool
23043e60861SMark Brown
231e1f60b29SNishanth Menonconfig PM_OPP
232e1f60b29SNishanth Menon	bool "Operating Performance Point (OPP) Layer library"
23343e60861SMark Brown	depends on ARCH_HAS_OPP
234e1f60b29SNishanth Menon	---help---
235e1f60b29SNishanth Menon	  SOCs have a standard set of tuples consisting of frequency and
236e1f60b29SNishanth Menon	  voltage pairs that the device will support per voltage domain. This
237e1f60b29SNishanth Menon	  is called Operating Performance Point or OPP. The actual definitions
238e1f60b29SNishanth Menon	  of OPP varies over silicon within the same family of devices.
239e1f60b29SNishanth Menon
240e1f60b29SNishanth Menon	  OPP layer organizes the data internally using device pointers
241e1f60b29SNishanth Menon	  representing individual voltage domains and provides SOC
242e1f60b29SNishanth Menon	  implementations a ready to use framework to manage OPPs.
243e1f60b29SNishanth Menon	  For more information, read <file:Documentation/power/opp.txt>
244