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 212fd77fffSLen Brownconfig SUSPEND_SKIP_SYNC 222fd77fffSLen Brown bool "Skip kernel's sys_sync() on suspend to RAM/standby" 232fd77fffSLen Brown depends on SUSPEND 242fd77fffSLen Brown depends on EXPERT 252fd77fffSLen Brown help 262fd77fffSLen Brown Skip the kernel sys_sync() before freezing user processes. 272fd77fffSLen Brown Some systems prefer not to pay this cost on every invocation 282fd77fffSLen Brown of suspend, or they are content with invoking sync() from 292fd77fffSLen Brown user-space before invoking suspend. Say Y if that's your case. 302fd77fffSLen Brown 311f112ceeSRafael J. Wysockiconfig HIBERNATE_CALLBACKS 321f112ceeSRafael J. Wysocki bool 331f112ceeSRafael J. Wysocki 34b0cb1a19SRafael J. Wysockiconfig HIBERNATION 35296699deSRafael J. Wysocki bool "Hibernation (aka 'suspend to disk')" 361eb208aeSRafael J. Wysocki depends on SWAP && ARCH_HIBERNATION_POSSIBLE 371f112ceeSRafael J. Wysocki select HIBERNATE_CALLBACKS 38f996fc96SBojan Smojver select LZO_COMPRESS 39f996fc96SBojan Smojver select LZO_DECOMPRESS 40081a9d04SBojan Smojver select CRC32 411da177e4SLinus Torvalds ---help--- 42a7ee2e5fSDavid Brownell Enable the suspend to disk (STD) functionality, which is usually 43a7ee2e5fSDavid Brownell called "hibernation" in user interfaces. STD checkpoints the 44a7ee2e5fSDavid Brownell system and powers it off; and restores that checkpoint on reboot. 451da177e4SLinus Torvalds 4623b168d4SPavel Machek You can suspend your machine with 'echo disk > /sys/power/state' 4723b168d4SPavel Machek after placing resume=/dev/swappartition on the kernel command line 4823b168d4SPavel Machek in your bootloader's configuration file. 4923b168d4SPavel Machek 50c7276fdeSRafael J. Wysocki Alternatively, you can use the additional userland tools available 51c7276fdeSRafael J. Wysocki from <http://suspend.sf.net>. 52c7276fdeSRafael J. Wysocki 53c7276fdeSRafael J. Wysocki In principle it does not require ACPI or APM, although for example 54a7ee2e5fSDavid Brownell ACPI will be used for the final steps when it is available. One 55a7ee2e5fSDavid Brownell of the reasons to use software suspend is that the firmware hooks 56a7ee2e5fSDavid Brownell for suspend states like suspend-to-RAM (STR) often don't work very 57a7ee2e5fSDavid Brownell well with Linux. 58c7276fdeSRafael J. Wysocki 59c7276fdeSRafael J. Wysocki It creates an image which is saved in your active swap. Upon the next 601da177e4SLinus Torvalds boot, pass the 'resume=/dev/swappartition' argument to the kernel to 611da177e4SLinus Torvalds have it detect the saved image, restore memory state from it, and 621da177e4SLinus Torvalds continue to run as before. If you do not want the previous state to 63c7276fdeSRafael J. Wysocki be reloaded, then use the 'noresume' kernel command line argument. 64c7276fdeSRafael J. Wysocki Note, however, that fsck will be run on your filesystems and you will 65c7276fdeSRafael J. Wysocki need to run mkswap against the swap partition used for the suspend. 661da177e4SLinus Torvalds 67c7276fdeSRafael J. Wysocki It also works with swap files to a limited extent (for details see 68*151f4e2bSMauro Carvalho Chehab <file:Documentation/power/swsusp-and-swap-files.rst>). 69c7276fdeSRafael J. Wysocki 70c7276fdeSRafael J. Wysocki Right now you may boot without resuming and resume later but in the 71c7276fdeSRafael J. Wysocki meantime you cannot use the swap partition(s)/file(s) involved in 72c7276fdeSRafael J. Wysocki suspending. Also in this case you must not use the filesystems 73c7276fdeSRafael J. Wysocki that were mounted before the suspend. In particular, you MUST NOT 74c7276fdeSRafael J. Wysocki MOUNT any journaled filesystems mounted before the suspend or they 75c7276fdeSRafael J. Wysocki will get corrupted in a nasty way. 761da177e4SLinus Torvalds 77*151f4e2bSMauro Carvalho Chehab For more information take a look at <file:Documentation/power/swsusp.rst>. 781da177e4SLinus Torvalds 7985055dd8SMartin Schwidefskyconfig ARCH_SAVE_PAGE_KEYS 8085055dd8SMartin Schwidefsky bool 8185055dd8SMartin Schwidefsky 821da177e4SLinus Torvaldsconfig PM_STD_PARTITION 831da177e4SLinus Torvalds string "Default resume partition" 84b0cb1a19SRafael J. Wysocki depends on HIBERNATION 851da177e4SLinus Torvalds default "" 861da177e4SLinus Torvalds ---help--- 871da177e4SLinus Torvalds The default resume partition is the partition that the suspend- 881da177e4SLinus Torvalds to-disk implementation will look for a suspended disk image. 891da177e4SLinus Torvalds 901da177e4SLinus Torvalds The partition specified here will be different for almost every user. 911da177e4SLinus Torvalds It should be a valid swap partition (at least for now) that is turned 921da177e4SLinus Torvalds on before suspending. 931da177e4SLinus Torvalds 941da177e4SLinus Torvalds The partition specified can be overridden by specifying: 951da177e4SLinus Torvalds 961da177e4SLinus Torvalds resume=/dev/<other device> 971da177e4SLinus Torvalds 981da177e4SLinus Torvalds which will set the resume partition to the device specified. 991da177e4SLinus Torvalds 1001da177e4SLinus Torvalds Note there is currently not a way to specify which device to save the 1011da177e4SLinus Torvalds suspended image to. It will simply pick the first available swap 1021da177e4SLinus Torvalds device. 1031da177e4SLinus Torvalds 104196ec243SRafael J. Wysockiconfig PM_SLEEP 105cf4fb80cSJan Beulich def_bool y 106d419e4c0SShriram Rajagopalan depends on SUSPEND || HIBERNATE_CALLBACKS 107464ed18eSRafael J. Wysocki select PM 1083df6f61fSzhangyi (F) select SRCU 109196ec243SRafael J. Wysocki 110196ec243SRafael J. Wysockiconfig PM_SLEEP_SMP 111cf4fb80cSJan Beulich def_bool y 112196ec243SRafael J. Wysocki depends on SMP 113196ec243SRafael J. Wysocki depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE 114196ec243SRafael J. Wysocki depends on PM_SLEEP 115196ec243SRafael J. Wysocki select HOTPLUG_CPU 116196ec243SRafael J. Wysocki 1179ca12ac0SNicholas Pigginconfig PM_SLEEP_SMP_NONZERO_CPU 1189ca12ac0SNicholas Piggin def_bool y 1199ca12ac0SNicholas Piggin depends on PM_SLEEP_SMP 1209ca12ac0SNicholas Piggin depends on ARCH_SUSPEND_NONZERO_CPU 1219ca12ac0SNicholas Piggin ---help--- 1229ca12ac0SNicholas Piggin If an arch can suspend (for suspend, hibernate, kexec, etc) on a 1239ca12ac0SNicholas Piggin non-zero numbered CPU, it may define ARCH_SUSPEND_NONZERO_CPU. This 1249ca12ac0SNicholas Piggin will allow nohz_full mask to include CPU0. 1259ca12ac0SNicholas Piggin 1267483b4a4SRafael J. Wysockiconfig PM_AUTOSLEEP 1277483b4a4SRafael J. Wysocki bool "Opportunistic sleep" 1287483b4a4SRafael J. Wysocki depends on PM_SLEEP 1297483b4a4SRafael J. Wysocki default n 1307483b4a4SRafael J. Wysocki ---help--- 1317483b4a4SRafael J. Wysocki Allow the kernel to trigger a system transition into a global sleep 1327483b4a4SRafael J. Wysocki state automatically whenever there are no active wakeup sources. 1337483b4a4SRafael J. Wysocki 134b86ff982SRafael J. Wysockiconfig PM_WAKELOCKS 135b86ff982SRafael J. Wysocki bool "User space wakeup sources interface" 136b86ff982SRafael J. Wysocki depends on PM_SLEEP 137b86ff982SRafael J. Wysocki default n 138b86ff982SRafael J. Wysocki ---help--- 139b86ff982SRafael J. Wysocki Allow user space to create, activate and deactivate wakeup source 140b86ff982SRafael J. Wysocki objects with the help of a sysfs-based interface. 141b86ff982SRafael J. Wysocki 142c73893e2SRafael J. Wysockiconfig PM_WAKELOCKS_LIMIT 143c73893e2SRafael J. Wysocki int "Maximum number of user space wakeup sources (0 = no limit)" 144c73893e2SRafael J. Wysocki range 0 100000 145c73893e2SRafael J. Wysocki default 100 146c73893e2SRafael J. Wysocki depends on PM_WAKELOCKS 147c73893e2SRafael J. Wysocki 1484e585d25SRafael J. Wysockiconfig PM_WAKELOCKS_GC 1494e585d25SRafael J. Wysocki bool "Garbage collector for user space wakeup sources" 1504e585d25SRafael J. Wysocki depends on PM_WAKELOCKS 1514e585d25SRafael J. Wysocki default y 1524e585d25SRafael J. Wysocki 153464ed18eSRafael J. Wysockiconfig PM 154464ed18eSRafael J. Wysocki bool "Device power management core functionality" 155196ec243SRafael J. Wysocki ---help--- 156196ec243SRafael J. Wysocki Enable functionality allowing I/O devices to be put into energy-saving 157464ed18eSRafael J. Wysocki (low power) states, for example after a specified period of inactivity 158464ed18eSRafael J. Wysocki (autosuspended), and woken up in response to a hardware-generated 159196ec243SRafael J. Wysocki wake-up event or a driver's request. 160196ec243SRafael J. Wysocki 161196ec243SRafael J. Wysocki Hardware support is generally required for this functionality to work 162196ec243SRafael J. Wysocki and the bus type drivers of the buses the devices are on are 163464ed18eSRafael J. Wysocki responsible for the actual handling of device suspend requests and 164196ec243SRafael J. Wysocki wake-up events. 165196ec243SRafael J. Wysocki 166196ec243SRafael J. Wysockiconfig PM_DEBUG 167196ec243SRafael J. Wysocki bool "Power Management Debug Support" 168196ec243SRafael J. Wysocki depends on PM 169196ec243SRafael J. Wysocki ---help--- 170196ec243SRafael J. Wysocki This option enables various debugging support in the Power Management 171196ec243SRafael J. Wysocki code. This is helpful when debugging and reporting PM bugs, like 172196ec243SRafael J. Wysocki suspend support. 173196ec243SRafael J. Wysocki 174196ec243SRafael J. Wysockiconfig PM_ADVANCED_DEBUG 175196ec243SRafael J. Wysocki bool "Extra PM attributes in sysfs for low-level debugging/testing" 176196ec243SRafael J. Wysocki depends on PM_DEBUG 177196ec243SRafael J. Wysocki ---help--- 178196ec243SRafael J. Wysocki Add extra sysfs attributes allowing one to access some Power Management 179196ec243SRafael J. Wysocki fields of device objects from user space. If you are not a kernel 180196ec243SRafael J. Wysocki developer interested in debugging/testing Power Management, say "no". 181196ec243SRafael J. Wysocki 182196ec243SRafael J. Wysockiconfig PM_TEST_SUSPEND 183196ec243SRafael J. Wysocki bool "Test suspend/resume and wakealarm during bootup" 184196ec243SRafael J. Wysocki depends on SUSPEND && PM_DEBUG && RTC_CLASS=y 185196ec243SRafael J. Wysocki ---help--- 186196ec243SRafael J. Wysocki This option will let you suspend your machine during bootup, and 187196ec243SRafael J. Wysocki make it wake up a few seconds later using an RTC wakeup alarm. 188196ec243SRafael J. Wysocki Enable this with a kernel parameter like "test_suspend=mem". 189196ec243SRafael J. Wysocki 190196ec243SRafael J. Wysocki You probably want to have your system's RTC driver statically 191196ec243SRafael J. Wysocki linked, ensuring that it's available when this test runs. 192196ec243SRafael J. Wysocki 193b2df1d4fSRafael J. Wysockiconfig PM_SLEEP_DEBUG 194196ec243SRafael J. Wysocki def_bool y 19588a6f33eSRafael J. Wysocki depends on PM_DEBUG && PM_SLEEP 196196ec243SRafael J. Wysocki 19770fea60dSBenoit Gobyconfig DPM_WATCHDOG 19870fea60dSBenoit Goby bool "Device suspend/resume watchdog" 1995b3f249cSChen Yu depends on PM_DEBUG && PSTORE && EXPERT 20070fea60dSBenoit Goby ---help--- 20170fea60dSBenoit Goby Sets up a watchdog timer to capture drivers that are 20270fea60dSBenoit Goby locked up attempting to suspend/resume a device. 20370fea60dSBenoit Goby A detected lockup causes system panic with message 20470fea60dSBenoit Goby captured in pstore device for inspection in subsequent 20570fea60dSBenoit Goby boot session. 20670fea60dSBenoit Goby 20770fea60dSBenoit Gobyconfig DPM_WATCHDOG_TIMEOUT 20870fea60dSBenoit Goby int "Watchdog timeout in seconds" 20970fea60dSBenoit Goby range 1 120 2105b3f249cSChen Yu default 120 21170fea60dSBenoit Goby depends on DPM_WATCHDOG 21270fea60dSBenoit Goby 213196ec243SRafael J. Wysockiconfig PM_TRACE 214196ec243SRafael J. Wysocki bool 215196ec243SRafael J. Wysocki help 216196ec243SRafael J. Wysocki This enables code to save the last PM event point across 217196ec243SRafael J. Wysocki reboot. The architecture needs to support this, x86 for 218196ec243SRafael J. Wysocki example does by saving things in the RTC, see below. 219196ec243SRafael J. Wysocki 220196ec243SRafael J. Wysocki The architecture specific code must provide the extern 221196ec243SRafael J. Wysocki functions from <linux/resume-trace.h> as well as the 222196ec243SRafael J. Wysocki <asm/resume-trace.h> header with a TRACE_RESUME() macro. 223196ec243SRafael J. Wysocki 224196ec243SRafael J. Wysocki The way the information is presented is architecture- 225196ec243SRafael J. Wysocki dependent, x86 will print the information during a 226196ec243SRafael J. Wysocki late_initcall. 227196ec243SRafael J. Wysocki 228196ec243SRafael J. Wysockiconfig PM_TRACE_RTC 229196ec243SRafael J. Wysocki bool "Suspend/resume event tracing" 230b2df1d4fSRafael J. Wysocki depends on PM_SLEEP_DEBUG 231196ec243SRafael J. Wysocki depends on X86 232196ec243SRafael J. Wysocki select PM_TRACE 233196ec243SRafael J. Wysocki ---help--- 234196ec243SRafael J. Wysocki This enables some cheesy code to save the last PM event point in the 235196ec243SRafael J. Wysocki RTC across reboots, so that you can debug a machine that just hangs 236196ec243SRafael J. Wysocki during suspend (or more commonly, during resume). 237196ec243SRafael J. Wysocki 238196ec243SRafael J. Wysocki To use this debugging feature you should attempt to suspend the 239196ec243SRafael J. Wysocki machine, reboot it and then run 240196ec243SRafael J. Wysocki 241196ec243SRafael J. Wysocki dmesg -s 1000000 | grep 'hash matches' 242196ec243SRafael J. Wysocki 243196ec243SRafael J. Wysocki CAUTION: this option will cause your machine's real-time clock to be 244196ec243SRafael J. Wysocki set to an invalid time after a resume. 245196ec243SRafael J. Wysocki 2467726942fSRalf Baechleconfig APM_EMULATION 2477726942fSRalf Baechle tristate "Advanced Power Management Emulation" 248993e9fe1SArnd Bergmann depends on SYS_SUPPORTS_APM_EMULATION 2497726942fSRalf Baechle help 2507726942fSRalf Baechle APM is a BIOS specification for saving power using several different 2517726942fSRalf Baechle techniques. This is mostly useful for battery powered laptops with 2527726942fSRalf Baechle APM compliant BIOSes. If you say Y here, the system time will be 2537726942fSRalf Baechle reset after a RESUME operation, the /proc/apm device will provide 2547726942fSRalf Baechle battery status information, and user-space programs will receive 2557726942fSRalf Baechle notification of APM "events" (e.g. battery status change). 2567726942fSRalf Baechle 2577726942fSRalf Baechle In order to use APM, you will need supporting software. For location 258*151f4e2bSMauro Carvalho Chehab and more information, read <file:Documentation/power/apm-acpi.rst> 2592dc98fd3SMichael Witten and the Battery Powered Linux mini-HOWTO, available from 2607726942fSRalf Baechle <http://www.tldp.org/docs.html#howto>. 2617726942fSRalf Baechle 2627726942fSRalf Baechle This driver does not spin down disk drives (see the hdparm(8) 2637726942fSRalf Baechle manpage ("man 8 hdparm") for that), and it doesn't turn off 2647726942fSRalf Baechle VESA-compliant "green" monitors. 2657726942fSRalf Baechle 2667726942fSRalf Baechle Generally, if you don't have a battery in your machine, there isn't 2677726942fSRalf Baechle much point in using this driver and you should say N. If you get 2687726942fSRalf Baechle random kernel OOPSes or reboots that don't seem to be related to 2697726942fSRalf Baechle anything, try disabling/enabling this option (or disabling/enabling 2707726942fSRalf Baechle APM in your BIOS). 2715e928f77SRafael J. Wysocki 272b7b95920SRafael J. Wysockiconfig PM_CLK 27385eb8c8dSRafael J. Wysocki def_bool y 274b7b95920SRafael J. Wysocki depends on PM && HAVE_CLK 275f721889fSRafael J. Wysocki 276f721889fSRafael J. Wysockiconfig PM_GENERIC_DOMAINS 277f721889fSRafael J. Wysocki bool 278f721889fSRafael J. Wysocki depends on PM 27917f2ae7fSRafael J. Wysocki 280cee22a15SViresh Kumarconfig WQ_POWER_EFFICIENT_DEFAULT 281cee22a15SViresh Kumar bool "Enable workqueue power-efficient mode by default" 282cee22a15SViresh Kumar depends on PM 283cee22a15SViresh Kumar default n 284cee22a15SViresh Kumar help 285cee22a15SViresh Kumar Per-cpu workqueues are generally preferred because they show 286cee22a15SViresh Kumar better performance thanks to cache locality; unfortunately, 287cee22a15SViresh Kumar per-cpu workqueues tend to be more power hungry than unbound 288cee22a15SViresh Kumar workqueues. 289cee22a15SViresh Kumar 290cee22a15SViresh Kumar Enabling workqueue.power_efficient kernel parameter makes the 291cee22a15SViresh Kumar per-cpu workqueues which were observed to contribute 292cee22a15SViresh Kumar significantly to power consumption unbound, leading to measurably 293cee22a15SViresh Kumar lower power usage at the cost of small performance overhead. 294cee22a15SViresh Kumar 295cee22a15SViresh Kumar This config option determines whether workqueue.power_efficient 296cee22a15SViresh Kumar is enabled by default. 297cee22a15SViresh Kumar 298cee22a15SViresh Kumar If in doubt, say N. 299cee22a15SViresh Kumar 30077f827deSRafael J. Wysockiconfig PM_GENERIC_DOMAINS_SLEEP 30177f827deSRafael J. Wysocki def_bool y 30277f827deSRafael J. Wysocki depends on PM_SLEEP && PM_GENERIC_DOMAINS 30377f827deSRafael J. Wysocki 304aa42240aSTomasz Figaconfig PM_GENERIC_DOMAINS_OF 305aa42240aSTomasz Figa def_bool y 306a4a8c2c4STomasz Figa depends on PM_GENERIC_DOMAINS && OF 307aa42240aSTomasz Figa 308ab10023eSColin Crossconfig CPU_PM 309ab10023eSColin Cross bool 31027871f7aSQuentin Perret 31127871f7aSQuentin Perretconfig ENERGY_MODEL 31227871f7aSQuentin Perret bool "Energy Model for CPUs" 31327871f7aSQuentin Perret depends on SMP 31427871f7aSQuentin Perret depends on CPU_FREQ 31527871f7aSQuentin Perret default n 31627871f7aSQuentin Perret help 31727871f7aSQuentin Perret Several subsystems (thermal and/or the task scheduler for example) 31827871f7aSQuentin Perret can leverage information about the energy consumed by CPUs to make 31927871f7aSQuentin Perret smarter decisions. This config option enables the framework from 32027871f7aSQuentin Perret which subsystems can access the energy models. 32127871f7aSQuentin Perret 32227871f7aSQuentin Perret The exact usage of the energy model is subsystem-dependent. 32327871f7aSQuentin Perret 32427871f7aSQuentin Perret If in doubt, say N. 325