先備份,
sudo cp /etc/systemd/logind.conf /etc/systemd/logind.conf.bak
修改:
sudo vim /etc/systemd/logind.conf
Just uncomment the "HandleLidSwitch=suspend" and change 'suspend' to the most appropriate option (ignore,halt,poweroff,kexec,hibernate,reboot,lock).
HandleLidSwitch=ignore
systemctl restart systemd-logind
來源:https://forums.kali.org/showthread.php?26887-SOLVED-Kali-Linux-laptop-lid-close-actions