Skip to content

Instantly share code, notes, and snippets.

@h1code2
Last active September 5, 2024 14:30
Show Gist options
  • Save h1code2/33c3c5a9000fc231d1dc6eb968953965 to your computer and use it in GitHub Desktop.
Save h1code2/33c3c5a9000fc231d1dc6eb968953965 to your computer and use it in GitHub Desktop.
Proxmox VE /Debian /Ubuntu 设置合上笔记本盖子不休眠的方法 #pve #笔记本

设置合上笔记本盖子不休眠的方法

众所周知,服务器是没有AB面的(KVM当然不算了),燃鹅笔记本有,不能让屏幕一直打开亮着吧,但是默认都是关闭盖子休眠,咋办呢

ěi éi,这不是Debian系的嘛

编辑一哈/etc/systemd/logind.conf

#HandlePowerKey按下电源键后的行为,默认power off
#HandleSleepKey 按下挂起键后的行为,默认suspend
#HandleHibernateKey按下休眠键后的行为,默认hibernate
#HandleLidSwitch合上笔记本盖后的行为,默认suspend(改为ignore;即合盖不休眠)在原文件中,还要去掉当前行和LidSwitchIgnoreInhibited=yes这行前面的 #

然后再重启服务

# service systemd-logind restart
reboot
@puzzle9
Copy link

puzzle9 commented Sep 5, 2024

谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment