parent
b6901d3b70
commit
da62224859
|
@ -1,6 +1,17 @@
|
||||||
# Linux 电源控制
|
# Linux 电源管理子系统
|
||||||
|
|
||||||
|
## 1.用户态控制方法
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
echo standby > /sys/power/state
|
||||||
# Suspend to RAM
|
# Suspend to RAM
|
||||||
echo "mem" > /sys/power/state
|
echo "mem" > /sys/power/state
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 2.源码分析
|
||||||
|
|
||||||
|
### 2.1.Suspend
|
||||||
|
|
||||||
|
Suspend 主流程源码在 \<kernel source\>/kernel/power/suspend.c 文件中。主要调用流程如下:
|
||||||
|
|
||||||
|
![]()
|
||||||
|
|
Loading…
Reference in New Issue