设置Ubuntu笔记本合盖不关机

Posted by on June 15, 2024 · 1 min read

编辑/etc/systemd/logind.conf文件:

sudo vi /etc/systemd/logind.conf

找到#HandleLidSwitch=suspend,改为HandleLidSwitch=ignore

重启systemd-logind:

sudo systemctl restart systemd-logind.service

完成。