Ubuntu 22.04 Desktop 笔记本屏幕合盖设置

it

安装了操作系统 Ubuntu 22.04  的笔记本合盖时,

默认触发系统休眠,如果想变更为仅锁定屏幕,

可以修改配置文件,

/etc/systemd/logind.conf

HandleLidSwitch 属性,

HandleLidSwitch=suspend

修改为

HandleLidSwitch=lock

意思是合盖动作不休眠而是锁定,

然后重启下面的服务即可生效。

sudo systemctl restart systemd-logind.service

 

参考资料:

https://askubuntu.com/questions/1377471/how-can-i-tell-ubuntu-to-only-turn-the-screen-off-when-i-close-my-laptop-lid