在Debian 系統上,如何實現合上電腦不關機的效果?
可以修改配置文件:
sudo vim /etc/systemd/logind.conf
1.找到 HandleLidSwitch
,將其值改為 ignore
(處理蓋子開關為忽略)
2.將 LidSwitchIgnoreInhibited
的值改為 yes
(蓋子開關忽略抑制)
修改后結果如下:
HandleLidSwitch=ignore
LidSwitchIgnoreInhibited=yes
3.重啟系統服務使更改生效
sudo systemctl restart systemd-logind