我希望在我拥有的 Debian 10 机器上忽略笔记本电脑盖子的关闭。该笔记本电脑是 2017 款 Macbook Air。
许多在线指南都说 和HandleLidSwitch、HandleLidSwitchExternalPower和HandleLidSwitchDocked必须设置为忽略。
这些行直接来自 /etc/systemd/logind.conf 以表明我已经这样做了:
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HndleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
LidSwitchIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
Run Code Online (Sandbox Code Playgroud)
然后我systemctl restart systemd-logind以 root 身份运行,但问题仍然存在。
即使重新启动计算机后我也会遇到同样的问题。
有趣的是,该文件似乎没有被正确解析,如该命令的输出所示:
nick@debserver:~$ busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager HandleLidSwitch
s "suspend"
Run Code Online (Sandbox Code Playgroud)
我不确定我需要做什么。