在Debian 系统上,如何实现合上电脑不关机的效果?
可以修改配置文件:
sudo vim /etc/systemd/logind.conf
1.找到 HandleLidSwitch
,将其值改为 ignore
(处理盖子开关为忽略)
2.将 LidSwitchIgnoreInhibited
的值改为 yes
(盖子开关忽略抑制)
修改后结果如下:
HandleLidSwitch=ignore
LidSwitchIgnoreInhibited=yes
3.重启系统服务使更改生效
sudo systemctl restart systemd-logind