⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interface.txt

📁 linux 内核源代码
💻 TXT
字号:
Power Management InterfaceThe power management subsystem provides a unified sysfs interface to userspace, regardless of what architecture or platform one isrunning. The interface exists in /sys/power/ directory (assuming sysfsis mounted at /sys). /sys/power/state controls system power state. Reading from this filereturns what states are supported, which is hard-coded to 'standby'(Power-On Suspend), 'mem' (Suspend-to-RAM), and 'disk'(Suspend-to-Disk). Writing to this file one of those strings causes the system totransition into that state. Please see the fileDocumentation/power/states.txt for a description of each of thosestates./sys/power/disk controls the operating mode of the suspend-to-diskmechanism. Suspend-to-disk can be handled in several ways. We have afew options for putting the system to sleep - using the platform driver(e.g. ACPI or other suspend_ops), powering off the system or rebooting thesystem (for testing).Additionally, /sys/power/disk can be used to turn on one of the two testingmodes of the suspend-to-disk mechanism: 'testproc' or 'test'.  If thesuspend-to-disk mechanism is in the 'testproc' mode, writing 'disk' to/sys/power/state will cause the kernel to disable nonboot CPUs and freezetasks, wait for 5 seconds, unfreeze tasks and enable nonboot CPUs.  If it isin the 'test' mode, writing 'disk' to /sys/power/state will cause the kernelto disable nonboot CPUs and freeze tasks, shrink memory, suspend devices, waitfor 5 seconds, resume devices, unfreeze tasks and enable nonboot CPUs.  Then,we are able to look in the log messages and work out, for example, which codeis being slow and which device drivers are misbehaving.Reading from this file will display all supported modes and the currentlyselected one in brackets, for example	[shutdown] reboot test testprocWriting to this file will accept one of       'platform' (only if the platform supports it)       'shutdown'       'reboot'       'testproc'       'test'/sys/power/image_size controls the size of the image created bythe suspend-to-disk mechanism.  It can be written a stringrepresenting a non-negative integer that will be used as an upperlimit of the image size, in bytes.  The suspend-to-disk mechanism willdo its best to ensure the image size will not exceed that number.  However,if this turns out to be impossible, it will try to suspend anyway using thesmallest image possible.  In particular, if "0" is written to this file, thesuspend image will be as small as possible.Reading from this file will display the current image size limit, whichis set to 500 MB by default./sys/power/pm_trace controls the code which saves the last PM event point inthe RTC across reboots, so that you can debug a machine that just hangsduring suspend (or more commonly, during resume).  Namely, the RTC is onlyused to save the last PM event point if this file contains '1'.  Initially itcontains '0' which may be changed to '1' by writing a string representing anonzero integer into it.To use this debugging feature you should attempt to suspend the machine, thenreboot it and run	dmesg -s 1000000 | grep 'hash matches'CAUTION: Using it will cause your machine's real-time (CMOS) clock to beset to a random invalid time after a resume.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -