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 305a2eb858SRafael J. Wysockiconfig PM_ADVANCED_DEBUG 315a2eb858SRafael J. Wysocki bool "Extra PM attributes in sysfs for low-level debugging/testing" 325a2eb858SRafael J. Wysocki depends on PM_DEBUG 335a2eb858SRafael J. Wysocki default n 345a2eb858SRafael J. Wysocki ---help--- 355a2eb858SRafael J. Wysocki Add extra sysfs attributes allowing one to access some Power Management 365a2eb858SRafael J. Wysocki fields of device objects from user space. If you are not a kernel 375a2eb858SRafael J. Wysocki developer interested in debugging/testing Power Management, say "no". 385a2eb858SRafael J. Wysocki 39a0349828SBen Collinsconfig PM_VERBOSE 40a0349828SBen Collins bool "Verbose Power Management debugging" 41a0349828SBen Collins depends on PM_DEBUG 42a0349828SBen Collins default n 43a0349828SBen Collins ---help--- 44a0349828SBen Collins This option enables verbose messages from the Power Management code. 451da177e4SLinus Torvalds 4690dda1cbSJohannes Bergconfig CAN_PM_TRACE 4790dda1cbSJohannes Berg def_bool y 4890dda1cbSJohannes Berg depends on PM_DEBUG && PM_SLEEP && EXPERIMENTAL 4990dda1cbSJohannes Berg 50eb71c87aSLinus Torvaldsconfig PM_TRACE 5190dda1cbSJohannes Berg bool 5290dda1cbSJohannes Berg help 5390dda1cbSJohannes Berg This enables code to save the last PM event point across 5490dda1cbSJohannes Berg reboot. The architecture needs to support this, x86 for 5590dda1cbSJohannes Berg example does by saving things in the RTC, see below. 5690dda1cbSJohannes Berg 5790dda1cbSJohannes Berg The architecture specific code must provide the extern 5890dda1cbSJohannes Berg functions from <linux/resume-trace.h> as well as the 5990dda1cbSJohannes Berg <asm/resume-trace.h> header with a TRACE_RESUME() macro. 6090dda1cbSJohannes Berg 6190dda1cbSJohannes Berg The way the information is presented is architecture- 6290dda1cbSJohannes Berg dependent, x86 will print the information during a 6390dda1cbSJohannes Berg late_initcall. 6490dda1cbSJohannes Berg 6590dda1cbSJohannes Bergconfig PM_TRACE_RTC 66eb71c87aSLinus Torvalds bool "Suspend/resume event tracing" 6790dda1cbSJohannes Berg depends on CAN_PM_TRACE 6890dda1cbSJohannes Berg depends on X86 6990dda1cbSJohannes Berg select PM_TRACE 705c31f273SAndrew Morton default n 71eb71c87aSLinus Torvalds ---help--- 72eb71c87aSLinus Torvalds This enables some cheesy code to save the last PM event point in the 73eb71c87aSLinus Torvalds RTC across reboots, so that you can debug a machine that just hangs 74eb71c87aSLinus Torvalds during suspend (or more commonly, during resume). 75eb71c87aSLinus Torvalds 7623b168d4SPavel Machek To use this debugging feature you should attempt to suspend the 7723b168d4SPavel Machek machine, reboot it and then run 785c31f273SAndrew Morton 795c31f273SAndrew Morton dmesg -s 1000000 | grep 'hash matches' 805c31f273SAndrew Morton 815c31f273SAndrew Morton CAUTION: this option will cause your machine's real-time clock to be 825c31f273SAndrew Morton set to an invalid time after a resume. 835c31f273SAndrew Morton 84f3de4be9SRafael J. Wysockiconfig PM_SLEEP_SMP 85296699deSRafael J. Wysocki bool 86801e4062SJohannes Berg depends on SMP 87f4cb5700SJohannes Berg depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE 88f3de4be9SRafael J. Wysocki depends on PM_SLEEP 89ede890c2SRafael J. Wysocki select HOTPLUG 90296699deSRafael J. Wysocki select HOTPLUG_CPU 91296699deSRafael J. Wysocki default y 92296699deSRafael J. Wysocki 93296699deSRafael J. Wysockiconfig PM_SLEEP 94296699deSRafael J. Wysocki bool 9593a0886eSJeremy Fitzhardinge depends on SUSPEND || HIBERNATION || XEN_SAVE_RESTORE 96296699deSRafael J. Wysocki default y 97296699deSRafael J. Wysocki 985a2eb858SRafael J. Wysockiconfig PM_SLEEP_ADVANCED_DEBUG 995a2eb858SRafael J. Wysocki bool 1005a2eb858SRafael J. Wysocki depends on PM_ADVANCED_DEBUG 1015a2eb858SRafael J. Wysocki default n 1025a2eb858SRafael J. Wysocki 103dd4c4f17SMatthew Garrettconfig SUSPEND_NVS 104dd4c4f17SMatthew Garrett bool 105dd4c4f17SMatthew Garrett 106296699deSRafael J. Wysockiconfig SUSPEND 107296699deSRafael J. Wysocki bool "Suspend to RAM and standby" 108f4cb5700SJohannes Berg depends on PM && ARCH_SUSPEND_POSSIBLE 109dd4c4f17SMatthew Garrett select SUSPEND_NVS if HAS_IOMEM 110296699deSRafael J. Wysocki default y 111296699deSRafael J. Wysocki ---help--- 112296699deSRafael J. Wysocki Allow the system to enter sleep states in which main memory is 113296699deSRafael J. Wysocki powered and thus its contents are preserved, such as the 114f4cb5700SJohannes Berg suspend-to-RAM state (e.g. the ACPI S3 state). 115296699deSRafael J. Wysocki 11677437fd4SDavid Brownellconfig PM_TEST_SUSPEND 11777437fd4SDavid Brownell bool "Test suspend/resume and wakealarm during bootup" 11828959742SAl Viro depends on SUSPEND && PM_DEBUG && RTC_CLASS=y 11977437fd4SDavid Brownell ---help--- 12077437fd4SDavid Brownell This option will let you suspend your machine during bootup, and 12177437fd4SDavid Brownell make it wake up a few seconds later using an RTC wakeup alarm. 12277437fd4SDavid Brownell Enable this with a kernel parameter like "test_suspend=mem". 12377437fd4SDavid Brownell 12477437fd4SDavid Brownell You probably want to have your system's RTC driver statically 12577437fd4SDavid Brownell linked, ensuring that it's available when this test runs. 12677437fd4SDavid Brownell 127b28f5081SJohannes Bergconfig SUSPEND_FREEZER 128b28f5081SJohannes Berg bool "Enable freezer for suspend to RAM/standby" \ 129b28f5081SJohannes Berg if ARCH_WANTS_FREEZER_CONTROL || BROKEN 130b28f5081SJohannes Berg depends on SUSPEND 131b28f5081SJohannes Berg default y 132b28f5081SJohannes Berg help 133b28f5081SJohannes Berg This allows you to turn off the freezer for suspend. If this is 134b28f5081SJohannes Berg done, no tasks are frozen for suspend to RAM/standby. 135b28f5081SJohannes Berg 136b28f5081SJohannes Berg Turning OFF this setting is NOT recommended! If in doubt, say Y. 137b28f5081SJohannes Berg 138b0cb1a19SRafael J. Wysockiconfig HIBERNATION 139296699deSRafael J. Wysocki bool "Hibernation (aka 'suspend to disk')" 140801e4062SJohannes Berg depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE 141f996fc96SBojan Smojver select LZO_COMPRESS 142f996fc96SBojan Smojver select LZO_DECOMPRESS 143dd4c4f17SMatthew Garrett select SUSPEND_NVS if HAS_IOMEM 1441da177e4SLinus Torvalds ---help--- 145a7ee2e5fSDavid Brownell Enable the suspend to disk (STD) functionality, which is usually 146a7ee2e5fSDavid Brownell called "hibernation" in user interfaces. STD checkpoints the 147a7ee2e5fSDavid Brownell system and powers it off; and restores that checkpoint on reboot. 1481da177e4SLinus Torvalds 14923b168d4SPavel Machek You can suspend your machine with 'echo disk > /sys/power/state' 15023b168d4SPavel Machek after placing resume=/dev/swappartition on the kernel command line 15123b168d4SPavel Machek in your bootloader's configuration file. 15223b168d4SPavel Machek 153c7276fdeSRafael J. Wysocki Alternatively, you can use the additional userland tools available 154c7276fdeSRafael J. Wysocki from <http://suspend.sf.net>. 155c7276fdeSRafael J. Wysocki 156c7276fdeSRafael J. Wysocki In principle it does not require ACPI or APM, although for example 157a7ee2e5fSDavid Brownell ACPI will be used for the final steps when it is available. One 158a7ee2e5fSDavid Brownell of the reasons to use software suspend is that the firmware hooks 159a7ee2e5fSDavid Brownell for suspend states like suspend-to-RAM (STR) often don't work very 160a7ee2e5fSDavid Brownell well with Linux. 161c7276fdeSRafael J. Wysocki 162c7276fdeSRafael J. Wysocki It creates an image which is saved in your active swap. Upon the next 1631da177e4SLinus Torvalds boot, pass the 'resume=/dev/swappartition' argument to the kernel to 1641da177e4SLinus Torvalds have it detect the saved image, restore memory state from it, and 1651da177e4SLinus Torvalds continue to run as before. If you do not want the previous state to 166c7276fdeSRafael J. Wysocki be reloaded, then use the 'noresume' kernel command line argument. 167c7276fdeSRafael J. Wysocki Note, however, that fsck will be run on your filesystems and you will 168c7276fdeSRafael J. Wysocki need to run mkswap against the swap partition used for the suspend. 1691da177e4SLinus Torvalds 170c7276fdeSRafael J. Wysocki It also works with swap files to a limited extent (for details see 171c7276fdeSRafael J. Wysocki <file:Documentation/power/swsusp-and-swap-files.txt>). 172c7276fdeSRafael J. Wysocki 173c7276fdeSRafael J. Wysocki Right now you may boot without resuming and resume later but in the 174c7276fdeSRafael J. Wysocki meantime you cannot use the swap partition(s)/file(s) involved in 175c7276fdeSRafael J. Wysocki suspending. Also in this case you must not use the filesystems 176c7276fdeSRafael J. Wysocki that were mounted before the suspend. In particular, you MUST NOT 177c7276fdeSRafael J. Wysocki MOUNT any journaled filesystems mounted before the suspend or they 178c7276fdeSRafael J. Wysocki will get corrupted in a nasty way. 1791da177e4SLinus Torvalds 1801da177e4SLinus Torvalds For more information take a look at <file:Documentation/power/swsusp.txt>. 1811da177e4SLinus Torvalds 1821da177e4SLinus Torvaldsconfig PM_STD_PARTITION 1831da177e4SLinus Torvalds string "Default resume partition" 184b0cb1a19SRafael J. Wysocki depends on HIBERNATION 1851da177e4SLinus Torvalds default "" 1861da177e4SLinus Torvalds ---help--- 1871da177e4SLinus Torvalds The default resume partition is the partition that the suspend- 1881da177e4SLinus Torvalds to-disk implementation will look for a suspended disk image. 1891da177e4SLinus Torvalds 1901da177e4SLinus Torvalds The partition specified here will be different for almost every user. 1911da177e4SLinus Torvalds It should be a valid swap partition (at least for now) that is turned 1921da177e4SLinus Torvalds on before suspending. 1931da177e4SLinus Torvalds 1941da177e4SLinus Torvalds The partition specified can be overridden by specifying: 1951da177e4SLinus Torvalds 1961da177e4SLinus Torvalds resume=/dev/<other device> 1971da177e4SLinus Torvalds 1981da177e4SLinus Torvalds which will set the resume partition to the device specified. 1991da177e4SLinus Torvalds 2001da177e4SLinus Torvalds Note there is currently not a way to specify which device to save the 2011da177e4SLinus Torvalds suspended image to. It will simply pick the first available swap 2021da177e4SLinus Torvalds device. 2031da177e4SLinus Torvalds 2047726942fSRalf Baechleconfig APM_EMULATION 2057726942fSRalf Baechle tristate "Advanced Power Management Emulation" 2067726942fSRalf Baechle depends on PM && SYS_SUPPORTS_APM_EMULATION 2077726942fSRalf Baechle help 2087726942fSRalf Baechle APM is a BIOS specification for saving power using several different 2097726942fSRalf Baechle techniques. This is mostly useful for battery powered laptops with 2107726942fSRalf Baechle APM compliant BIOSes. If you say Y here, the system time will be 2117726942fSRalf Baechle reset after a RESUME operation, the /proc/apm device will provide 2127726942fSRalf Baechle battery status information, and user-space programs will receive 2137726942fSRalf Baechle notification of APM "events" (e.g. battery status change). 2147726942fSRalf Baechle 2157726942fSRalf Baechle In order to use APM, you will need supporting software. For location 21653471121SRandy Dunlap and more information, read <file:Documentation/power/pm.txt> and the 2177726942fSRalf Baechle Battery Powered Linux mini-HOWTO, available from 2187726942fSRalf Baechle <http://www.tldp.org/docs.html#howto>. 2197726942fSRalf Baechle 2207726942fSRalf Baechle This driver does not spin down disk drives (see the hdparm(8) 2217726942fSRalf Baechle manpage ("man 8 hdparm") for that), and it doesn't turn off 2227726942fSRalf Baechle VESA-compliant "green" monitors. 2237726942fSRalf Baechle 2247726942fSRalf Baechle Generally, if you don't have a battery in your machine, there isn't 2257726942fSRalf Baechle much point in using this driver and you should say N. If you get 2267726942fSRalf Baechle random kernel OOPSes or reboots that don't seem to be related to 2277726942fSRalf Baechle anything, try disabling/enabling this option (or disabling/enabling 2287726942fSRalf Baechle APM in your BIOS). 2295e928f77SRafael J. Wysocki 2305e928f77SRafael J. Wysockiconfig PM_RUNTIME 2315e928f77SRafael J. Wysocki bool "Run-time PM core functionality" 2325e928f77SRafael J. Wysocki depends on PM 2335e928f77SRafael J. Wysocki ---help--- 2345e928f77SRafael J. Wysocki Enable functionality allowing I/O devices to be put into energy-saving 2355e928f77SRafael J. Wysocki (low power) states at run time (or autosuspended) after a specified 2365e928f77SRafael J. Wysocki period of inactivity and woken up in response to a hardware-generated 2375e928f77SRafael J. Wysocki wake-up event or a driver's request. 2385e928f77SRafael J. Wysocki 2395e928f77SRafael J. Wysocki Hardware support is generally required for this functionality to work 2405e928f77SRafael J. Wysocki and the bus type drivers of the buses the devices are on are 2415e928f77SRafael J. Wysocki responsible for the actual handling of the autosuspend requests and 2425e928f77SRafael J. Wysocki wake-up events. 2436cbf8214SRafael J. Wysocki 2446cbf8214SRafael J. Wysockiconfig PM_OPS 2456cbf8214SRafael J. Wysocki bool 2466cbf8214SRafael J. Wysocki depends on PM_SLEEP || PM_RUNTIME 2476cbf8214SRafael J. Wysocki default y 248e1f60b29SNishanth Menon 249*43e60861SMark Brownconfig ARCH_HAS_OPP 250*43e60861SMark Brown bool 251*43e60861SMark Brown 252e1f60b29SNishanth Menonconfig PM_OPP 253e1f60b29SNishanth Menon bool "Operating Performance Point (OPP) Layer library" 254e1f60b29SNishanth Menon depends on PM 255*43e60861SMark Brown depends on ARCH_HAS_OPP 256e1f60b29SNishanth Menon ---help--- 257e1f60b29SNishanth Menon SOCs have a standard set of tuples consisting of frequency and 258e1f60b29SNishanth Menon voltage pairs that the device will support per voltage domain. This 259e1f60b29SNishanth Menon is called Operating Performance Point or OPP. The actual definitions 260e1f60b29SNishanth Menon of OPP varies over silicon within the same family of devices. 261e1f60b29SNishanth Menon 262e1f60b29SNishanth Menon OPP layer organizes the data internally using device pointers 263e1f60b29SNishanth Menon representing individual voltage domains and provides SOC 264e1f60b29SNishanth Menon implementations a ready to use framework to manage OPPs. 265e1f60b29SNishanth Menon For more information, read <file:Documentation/power/opp.txt> 266