[Linux] Ubuntu 笔记本关闭盒盖休眠

0. 问题

在笔记本上安装Ubuntu 20.04之后发现合上屏幕会导致系统休眠, 这显然不符合它作为一个服务器应该做的事情

1. (root权限) 编辑”/etc/systemd/logind.conf”, 编辑行:

HandleLidSwitch=ignore
LidSwitchIgnoreInhibited=yes

2. 重启 systemd-login 服务:

sudo systemctl restart systemd-logind

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注