xref: /linux-6.15/kernel/power/Kconfig (revision c8eb8b40)
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
22bca73e4bSJeff Garzikconfig PM_LEGACY
23bca73e4bSJeff Garzik	bool "Legacy Power Management API"
24bca73e4bSJeff Garzik	depends on PM
25bca73e4bSJeff Garzik	default y
26bca73e4bSJeff Garzik	---help---
27bca73e4bSJeff Garzik	   Support for pm_register() and friends.
28bca73e4bSJeff Garzik
29bca73e4bSJeff Garzik	   If unsure, say Y.
30bca73e4bSJeff Garzik
311da177e4SLinus Torvaldsconfig PM_DEBUG
321da177e4SLinus Torvalds	bool "Power Management Debug Support"
331da177e4SLinus Torvalds	depends on PM
341da177e4SLinus Torvalds	---help---
351da177e4SLinus Torvalds	This option enables verbose debugging support in the Power Management
361da177e4SLinus Torvalds	code. This is helpful when debugging and reporting various PM bugs,
371da177e4SLinus Torvalds	like suspend support.
381da177e4SLinus Torvalds
39*c8eb8b40SRafael J. Wysockiconfig DISABLE_CONSOLE_SUSPEND
40*c8eb8b40SRafael J. Wysocki	bool "Keep console(s) enabled during suspend/resume (DANGEROUS)"
41*c8eb8b40SRafael J. Wysocki	depends on PM && PM_DEBUG
42*c8eb8b40SRafael J. Wysocki	default n
43*c8eb8b40SRafael J. Wysocki	---help---
44*c8eb8b40SRafael J. Wysocki	This option turns off the console suspend mechanism that prevents
45*c8eb8b40SRafael J. Wysocki	debug messages from reaching the console during the suspend/resume
46*c8eb8b40SRafael J. Wysocki	operations.  This may be helpful when debugging device drivers'
47*c8eb8b40SRafael J. Wysocki	suspend/resume routines, but may itself lead to problems, for example
48*c8eb8b40SRafael J. Wysocki	if netconsole is used.
49*c8eb8b40SRafael J. Wysocki
50eb71c87aSLinus Torvaldsconfig PM_TRACE
51eb71c87aSLinus Torvalds	bool "Suspend/resume event tracing"
525c31f273SAndrew Morton	depends on PM && PM_DEBUG && X86_32 && EXPERIMENTAL
535c31f273SAndrew Morton	default n
54eb71c87aSLinus Torvalds	---help---
55eb71c87aSLinus Torvalds	This enables some cheesy code to save the last PM event point in the
56eb71c87aSLinus Torvalds	RTC across reboots, so that you can debug a machine that just hangs
57eb71c87aSLinus Torvalds	during suspend (or more commonly, during resume).
58eb71c87aSLinus Torvalds
595c31f273SAndrew Morton	To use this debugging feature you should attempt to suspend the machine,
605c31f273SAndrew Morton	then reboot it, then run
615c31f273SAndrew Morton
625c31f273SAndrew Morton		dmesg -s 1000000 | grep 'hash matches'
635c31f273SAndrew Morton
645c31f273SAndrew Morton	CAUTION: this option will cause your machine's real-time clock to be
655c31f273SAndrew Morton	set to an invalid time after a resume.
665c31f273SAndrew Morton
675c31f273SAndrew Morton
681da177e4SLinus Torvaldsconfig SOFTWARE_SUSPEND
6919c32439SPavel Machek	bool "Software Suspend"
70471b40d0SPavel Machek	depends on PM && SWAP && ((X86 && (!SMP || SUSPEND_SMP) && !X86_PAE) || ((FRV || PPC32) && !SMP))
711da177e4SLinus Torvalds	---help---
721da177e4SLinus Torvalds	  Enable the possibility of suspending the machine.
733e6e952dSAdrian Bunk	  It doesn't need ACPI or APM.
741da177e4SLinus Torvalds	  You may suspend your machine by 'swsusp' or 'shutdown -z <time>'
751da177e4SLinus Torvalds	  (patch for sysvinit needed).
761da177e4SLinus Torvalds
771da177e4SLinus Torvalds	  It creates an image which is saved in your active swap. Upon next
781da177e4SLinus Torvalds	  boot, pass the 'resume=/dev/swappartition' argument to the kernel to
791da177e4SLinus Torvalds	  have it detect the saved image, restore memory state from it, and
801da177e4SLinus Torvalds	  continue to run as before. If you do not want the previous state to
811da177e4SLinus Torvalds	  be reloaded, then use the 'noresume' kernel argument. However, note
821da177e4SLinus Torvalds	  that your partitions will be fsck'd and you must re-mkswap your swap
831da177e4SLinus Torvalds	  partitions. It does not work with swap files.
841da177e4SLinus Torvalds
851da177e4SLinus Torvalds	  Right now you may boot without resuming and then later resume but
861da177e4SLinus Torvalds	  in meantime you cannot use those swap partitions/files which were
871da177e4SLinus Torvalds	  involved in suspending. Also in this case there is a risk that buffers
881da177e4SLinus Torvalds	  on disk won't match with saved ones.
891da177e4SLinus Torvalds
901da177e4SLinus Torvalds	  For more information take a look at <file:Documentation/power/swsusp.txt>.
911da177e4SLinus Torvalds
92471b40d0SPavel Machek	  (For now, swsusp is incompatible with PAE aka HIGHMEM_64G on i386.
93471b40d0SPavel Machek	  we need identity mapping for resume to work, and that is trivial
94471b40d0SPavel Machek	  to get with 4MB pages, but less than trivial on PAE).
95471b40d0SPavel Machek
961da177e4SLinus Torvaldsconfig PM_STD_PARTITION
971da177e4SLinus Torvalds	string "Default resume partition"
981da177e4SLinus Torvalds	depends on SOFTWARE_SUSPEND
991da177e4SLinus Torvalds	default ""
1001da177e4SLinus Torvalds	---help---
1011da177e4SLinus Torvalds	  The default resume partition is the partition that the suspend-
1021da177e4SLinus Torvalds	  to-disk implementation will look for a suspended disk image.
1031da177e4SLinus Torvalds
1041da177e4SLinus Torvalds	  The partition specified here will be different for almost every user.
1051da177e4SLinus Torvalds	  It should be a valid swap partition (at least for now) that is turned
1061da177e4SLinus Torvalds	  on before suspending.
1071da177e4SLinus Torvalds
1081da177e4SLinus Torvalds	  The partition specified can be overridden by specifying:
1091da177e4SLinus Torvalds
1101da177e4SLinus Torvalds		resume=/dev/<other device>
1111da177e4SLinus Torvalds
1121da177e4SLinus Torvalds	  which will set the resume partition to the device specified.
1131da177e4SLinus Torvalds
1141da177e4SLinus Torvalds	  Note there is currently not a way to specify which device to save the
1151da177e4SLinus Torvalds	  suspended image to. It will simply pick the first available swap
1161da177e4SLinus Torvalds	  device.
1171da177e4SLinus Torvalds
1185a72e04dSLi Shaohuaconfig SUSPEND_SMP
1195a72e04dSLi Shaohua	bool
1205a72e04dSLi Shaohua	depends on HOTPLUG_CPU && X86 && PM
1215a72e04dSLi Shaohua	default y
122