一、设置不休眠

Kali之——设置不休眠(关闭笔记本盖子不休眠 - Preventing Lid Close Suspension)_Kali

二、关闭笔记本盖子不休眠 - Preventing Lid Close Suspension

安装包:

sudo apt-get install gnome-tweak-tool

之后具体操作如下:

For GNOME, this is now handled by systemd in Fedora 18+.

As root, edit /etc/systemd/logind.conf. You're looking for the definition for HandleLidSwitch, it may be commented out.

The default is: HandleLidSwitch=suspend

You can set it to ignore, poweroff, reboot, halt, suspend, hibernate, hybrid-sleep, lock or kexec. Since your laptop screen is broken, you just want to set it to ignore, so add this to /etc/systemd/logind.conf:

HandleLidSwitch=ignore

Then, run systemctl restart systemd-logind, or simply reboot for it to take effect.