lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | config SUSPEND |
| 2 | bool "Suspend to RAM and standby" |
| 3 | depends on ARCH_SUSPEND_POSSIBLE |
| 4 | default y |
| 5 | ---help--- |
| 6 | Allow the system to enter sleep states in which main memory is |
| 7 | powered and thus its contents are preserved, such as the |
| 8 | suspend-to-RAM state (e.g. the ACPI S3 state). |
| 9 | |
| 10 | config SUSPEND_FREEZER |
| 11 | bool "Enable freezer for suspend to RAM/standby" \ |
| 12 | if ARCH_WANTS_FREEZER_CONTROL || BROKEN |
| 13 | depends on SUSPEND |
| 14 | default y |
| 15 | help |
| 16 | This allows you to turn off the freezer for suspend. If this is |
| 17 | done, no tasks are frozen for suspend to RAM/standby. |
| 18 | |
| 19 | Turning OFF this setting is NOT recommended! If in doubt, say Y. |
| 20 | |
| 21 | config HAS_WAKELOCK |
| 22 | bool "has wakelock" |
| 23 | |
| 24 | config WAKELOCK |
| 25 | bool "enable wakelock" |
| 26 | |
| 27 | config HIBERNATE_CALLBACKS |
| 28 | bool |
| 29 | |
| 30 | config HIBERNATION |
| 31 | bool "Hibernation (aka 'suspend to disk')" |
| 32 | depends on SWAP && ARCH_HIBERNATION_POSSIBLE |
| 33 | select HIBERNATE_CALLBACKS |
| 34 | select LZO_COMPRESS |
| 35 | select LZO_DECOMPRESS |
| 36 | select CRC32 |
| 37 | ---help--- |
| 38 | Enable the suspend to disk (STD) functionality, which is usually |
| 39 | called "hibernation" in user interfaces. STD checkpoints the |
| 40 | system and powers it off; and restores that checkpoint on reboot. |
| 41 | |
| 42 | You can suspend your machine with 'echo disk > /sys/power/state' |
| 43 | after placing resume=/dev/swappartition on the kernel command line |
| 44 | in your bootloader's configuration file. |
| 45 | |
| 46 | Alternatively, you can use the additional userland tools available |
| 47 | from <http://suspend.sf.net>. |
| 48 | |
| 49 | In principle it does not require ACPI or APM, although for example |
| 50 | ACPI will be used for the final steps when it is available. One |
| 51 | of the reasons to use software suspend is that the firmware hooks |
| 52 | for suspend states like suspend-to-RAM (STR) often don't work very |
| 53 | well with Linux. |
| 54 | |
| 55 | It creates an image which is saved in your active swap. Upon the next |
| 56 | boot, pass the 'resume=/dev/swappartition' argument to the kernel to |
| 57 | have it detect the saved image, restore memory state from it, and |
| 58 | continue to run as before. If you do not want the previous state to |
| 59 | be reloaded, then use the 'noresume' kernel command line argument. |
| 60 | Note, however, that fsck will be run on your filesystems and you will |
| 61 | need to run mkswap against the swap partition used for the suspend. |
| 62 | |
| 63 | It also works with swap files to a limited extent (for details see |
| 64 | <file:Documentation/power/swsusp-and-swap-files.txt>). |
| 65 | |
| 66 | Right now you may boot without resuming and resume later but in the |
| 67 | meantime you cannot use the swap partition(s)/file(s) involved in |
| 68 | suspending. Also in this case you must not use the filesystems |
| 69 | that were mounted before the suspend. In particular, you MUST NOT |
| 70 | MOUNT any journaled filesystems mounted before the suspend or they |
| 71 | will get corrupted in a nasty way. |
| 72 | |
| 73 | For more information take a look at <file:Documentation/power/swsusp.txt>. |
| 74 | |
| 75 | config ARCH_SAVE_PAGE_KEYS |
| 76 | bool |
| 77 | |
| 78 | config PM_STD_PARTITION |
| 79 | string "Default resume partition" |
| 80 | depends on HIBERNATION |
| 81 | default "" |
| 82 | ---help--- |
| 83 | The default resume partition is the partition that the suspend- |
| 84 | to-disk implementation will look for a suspended disk image. |
| 85 | |
| 86 | The partition specified here will be different for almost every user. |
| 87 | It should be a valid swap partition (at least for now) that is turned |
| 88 | on before suspending. |
| 89 | |
| 90 | The partition specified can be overridden by specifying: |
| 91 | |
| 92 | resume=/dev/<other device> |
| 93 | |
| 94 | which will set the resume partition to the device specified. |
| 95 | |
| 96 | Note there is currently not a way to specify which device to save the |
| 97 | suspended image to. It will simply pick the first available swap |
| 98 | device. |
| 99 | |
| 100 | config PM_SLEEP |
| 101 | def_bool y |
| 102 | depends on SUSPEND || HIBERNATE_CALLBACKS |
| 103 | |
| 104 | config PM_SLEEP_SMP |
| 105 | def_bool y |
| 106 | depends on SMP |
| 107 | depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE |
| 108 | depends on PM_SLEEP |
| 109 | select HOTPLUG |
| 110 | select HOTPLUG_CPU |
| 111 | |
| 112 | config PM_AUTOSLEEP |
| 113 | bool "Opportunistic sleep" |
| 114 | depends on PM_SLEEP |
| 115 | default n |
| 116 | ---help--- |
| 117 | Allow the kernel to trigger a system transition into a global sleep |
| 118 | state automatically whenever there are no active wakeup sources. |
| 119 | |
| 120 | config PM_WAKELOCKS |
| 121 | bool "User space wakeup sources interface" |
| 122 | depends on PM_SLEEP |
| 123 | default n |
| 124 | ---help--- |
| 125 | Allow user space to create, activate and deactivate wakeup source |
| 126 | objects with the help of a sysfs-based interface. |
| 127 | |
| 128 | config PM_WAKELOCKS_LIMIT |
| 129 | int "Maximum number of user space wakeup sources (0 = no limit)" |
| 130 | range 0 100000 |
| 131 | default 100 |
| 132 | depends on PM_WAKELOCKS |
| 133 | |
| 134 | config PM_WAKELOCKS_GC |
| 135 | bool "Garbage collector for user space wakeup sources" |
| 136 | depends on PM_WAKELOCKS |
| 137 | default y |
| 138 | |
| 139 | config PM_RUNTIME |
| 140 | bool "Run-time PM core functionality" |
| 141 | depends on !IA64_HP_SIM |
| 142 | ---help--- |
| 143 | Enable functionality allowing I/O devices to be put into energy-saving |
| 144 | (low power) states at run time (or autosuspended) after a specified |
| 145 | period of inactivity and woken up in response to a hardware-generated |
| 146 | wake-up event or a driver's request. |
| 147 | |
| 148 | Hardware support is generally required for this functionality to work |
| 149 | and the bus type drivers of the buses the devices are on are |
| 150 | responsible for the actual handling of the autosuspend requests and |
| 151 | wake-up events. |
| 152 | |
| 153 | config PM |
| 154 | def_bool y |
| 155 | depends on PM_SLEEP || PM_RUNTIME |
| 156 | |
| 157 | config PM_DEBUG |
| 158 | bool "Power Management Debug Support" |
| 159 | depends on PM |
| 160 | ---help--- |
| 161 | This option enables various debugging support in the Power Management |
| 162 | code. This is helpful when debugging and reporting PM bugs, like |
| 163 | suspend support. |
| 164 | |
| 165 | config PM_ADVANCED_DEBUG |
| 166 | bool "Extra PM attributes in sysfs for low-level debugging/testing" |
| 167 | depends on PM_DEBUG |
| 168 | ---help--- |
| 169 | Add extra sysfs attributes allowing one to access some Power Management |
| 170 | fields of device objects from user space. If you are not a kernel |
| 171 | developer interested in debugging/testing Power Management, say "no". |
| 172 | |
| 173 | config PM_TEST_SUSPEND |
| 174 | bool "Test suspend/resume and wakealarm during bootup" |
| 175 | depends on SUSPEND && PM_DEBUG && RTC_CLASS=y |
| 176 | ---help--- |
| 177 | This option will let you suspend your machine during bootup, and |
| 178 | make it wake up a few seconds later using an RTC wakeup alarm. |
| 179 | Enable this with a kernel parameter like "test_suspend=mem". |
| 180 | |
| 181 | You probably want to have your system's RTC driver statically |
| 182 | linked, ensuring that it's available when this test runs. |
| 183 | |
| 184 | config CAN_PM_TRACE |
| 185 | def_bool y |
| 186 | depends on PM_DEBUG && PM_SLEEP |
| 187 | |
| 188 | config PM_TRACE |
| 189 | bool |
| 190 | help |
| 191 | This enables code to save the last PM event point across |
| 192 | reboot. The architecture needs to support this, x86 for |
| 193 | example does by saving things in the RTC, see below. |
| 194 | |
| 195 | The architecture specific code must provide the extern |
| 196 | functions from <linux/resume-trace.h> as well as the |
| 197 | <asm/resume-trace.h> header with a TRACE_RESUME() macro. |
| 198 | |
| 199 | The way the information is presented is architecture- |
| 200 | dependent, x86 will print the information during a |
| 201 | late_initcall. |
| 202 | |
| 203 | config PM_TRACE_RTC |
| 204 | bool "Suspend/resume event tracing" |
| 205 | depends on CAN_PM_TRACE |
| 206 | depends on X86 |
| 207 | select PM_TRACE |
| 208 | ---help--- |
| 209 | This enables some cheesy code to save the last PM event point in the |
| 210 | RTC across reboots, so that you can debug a machine that just hangs |
| 211 | during suspend (or more commonly, during resume). |
| 212 | |
| 213 | To use this debugging feature you should attempt to suspend the |
| 214 | machine, reboot it and then run |
| 215 | |
| 216 | dmesg -s 1000000 | grep 'hash matches' |
| 217 | |
| 218 | CAUTION: this option will cause your machine's real-time clock to be |
| 219 | set to an invalid time after a resume. |
| 220 | |
| 221 | config APM_EMULATION |
| 222 | tristate "Advanced Power Management Emulation" |
| 223 | depends on PM && SYS_SUPPORTS_APM_EMULATION |
| 224 | help |
| 225 | APM is a BIOS specification for saving power using several different |
| 226 | techniques. This is mostly useful for battery powered laptops with |
| 227 | APM compliant BIOSes. If you say Y here, the system time will be |
| 228 | reset after a RESUME operation, the /proc/apm device will provide |
| 229 | battery status information, and user-space programs will receive |
| 230 | notification of APM "events" (e.g. battery status change). |
| 231 | |
| 232 | In order to use APM, you will need supporting software. For location |
| 233 | and more information, read <file:Documentation/power/apm-acpi.txt> |
| 234 | and the Battery Powered Linux mini-HOWTO, available from |
| 235 | <http://www.tldp.org/docs.html#howto>. |
| 236 | |
| 237 | This driver does not spin down disk drives (see the hdparm(8) |
| 238 | manpage ("man 8 hdparm") for that), and it doesn't turn off |
| 239 | VESA-compliant "green" monitors. |
| 240 | |
| 241 | Generally, if you don't have a battery in your machine, there isn't |
| 242 | much point in using this driver and you should say N. If you get |
| 243 | random kernel OOPSes or reboots that don't seem to be related to |
| 244 | anything, try disabling/enabling this option (or disabling/enabling |
| 245 | APM in your BIOS). |
| 246 | |
| 247 | config ARCH_HAS_OPP |
| 248 | bool |
| 249 | |
| 250 | config PM_OPP |
| 251 | bool "Operating Performance Point (OPP) Layer library" |
| 252 | depends on ARCH_HAS_OPP |
| 253 | ---help--- |
| 254 | SOCs have a standard set of tuples consisting of frequency and |
| 255 | voltage pairs that the device will support per voltage domain. This |
| 256 | is called Operating Performance Point or OPP. The actual definitions |
| 257 | of OPP varies over silicon within the same family of devices. |
| 258 | |
| 259 | OPP layer organizes the data internally using device pointers |
| 260 | representing individual voltage domains and provides SOC |
| 261 | implementations a ready to use framework to manage OPPs. |
| 262 | For more information, read <file:Documentation/power/opp.txt> |
| 263 | |
| 264 | config PM_CLK |
| 265 | def_bool y |
| 266 | depends on PM && HAVE_CLK |
| 267 | |
| 268 | config PM_GENERIC_DOMAINS |
| 269 | bool |
| 270 | depends on PM |
| 271 | |
| 272 | config PM_GENERIC_DOMAINS_RUNTIME |
| 273 | def_bool y |
| 274 | depends on PM_RUNTIME && PM_GENERIC_DOMAINS |
| 275 | |
| 276 | config CPU_PM |
| 277 | bool |
| 278 | depends on SUSPEND || CPU_IDLE |
| 279 | |
| 280 | config SUSPEND_TIME |
| 281 | bool "Log time spent in suspend" |
| 282 | ---help--- |
| 283 | Prints the time spent in suspend in the kernel log, and |
| 284 | keeps statistics on the time spent in suspend in |
| 285 | /sys/kernel/debug/suspend_time |