笔记本电脑Linux系统,修改合盖不休眠
sudo vi /etc/systemd/logind.conf
# This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # Entries in this file show the compile time defaults. # You can change settings by editing this file. # Defaults can be restored by simply deleting this file. # # See logind.conf(5) for details. [Login] #NAutoVTs=6 #ReserveVT=6 #KillUserProcesses=no #KillOnlyUsers= #KillExcludeUsers=root #InhibitDelayMaxSec=5 #HandlePowerKey=poweroff #HandleSuspendKey=suspend #HandleHibernateKey=hibernate HandleLidSwitch=lock #这里加上即是合盖不休眠
#HandlePowerKey按下电源键后的行为,默认power off
#HandleSleepKey 按下挂起键后的行为,默认suspend
#HandleHibernateKey 按下休眠键后的行为,默认hibernate
#HandleLidSwitch 合上笔记本盖后的行为,默认suspend
重启命令生效
systemctl restart systemd-logind

浙公网安备 33010602011771号