title: "Kali安装后合上盖子不休眠问题"
date: 2020-08-28
tags: ["linux","debian","kali"]
categories: ["linux","debian","kali"]
转载于 https://www.jianshu.com/p/f4f1ba2e92cf
安装工具包:
apt-get install pm-utils laptop-mode-tools -y
修改配置文件/etc/laptop-mode/laptop-mode.conf
ENABLE_LAPTOP_MODE_ON_BATTERY=1 #使用电池
ENABLE_LAPTOP_MODE_ON_AC=1 #使用电源
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=1 #合上屏幕
重启服务
/etc/init.d/laptop-mode restart
cat /proc/sys/vm/laptop_mode #检查配置 输出不是0就行
THE END
若要设置不休眠 修改 /etc/systemd/logind.conf
HandleLidSwitch=ignore
然后重启服务
systemctl restart systemd-logind.service
Q.E.D.