Files
nexus/wiki/sources/ubuntu-jin-yong-he-gai-qian-mian.md
2026-04-14 16:02:50 +08:00

32 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Ubuntu禁用合盖休眠"
type: source
tags: [ubuntu]
date: 2026-04-14
source_file: raw/Technical/Home Office/🟠Ubuntu禁用合盖休眠.md
---
## Summary
- 核心主题让Ubuntu服务器在笔记本合盖后继续运行
- 问题域:服务器笔记本合盖休眠行为控制
- 方法/机制修改systemd-logind配置或mask休眠target
- 结论/价值:实现合盖继续运行,适合部署为服务器的笔记本场景
## Key Claims
- Ubuntu 24.04中笔记本合盖休眠行为由systemd-logind控制
- 修改HandleLidSwitch、HandleLidSwitchExternalPower、HandleLidSwitchDocked为ignore可禁用合盖休眠
- 使用systemctl mask可以彻底禁用系统休眠功能内核级别
## Key Concepts
- [[systemd-logind]]:系统登录管理器,控制电源管理行为
- [[休眠target]]sleep.target/suspend.target/hibernate.target/hybrid-sleep.target
## Key Entities
- [[Ubuntu]]Linux发行版
## Connections
- [[Ubuntu]] ← 配置 ← [[systemd-logind]]
- [[systemd-logind]] ← 控制 ← [[休眠target]]
## Contradictions