Auto-sync: 2026-04-17 08:37
This commit is contained in:
28
wiki/concepts/HandleLidSwitch.md
Normal file
28
wiki/concepts/HandleLidSwitch.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: "HandleLidSwitch"
|
||||
type: concept
|
||||
tags: [systemd, power-management]
|
||||
date: 2026-04-17
|
||||
---
|
||||
|
||||
## Definition
|
||||
systemd-logind 的电源管理配置项,用于控制笔记本合盖时的系统行为。
|
||||
|
||||
## Configuration Options
|
||||
- `ignore`:不执行任何操作,系统继续运行
|
||||
- `suspend`:进入待机状态
|
||||
- `hibernate`:进入休眠状态
|
||||
- `poweroff`:关机
|
||||
- `lock`:锁定屏幕
|
||||
|
||||
## Related Config Items
|
||||
- `HandleLidSwitch`:合盖时的动作(电池模式下)
|
||||
- `HandleLidSwitchExternalPower`:连接外接电源合盖时的动作
|
||||
- `HandleLidSwitchDocked`:连接扩展坞合盖时的动作
|
||||
|
||||
## Use Cases
|
||||
- 服务器场景:设置 ignore 防止合盖后系统休眠
|
||||
- 笔记本场景:合盖自动锁定或待机
|
||||
|
||||
## Connections
|
||||
- controlled_by → [[systemd-logind]]
|
||||
Reference in New Issue
Block a user