update(debian12-disable-sleep)
This commit is contained in:
parent
ae247dbe4d
commit
f74876a0ef
@ -1,15 +1,37 @@
|
|||||||
## 合上笔记本盖子不休眠
|
## 合上笔记本盖子不休眠
|
||||||
1. 编辑 `/etc/systemd/logind.conf`
|
|
||||||
2. 找到 `#HandleLidSwitch` 这一行,意思是合上笔记本上盖后的行为,默认suspend,修改为ignore(即合盖不休眠)。然后还要去掉前面的#。保存文件。
|
1. 编辑 `/etc/systemd/logind.conf`
|
||||||
3. 重启systemd服务:
|
2. 找到 `#HandleLidSwitch` 这一行,意思是合上笔记本上盖后的行为,默认suspend,修改为ignore(即合盖不休眠)。然后还要去掉前面的#。保存文件。
|
||||||
|
3. 重启systemd服务:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
service systemd-logind restart
|
service systemd-logind restart
|
||||||
```
|
```
|
||||||
|
|
||||||
## 关闭屏幕
|
## 关闭屏幕
|
||||||
1. 安装vbetool软件:apt-get install vbetool
|
|
||||||
2. 关闭显示器:`vbetool dpms off`
|
1. 安装vbetool软件:apt-get install vbetool
|
||||||
|
2. 关闭显示器:`vbetool dpms off`
|
||||||
打开显示器:`vbetool dpms on`
|
打开显示器:`vbetool dpms on`
|
||||||
|
|
||||||
|
## 禁用休眠
|
||||||
|
|
||||||
|
```shell
|
||||||
|
mkdir -p /etc/systemd/sleep.conf.d/
|
||||||
|
touch /etc/systemd/sleep.conf.d/nosuspend.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
nosuspend.conf:
|
||||||
|
|
||||||
|
```nosuspend.conf
|
||||||
|
[Sleep]
|
||||||
|
AllowSuspend=no
|
||||||
|
AllowHibernation=no
|
||||||
|
AllowSuspendThenHibernate=no
|
||||||
|
AllowHybridSleep=no
|
||||||
|
```
|
||||||
|
|
||||||
## 参考资料
|
## 参考资料
|
||||||
[用笔记本作为PVE服务器如何关闭屏幕以节电](https://blog.csdn.net/William_Lee1333/article/details/128095617)
|
|
||||||
|
[用笔记本作为PVE服务器如何关闭屏幕以节电](https://blog.csdn.net/William_Lee1333/article/details/128095617)
|
||||||
|
[在 Debian 12 上禁用自动工作站睡眠](https://synay.net/zh/support/kb/disabling-automatic-workstation-sleep-debian-12)
|
||||||
|
Loading…
Reference in New Issue
Block a user