요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Hibernation methods와 image
sysfs-power:42-107Firmware·platform·shutdown·reboot 방식과 testproc·test diagnostic sequence, image-size upper limit를 제어합니다.
PM trace와 callback scheduling
sysfs-power:108-169RTC hash로 suspend/resume hang을 추적하고 loadable-module devices를 대조하며 asynchronous callback 실행을 선택합니다.
Wakeup race, autosleep와 wake locks
sysfs-power:170-258Wakeup count handshake로 race를 막고 active sources가 없을 때 autosleep을 반복하며 named wake locks를 timeout 또는 explicit unlock으로 관리합니다.
Timing, IRQ, debug와 resume offset
sysfs-power:259-309Device PM duration, first wakeup IRQ, suspend/hibernation debug logging과 hibernation disk offset을 제공합니다.
Suspend failures와 hardware sleep time
sysfs-power:310-444Suspend pipeline 단계별 success/failure counts, 마지막 실패 device·errno·step과 microsecond hardware-sleep durations를 기록합니다.
Suspend 전 filesystem sync
sysfs-power:445-456User space freeze와 device suspend 사이의 sync() 실행 여부를 runtime value와 build-time default로 제어합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/power/
Date: August 2006
Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power directory will contain files that will
provide a unified interface to the power management
subsystem.
What: /sys/power/state
Date: November 2016
Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/state file controls system sleep states.
Reading from this file returns the available sleep state
labels, which may be "mem" (suspend), "standby" (power-on
suspend), "freeze" (suspend-to-idle) and "disk" (hibernation).
Writing one of the above strings to this file causes the system
to transition into the corresponding state, if available.
See Documentation/admin-guide/pm/sleep-states.rst for more
information.
What: /sys/power/mem_sleep
Date: November 2016
Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/mem_sleep file controls the operating mode of
system suspend. Reading from it returns the available modes
as "s2idle" (always present), "shallow" and "deep" (present if
supported). The mode that will be used on subsequent attempts
to suspend the system (by writing "mem" to the /sys/power/state
file described above) is enclosed in square brackets.
Writing one of the above strings to this file causes the mode
represented by it to be used on subsequent attempts to suspend
the system.
See Documentation/admin-guide/pm/sleep-states.rst for more
information.
What: /sys/power/disk
Date: September 2006
Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/disk file controls the operating mode of the
suspend-to-disk mechanism. Reading from this file returns
the name of the method by which the system will be put to
sleep on the next suspend. There are four methods supported:
'firmware' - means that the memory image will be saved to disk
by some firmware, in which case we also assume that the
firmware will handle the system suspend.
'platform' - the memory image will be saved by the kernel and
the system will be put to sleep by the platform driver (e.g.
ACPI or other PM registers).
'shutdown' - the memory image will be saved by the kernel and
the system will be powered off.
'reboot' - the memory image will be saved by the kernel and
the system will be rebooted.
Additionally, /sys/power/disk can be used to turn on one of the
two testing modes of the suspend-to-disk mechanism: 'testproc'
or 'test'. If the suspend-to-disk mechanism is in the
'testproc' mode, writing 'disk' to /sys/power/state will cause
the kernel to disable nonboot CPUs and freeze tasks, wait for 5
seconds, unfreeze tasks and enable nonboot CPUs. If it is in
the 'test' mode, writing 'disk' to /sys/power/state will cause
the kernel to disable nonboot CPUs and freeze tasks, shrink
memory, suspend devices, wait for 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 code
is being slow and which device drivers are misbehaving.
The suspend-to-disk method may be chosen by writing to this
file one of the accepted strings:
- 'firmware'
- 'platform'
- 'shutdown'
- 'reboot'
- 'testproc'
- 'test'
It will only change to 'firmware' or 'platform' if the system
supports that.
What: /sys/power/image_size
Date: August 2006
Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/image_size file controls the size of the image
created by the suspend-to-disk mechanism. It can be written a
string representing a non-negative integer that will be used
as an upper limit of the image size, in bytes. The kernel's
suspend-to-disk code will do its best to ensure the image size
will not exceed this number. However, if it turns out to be
impossible, the kernel will try to suspend anyway using the
smallest image possible. In particular, if "0" is written to
this file, the suspend image will be as small as possible.
Reading from this file will display the current image size
limit, which is set to around 2/5 of available RAM by default.
What: /sys/power/pm_trace
Date: August 2006
Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/pm_trace file controls the code which saves the
last PM event point in the RTC across reboots, so that you can
debug a machine that just hangs during suspend (or more
commonly, during resume). Namely, the RTC is only used to save
the last PM event point if this file contains '1'. Initially
it contains '0' which may be changed to '1' by writing a
string representing a nonzero integer into it.
To use this debugging feature you should attempt to suspend
the machine, then reboot it and run::
dmesg -s 1000000 | grep 'hash matches'
If you do not get any matches (or they appear to be false
positives), it is possible that the last PM event point
referred to a device created by a loadable kernel module. In
this case cat /sys/power/pm_trace_dev_match (see below) after
your system is started up and the kernel modules are loaded.
CAUTION: Using it will cause your machine's real-time (CMOS)
clock to be set to a random invalid time after a resume.
What: /sys/power/pm_trace_dev_match
Date: October 2010
Contact: James Hogan <[email protected]>
Description:
The /sys/power/pm_trace_dev_match file contains the name of the
device associated with the last PM event point saved in the RTC
across reboots when pm_trace has been used. More precisely it
contains the list of current devices (including those
registered by loadable kernel modules since boot) which match
the device hash in the RTC at boot, with a newline after each
one.
The advantage of this file over the hash matches printed to the
kernel log (see /sys/power/pm_trace), is that it includes
devices created after boot by loadable kernel modules.
Due to the small hash size necessary to fit in the RTC, it is
possible that more than one device matches the hash, in which
case further investigation is required to determine which
device is causing the problem. Note that genuine RTC clock
values (such as when pm_trace has not been used), can still
match a device and output its name here.
What: /sys/power/pm_async
Date: January 2009
Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/pm_async file controls the switch allowing the
user space to enable or disable asynchronous suspend and resume
of devices. If enabled, this feature will cause some device
drivers' suspend and resume callbacks to be executed in parallel
with each other and with the main suspend thread. It is enabled
if this file contains "1", which is the default. It may be
disabled by writing "0" to this file, in which case all devices
will be suspended and resumed synchronously.
What: /sys/power/wakeup_count
Date: July 2010
Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/wakeup_count file allows user space to put the
system into a sleep state while taking into account the
concurrent arrival of wakeup events. Reading from it returns
the current number of registered wakeup events and it blocks if
some wakeup events are being processed at the time the file is
read from. Writing to it will only succeed if the current
number of wakeup events is equal to the written value and, if
successful, will make the kernel abort a subsequent transition
to a sleep state if any wakeup events are reported after the
write has returned.
What: /sys/power/reserved_size
Date: May 2011
Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/reserved_size file allows user space to control
the amount of memory reserved for allocations made by device
drivers during the "device freeze" stage of hibernation. It can
be written a string representing a non-negative integer that
will be used as the amount of memory to reserve for allocations
made by device drivers' "freeze" callbacks, in bytes.
Reading from this file will display the current value, which is
set to 1 MB by default.
What: /sys/power/autosleep
Date: April 2012
Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/autosleep file can be written one of the strings
returned by reads from /sys/power/state. If that happens, a
work item attempting to trigger a transition of the system to
the sleep state represented by that string is queued up. This
attempt will only succeed if there are no active wakeup sources
in the system at that time. After every execution, regardless
of whether or not the attempt to put the system to sleep has
succeeded, the work item requeues itself until user space
writes "off" to /sys/power/autosleep.
Reading from this file causes the last string successfully
written to it to be returned.
What: /sys/power/wake_lock
Date: February 2012
Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/wake_lock file allows user space to create
wakeup source objects and activate them on demand (if one of
those wakeup sources is active, reads from the
/sys/power/wakeup_count file block or return false). When a
string without white space is written to /sys/power/wake_lock,
it will be assumed to represent a wakeup source name. If there
is a wakeup source object with that name, it will be activated
(unless active already). Otherwise, a new wakeup source object
will be registered, assigned the given name and activated.
If a string written to /sys/power/wake_lock contains white
space, the part of the string preceding the white space will be
regarded as a wakeup source name and handled as descrived above.
The other part of the string will be regarded as a timeout (in
nanoseconds) such that the wakeup source will be automatically
deactivated after it has expired. The timeout, if present, is
set regardless of the current state of the wakeup source object
in question.
Reads from this file return a string consisting of the names of
wakeup sources created with the help of it that are active at
the moment, separated with spaces.
What: /sys/power/wake_unlock
Date: February 2012
Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/wake_unlock file allows user space to deactivate
wakeup sources created with the help of /sys/power/wake_lock.
When a string is written to /sys/power/wake_unlock, it will be
assumed to represent the name of a wakeup source to deactivate.
If a wakeup source object of that name exists and is active at
the moment, it will be deactivated.
Reads from this file return a string consisting of the names of
wakeup sources created with the help of /sys/power/wake_lock
that are inactive at the moment, separated with spaces.
What: /sys/power/pm_print_times
Date: May 2012
Contact: Sameer Nanda <[email protected]>
Description:
The /sys/power/pm_print_times file allows user space to
control whether the time taken by devices to suspend and
resume is printed. These prints are useful for hunting down
devices that take too long to suspend or resume.
Writing a "1" enables this printing while writing a "0"
disables it. The default value is "0". Reading from this file
will display the current value.
What: /sys/power/pm_wakeup_irq
Date: April 2015
Contact: Alexandra Yates <[email protected]>
Description:
The /sys/power/pm_wakeup_irq file reports to user space the IRQ
number of the first wakeup interrupt (that is, the first
interrupt from an IRQ line armed for system wakeup) seen by the
kernel during the most recent system suspend/resume cycle.
This output is useful for system wakeup diagnostics of spurious
wakeup interrupts.
What: /sys/power/pm_debug_messages
Date: July 2017
Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/pm_debug_messages file controls the printing
of debug messages from the system suspend/hiberbation
infrastructure to the kernel log.
Writing a "1" to this file enables the debug messages and
writing a "0" (default) to it disables them. Reads from
this file return the current value.
What: /sys/power/resume_offset
Date: April 2018
Contact: Mario Limonciello <[email protected]>
Description:
This file is used for telling the kernel an offset into a disk
to use when hibernating the system such as with a swap file.
Reads from this file will display the current offset
the kernel will be using on the next hibernation
attempt.
Using this sysfs file will override any values that were
set using the kernel command line for disk offset.
What: /sys/power/suspend_stats
Date: July 2019
Contact: Kalesh Singh <[email protected]>
Description:
The /sys/power/suspend_stats directory contains suspend related
statistics.
What: /sys/power/suspend_stats/success
Date: July 2019
Contact: Kalesh Singh <[email protected]>
Description:
The /sys/power/suspend_stats/success file contains the number
of times entering system sleep state succeeded.
What: /sys/power/suspend_stats/fail
Date: July 2019
Contact: Kalesh Singh <[email protected]>
Description:
The /sys/power/suspend_stats/fail file contains the number
of times entering system sleep state failed.
What: /sys/power/suspend_stats/failed_freeze
Date: July 2019
Contact: Kalesh Singh <[email protected]>
Description:
The /sys/power/suspend_stats/failed_freeze file contains the
number of times freezing processes failed.
What: /sys/power/suspend_stats/failed_prepare
Date: July 2019
Contact: Kalesh Singh <[email protected]>
Description:
The /sys/power/suspend_stats/failed_prepare file contains the
number of times preparing all non-sysdev devices for
a system PM transition failed.
What: /sys/power/suspend_stats/failed_resume
Date: July 2019
Contact: Kalesh Singh <[email protected]>
Description:
The /sys/power/suspend_stats/failed_resume file contains the
number of times executing "resume" callbacks of
non-sysdev devices failed.
What: /sys/power/suspend_stats/failed_resume_early
Date: July 2019
Contact: Kalesh Singh <[email protected]>
Description:
The /sys/power/suspend_stats/failed_resume_early file contains
the number of times executing "early resume" callbacks
of devices failed.
What: /sys/power/suspend_stats/failed_resume_noirq
Date: July 2019
Contact: Kalesh Singh <[email protected]>
Description:
The /sys/power/suspend_stats/failed_resume_noirq file contains
the number of times executing "noirq resume" callbacks
of devices failed.
What: /sys/power/suspend_stats/failed_suspend
Date: July 2019
Contact: Kalesh Singh <[email protected]>
Description:
The /sys/power/suspend_stats/failed_suspend file contains
the number of times executing "suspend" callbacks
of all non-sysdev devices failed.
What: /sys/power/suspend_stats/failed_suspend_late
Date: July 2019
Contact: Kalesh Singh <[email protected]>
Description:
The /sys/power/suspend_stats/failed_suspend_late file contains
the number of times executing "late suspend" callbacks
of all devices failed.
What: /sys/power/suspend_stats/failed_suspend_noirq
Date: July 2019
Contact: Kalesh Singh <[email protected]>
Description:
The /sys/power/suspend_stats/failed_suspend_noirq file contains
the number of times executing "noirq suspend" callbacks
of all devices failed.
What: /sys/power/suspend_stats/last_failed_dev
Date: July 2019
Contact: Kalesh Singh <[email protected]>
Description:
The /sys/power/suspend_stats/last_failed_dev file contains
the last device for which a suspend/resume callback failed.
What: /sys/power/suspend_stats/last_failed_errno
Date: July 2019
Contact: Kalesh Singh <[email protected]>
Description:
The /sys/power/suspend_stats/last_failed_errno file contains
the errno of the last failed attempt at entering
system sleep state.
What: /sys/power/suspend_stats/last_failed_step
Date: July 2019
Contact: Kalesh Singh <[email protected]>
Description:
The /sys/power/suspend_stats/last_failed_step file contains
the last failed step in the suspend/resume path.
What: /sys/power/suspend_stats/last_hw_sleep
Date: June 2023
Contact: Mario Limonciello <[email protected]>
Description:
The /sys/power/suspend_stats/last_hw_sleep file
contains the duration of time spent in a hardware sleep
state in the most recent system suspend-resume cycle.
This number is measured in microseconds.
What: /sys/power/suspend_stats/total_hw_sleep
Date: June 2023
Contact: Mario Limonciello <[email protected]>
Description:
The /sys/power/suspend_stats/total_hw_sleep file
contains the aggregate of time spent in a hardware sleep
state since the kernel was booted. This number
is measured in microseconds.
What: /sys/power/suspend_stats/max_hw_sleep
Date: June 2023
Contact: Mario Limonciello <[email protected]>
Description:
The /sys/power/suspend_stats/max_hw_sleep file
contains the maximum amount of time that the hardware can
report for time spent in a hardware sleep state. When sleep
cycles are longer than this time, the values for
'total_hw_sleep' and 'last_hw_sleep' may not be accurate.
This number is measured in microseconds.
What: /sys/power/sync_on_suspend
Date: October 2019
Contact: Jonas Meurer <[email protected]>
Description:
This file controls whether or not the kernel will sync()
filesystems during system suspend (after freezing user space
and before suspending devices).
Writing a "1" to this file enables the sync() and writing a "0"
disables it. Reads from the file return the current value.
The default is "1" if the build-time "SUSPEND_SKIP_SYNC" config
flag is unset, or "0" otherwise.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
System power sysfs ABI: power management root
1-8| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/ |
| Date | 2006년 8월 |
| KernelVersion | |
| Contact | Rafael J. Wysocki <[email protected]> |
| Description | `/sys/power/` directory에는 power-management subsystem에 대한 unified interface를 제공하는 files가 들어 있습니다. |
System power sysfs ABI: state
9-23| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/state |
| Date | 2016년 11월 |
| KernelVersion | |
| Contact | Rafael J. Wysocki <[email protected]> |
| Description | `/sys/power/state`는 system sleep states를 제어합니다. Read하면 available sleep-state labels를 반환하며 `mem`은 suspend, `standby`는 power-on suspend, `freeze`는 suspend-to-idle, `disk`는 hibernation입니다. Available label 하나를 쓰면 system이 대응 state로 transition합니다. 자세한 내용은 `Documentation/admin-guide/pm/sleep-states.rst`를 참조합니다. |
state file의 read labels와 corresponding transitions입니다.
System power sysfs ABI: mem sleep
24-41| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/mem_sleep |
| Date | 2016년 11월 |
| KernelVersion | |
| Contact | Rafael J. Wysocki <[email protected]> |
| Description | `/sys/power/mem_sleep`은 system suspend의 operating mode를 제어합니다. Read하면 항상 존재하는 `s2idle`과 지원되는 경우의 `shallow`, `deep`을 반환합니다. 이후 `/sys/power/state`에 `mem`을 쓸 때 사용할 mode는 square brackets로 둘러싸여 표시됩니다. Mode string 하나를 쓰면 이후 suspend attempts에 그 mode를 사용합니다. 자세한 내용은 `Documentation/admin-guide/pm/sleep-states.rst`를 참조합니다. |
Available modes와 availability를 정리합니다. Selected mode는 read output에서 square brackets로 표시됩니다.
mem_sleep selection은 다음 state=mem transition에 적용됩니다.
System power sysfs ABI: disk
42-90| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/disk |
| Date | 2006년 9월 |
| KernelVersion | |
| Contact | Rafael J. Wysocki <[email protected]> |
| Description | `/sys/power/disk`는 suspend-to-disk mechanism의 operating mode를 제어합니다. `firmware`는 firmware가 memory image를 disk에 저장하고 system suspend도 처리함을 뜻합니다. `platform`은 kernel이 image를 저장하고 ACPI 또는 다른 PM registers 같은 platform driver가 system을 sleep 상태로 만듭니다. `shutdown`은 kernel이 image를 저장한 뒤 power off하고, `reboot`는 image를 저장한 뒤 reboot합니다. Test mode `testproc`에서 `/sys/power/state`에 `disk`를 쓰면 nonboot CPUs를 disable하고 tasks를 freeze한 뒤 5 seconds를 기다렸다가 tasks를 unfreeze하고 CPUs를 enable합니다. `test` mode는 그 사이에 memory shrink, device suspend, 5-second wait와 device resume까지 수행합니다. Logs로 느린 code와 오동작하는 drivers를 찾을 수 있습니다. Accepted strings는 `firmware`, `platform`, `shutdown`, `reboot`, `testproc`, `test`이며 `firmware`와 `platform`은 system이 지원할 때만 선택됩니다. |
Memory image writer와 final platform action을 구분합니다.
두 test modes가 실행하는 단계와 5-second wait를 비교합니다.
System power sysfs ABI: image size
91-107| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/image_size |
| Date | 2006년 8월 |
| KernelVersion | |
| Contact | Rafael J. Wysocki <[email protected]> |
| Description | `/sys/power/image_size`는 suspend-to-disk image size를 제어합니다. Non-negative integer string을 쓰면 bytes 단위 upper limit로 사용하며 kernel은 image가 이를 넘지 않도록 최선을 다합니다. 불가능하면 가능한 가장 작은 image로 suspend를 계속 시도합니다. `0`을 쓰면 image를 가능한 한 작게 만듭니다. Read하면 current limit를 표시하며 default는 available RAM의 약 `2/5`입니다. |
Requested upper limit, zero special case와 default를 정리합니다.
System power sysfs ABI: pm trace
108-133| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/pm_trace |
| Date | 2006년 8월 |
| KernelVersion | |
| Contact | Rafael J. Wysocki <[email protected]> |
| Description | `/sys/power/pm_trace`는 마지막 PM event point를 reboot 사이에도 RTC에 저장하여 suspend 또는 resume 중 hang을 debug하게 합니다. File이 `1`일 때만 RTC를 사용하며 initial value는 `0`입니다. Nonzero integer string을 쓰면 enable됩니다. Suspend를 시도하고 reboot한 뒤 `dmesg -s 1000000 | grep 'hash matches'`를 실행합니다. Match가 없거나 false positive로 보이면 loadable kernel module이 만든 device일 수 있으므로 modules load 뒤 `/sys/power/pm_trace_dev_match`를 읽습니다. 주의: 이 기능을 사용하면 resume 뒤 real-time CMOS clock이 random invalid time으로 설정됩니다. |
RTC hash를 reboot 뒤 kernel log 또는 module-aware device list와 대조합니다.
dmesg -s 1000000 | grep 'hash matches'
cat /sys/power/pm_trace_dev_match
CAUTION: pm_trace 사용 뒤 resume하면 real-time CMOS clock이 random invalid time으로 바뀝니다.
System power sysfs ABI: pm trace dev match
134-156| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/pm_trace_dev_match |
| Date | 2010년 10월 |
| KernelVersion | |
| Contact | James Hogan <[email protected]> |
| Description | `/sys/power/pm_trace_dev_match`는 `pm_trace`가 사용됐을 때 reboot 사이 RTC에 저장된 마지막 PM event point와 연결된 device names를 담습니다. Boot 시 RTC device hash와 match하는 current devices를, boot 뒤 loadable kernel modules가 register한 devices까지 포함해 한 줄에 하나씩 나열합니다. RTC에 맞추기 위한 hash가 작아 둘 이상의 device가 match할 수 있으므로 원인 device를 추가 조사해야 합니다. `pm_trace`를 사용하지 않은 genuine RTC clock value도 우연히 device와 match할 수 있습니다. |
System power sysfs ABI: pm async
157-169| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/pm_async |
| Date | 2009년 1월 |
| KernelVersion | |
| Contact | Rafael J. Wysocki <[email protected]> |
| Description | `/sys/power/pm_async`는 userspace가 asynchronous device suspend/resume을 enable 또는 disable하게 합니다. Enable하면 일부 driver callbacks가 서로 및 main suspend thread와 parallel로 실행됩니다. Default `1`은 enabled이고 `0`을 쓰면 모든 devices를 synchronously suspend/resume합니다. |
pm_async가 suspend/resume callbacks의 scheduling model을 선택합니다.
System power sysfs ABI: wakeup count
170-184| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/wakeup_count |
| Date | 2010년 7월 |
| KernelVersion | |
| Contact | Rafael J. Wysocki <[email protected]> |
| Description | `/sys/power/wakeup_count`는 concurrent wakeup events를 고려하면서 userspace가 system을 sleep state로 전환하게 합니다. Read하면 registered wakeup events의 current count를 반환하며 event 처리 중이면 block합니다. Write는 current count가 쓴 value와 같을 때만 성공합니다. 성공한 write 뒤 새 wakeup event가 보고되면 kernel이 subsequent sleep transition을 abort합니다. |
Read와 matching write 사이에 wakeup activity가 생기면 sleep transition을 막습니다.
System power sysfs ABI: reserved size
185-198| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/reserved_size |
| Date | 2011년 5월 |
| KernelVersion | |
| Contact | Rafael J. Wysocki <[email protected]> |
| Description | `/sys/power/reserved_size`는 hibernation의 "device freeze" stage에서 device-driver `freeze` callbacks가 allocation할 수 있도록 reserve할 memory를 제어합니다. Non-negative integer string을 bytes 단위 reserve amount로 씁니다. Read하면 current value를 표시하며 default는 `1 MB`입니다. |
System power sysfs ABI: autosleep
199-215| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/autosleep |
| Date | 2012년 4월 |
| KernelVersion | |
| Contact | Rafael J. Wysocki <[email protected]> |
| Description | `/sys/power/autosleep`에는 `/sys/power/state` read가 반환한 strings 중 하나를 쓸 수 있습니다. 그러면 해당 sleep state로 transition을 시도하는 work item이 queue됩니다. Active wakeup sources가 없을 때만 성공합니다. 성공 여부와 관계없이 실행할 때마다 userspace가 `off`를 쓸 때까지 work item이 자신을 다시 queue합니다. Read하면 마지막으로 성공적으로 쓴 string을 반환합니다. |
Active wakeup sources가 없을 때 sleep을 시도하고 off가 올 때까지 계속 requeue합니다.
System power sysfs ABI: wake lock
216-242| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/wake_lock |
| Date | 2012년 2월 |
| KernelVersion | |
| Contact | Rafael J. Wysocki <[email protected]> |
| Description | `/sys/power/wake_lock`은 userspace가 wakeup-source objects를 만들고 필요할 때 activate하게 합니다. Active source가 있으면 `/sys/power/wakeup_count` read가 block하거나 false를 반환합니다. Whitespace 없는 string은 source name입니다. 같은 name의 object가 있으면 activate하고, 없으면 새 object를 register·name·activate합니다. Whitespace가 있으면 앞부분은 name, 뒷부분은 nanoseconds 단위 timeout이며 timeout은 object current state와 관계없이 설정됩니다. Timeout이 expire하면 source가 자동 deactivate됩니다. Read하면 이 interface로 만들어졌고 현재 active인 source names를 spaces로 구분해 반환합니다. |
Name-only activation과 optional nanosecond timeout을 구분합니다.
wake_lock은 create/activate하고 wake_unlock 또는 timeout은 deactivate합니다.
System power sysfs ABI: wake unlock
243-258| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/wake_unlock |
| Date | 2012년 2월 |
| KernelVersion | |
| Contact | Rafael J. Wysocki <[email protected]> |
| Description | `/sys/power/wake_unlock`은 `/sys/power/wake_lock`으로 만든 wakeup sources를 deactivate하게 합니다. 쓴 string을 deactivate할 source name으로 사용하며 해당 object가 존재하고 active이면 deactivate합니다. Read하면 이 interface로 만들어졌고 현재 inactive인 source names를 spaces로 구분해 반환합니다. |
System power sysfs ABI: pm print times
259-271| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/pm_print_times |
| Date | 2012년 5월 |
| KernelVersion | |
| Contact | Sameer Nanda <[email protected]> |
| Description | `/sys/power/pm_print_times`는 device suspend/resume에 걸린 시간을 print할지 제어합니다. 느린 device를 찾는 데 유용합니다. `1`은 printing enable, `0`은 disable이며 default는 `0`입니다. Read하면 current value를 표시합니다. |
Timing, debug logging과 filesystem sync controls의 enable values입니다.
System power sysfs ABI: pm wakeup irq
272-283| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/pm_wakeup_irq |
| Date | 2015년 4월 |
| KernelVersion | |
| Contact | Alexandra Yates <[email protected]> |
| Description | `/sys/power/pm_wakeup_irq`는 가장 최근 system suspend/resume cycle에서 kernel이 본 첫 wakeup interrupt, 즉 system wakeup용으로 armed된 IRQ line의 첫 interrupt 번호를 userspace에 보고합니다. Spurious wakeup interrupt 진단에 유용합니다. |
System power sysfs ABI: pm debug messages
284-295| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/pm_debug_messages |
| Date | 2017년 7월 |
| KernelVersion | |
| Contact | Rafael J. Wysocki <[email protected]> |
| Description | `/sys/power/pm_debug_messages`는 system suspend/hibernation infrastructure의 debug messages를 kernel log에 print할지 제어합니다. `1`은 enable, default `0`은 disable이며 read하면 current value를 반환합니다. |
System power sysfs ABI: resume offset
296-309| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/resume_offset |
| Date | 2018년 4월 |
| KernelVersion | |
| Contact | Mario Limonciello <[email protected]> |
| Description | `/sys/power/resume_offset`은 swap file 같은 disk를 사용해 hibernate할 때 kernel이 사용할 disk offset을 지정합니다. Read하면 다음 hibernation attempt에 사용할 current offset을 표시합니다. 이 sysfs file을 사용하면 disk offset에 대해 kernel command line으로 설정한 value를 override합니다. |
System power sysfs ABI: suspend stats
310-316| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats |
| Date | 2019년 7월 |
| KernelVersion | |
| Contact | Kalesh Singh <[email protected]> |
| Description | `/sys/power/suspend_stats` directory에는 suspend-related statistics가 들어 있습니다. |
Suspend/resume pipeline의 failure phase와 last-failure records를 묶었습니다.
System power sysfs ABI: success
317-323| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/success |
| Date | 2019년 7월 |
| KernelVersion | |
| Contact | Kalesh Singh <[email protected]> |
| Description | `/sys/power/suspend_stats/success`는 system sleep state 진입에 성공한 횟수입니다. |
System power sysfs ABI: fail
324-330| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/fail |
| Date | 2019년 7월 |
| KernelVersion | |
| Contact | Kalesh Singh <[email protected]> |
| Description | `/sys/power/suspend_stats/fail`은 system sleep state 진입에 실패한 횟수입니다. |
System power sysfs ABI: failed freeze
331-337| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/failed_freeze |
| Date | 2019년 7월 |
| KernelVersion | |
| Contact | Kalesh Singh <[email protected]> |
| Description | `/sys/power/suspend_stats/failed_freeze`는 process freezing이 실패한 횟수입니다. |
System power sysfs ABI: failed prepare
338-345| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/failed_prepare |
| Date | 2019년 7월 |
| KernelVersion | |
| Contact | Kalesh Singh <[email protected]> |
| Description | `/sys/power/suspend_stats/failed_prepare`는 system PM transition을 위해 모든 non-sysdev devices를 prepare하는 데 실패한 횟수입니다. |
System power sysfs ABI: failed resume
346-353| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/failed_resume |
| Date | 2019년 7월 |
| KernelVersion | |
| Contact | Kalesh Singh <[email protected]> |
| Description | `/sys/power/suspend_stats/failed_resume`은 non-sysdev devices의 `resume` callbacks 실행이 실패한 횟수입니다. |
System power sysfs ABI: failed resume early
354-361| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/failed_resume_early |
| Date | 2019년 7월 |
| KernelVersion | |
| Contact | Kalesh Singh <[email protected]> |
| Description | `/sys/power/suspend_stats/failed_resume_early`는 device `early resume` callbacks 실행이 실패한 횟수입니다. |
System power sysfs ABI: failed resume noirq
362-369| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/failed_resume_noirq |
| Date | 2019년 7월 |
| KernelVersion | |
| Contact | Kalesh Singh <[email protected]> |
| Description | `/sys/power/suspend_stats/failed_resume_noirq`는 device `noirq resume` callbacks 실행이 실패한 횟수입니다. |
System power sysfs ABI: failed suspend
370-377| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/failed_suspend |
| Date | 2019년 7월 |
| KernelVersion | |
| Contact | Kalesh Singh <[email protected]> |
| Description | `/sys/power/suspend_stats/failed_suspend`는 모든 non-sysdev devices의 `suspend` callbacks 실행이 실패한 횟수입니다. |
System power sysfs ABI: failed suspend late
378-385| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/failed_suspend_late |
| Date | 2019년 7월 |
| KernelVersion | |
| Contact | Kalesh Singh <[email protected]> |
| Description | `/sys/power/suspend_stats/failed_suspend_late`는 모든 devices의 `late suspend` callbacks 실행이 실패한 횟수입니다. |
System power sysfs ABI: failed suspend noirq
386-393| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/failed_suspend_noirq |
| Date | 2019년 7월 |
| KernelVersion | |
| Contact | Kalesh Singh <[email protected]> |
| Description | `/sys/power/suspend_stats/failed_suspend_noirq`는 모든 devices의 `noirq suspend` callbacks 실행이 실패한 횟수입니다. |
System power sysfs ABI: last failed dev
394-400| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/last_failed_dev |
| Date | 2019년 7월 |
| KernelVersion | |
| Contact | Kalesh Singh <[email protected]> |
| Description | `/sys/power/suspend_stats/last_failed_dev`는 suspend/resume callback이 마지막으로 실패한 device를 담습니다. |
System power sysfs ABI: last failed errno
401-408| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/last_failed_errno |
| Date | 2019년 7월 |
| KernelVersion | |
| Contact | Kalesh Singh <[email protected]> |
| Description | `/sys/power/suspend_stats/last_failed_errno`는 system sleep state 진입의 마지막 실패 attempt에서 나온 errno를 담습니다. |
System power sysfs ABI: last failed step
409-415| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/last_failed_step |
| Date | 2019년 7월 |
| KernelVersion | |
| Contact | Kalesh Singh <[email protected]> |
| Description | `/sys/power/suspend_stats/last_failed_step`은 suspend/resume path에서 마지막으로 실패한 step을 담습니다. |
System power sysfs ABI: last hw sleep
416-424| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/last_hw_sleep |
| Date | 2023년 6월 |
| KernelVersion | |
| Contact | Mario Limonciello <[email protected]> |
| Description | `/sys/power/suspend_stats/last_hw_sleep`은 가장 최근 system suspend-resume cycle에서 hardware sleep state에 머문 duration을 microseconds 단위로 담습니다. |
모든 values는 microseconds 단위입니다.
System power sysfs ABI: total hw sleep
425-433| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/total_hw_sleep |
| Date | 2023년 6월 |
| KernelVersion | |
| Contact | Mario Limonciello <[email protected]> |
| Description | `/sys/power/suspend_stats/total_hw_sleep`은 kernel boot 이후 hardware sleep state에 머문 aggregate time을 microseconds 단위로 담습니다. |
System power sysfs ABI: max hw sleep
434-444| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/suspend_stats/max_hw_sleep |
| Date | 2023년 6월 |
| KernelVersion | |
| Contact | Mario Limonciello <[email protected]> |
| Description | `/sys/power/suspend_stats/max_hw_sleep`은 hardware가 sleep-state duration으로 보고할 수 있는 maximum time을 microseconds 단위로 담습니다. Sleep cycle이 이보다 길면 `total_hw_sleep`과 `last_hw_sleep` values가 정확하지 않을 수 있습니다. |
System power sysfs ABI: sync on suspend
445-456| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/power/sync_on_suspend |
| Date | 2019년 10월 |
| KernelVersion | |
| Contact | Jonas Meurer <[email protected]> |
| Description | `/sys/power/sync_on_suspend`는 system suspend 중 userspace를 freeze한 뒤 devices를 suspend하기 전에 kernel이 filesystems에 `sync()`를 실행할지 제어합니다. `1`은 enable, `0`은 disable이며 read하면 current value를 반환합니다. Build-time `SUSPEND_SKIP_SYNC` config flag가 unset이면 default는 `1`, 그렇지 않으면 `0`입니다. |
Sleep states와 suspend mode
sysfs-power:1-41Unified /sys/power interface에서 freeze·standby·mem·disk state와 mem suspend의 s2idle·shallow·deep operating mode를 선택합니다.