我的笔记本电脑有时在盖子关闭时挂起,有时不挂。
-- Logs begin at Sat 2015-02-14 17:45:21 PST, end at Tue 2015-08-18 10:53:09 PDT. --
Aug 18 08:51:05 gurney systemd[1]: Starting Login Service...
Aug 18 08:51:06 gurney systemd-logind[658]: New seat seat0.
Aug 18 08:51:06 gurney systemd[1]: Started Login Service.
Aug 18 08:51:06 gurney systemd-logind[658]: Watching system buttons on /dev/input/event5 (Power Button)
Aug 18 08:51:06 gurney systemd-logind[658]: Watching system buttons on /dev/input/event7 (Video Bus)
Aug 18 08:51:06 gurney systemd-logind[658]: Watching system buttons on /dev/input/event3 (Lid Switch)
Aug 18 08:51:06 gurney systemd-logind[658]: Watching system buttons on /dev/input/event4 (Sleep Button)
Aug 18 08:51:06 gurney systemd-logind[658]: Watching system buttons on /dev/input/event6 (ThinkPad Extra Buttons)
Aug 18 08:51:12 gurney systemd-logind[658]: New session 1 of user anders.
Aug 18 08:51:34 gurney systemd-logind[658]: Lid closed.
Aug 18 08:51:37 gurney systemd-logind[658]: Lid opened.
Aug 18 08:51:44 gurney systemd-logind[658]: Lid closed.
Aug 18 08:51:48 gurney systemd-logind[658]: Lid opened.
Aug 18 08:51:50 gurney systemd-logind[658]: Lid closed.
Aug 18 08:51:53 gurney systemd-logind[658]: Lid opened.
Aug 18 08:51:57 gurney systemd-logind[658]: Lid closed.
Aug 18 08:51:59 gurney systemd-logind[658]: Lid opened.
Aug 18 09:27:32 gurney systemd-logind[658]: Lid closed.
Aug 18 09:27:32 gurney systemd-logind[658]: Suspending...
Aug 18 09:27:41 gurney systemd-logind[658]: Lid opened.
Aug 18 09:27:41 gurney systemd-logind[658]: Operation finished.
Aug 18 09:27:44 gurney systemd-logind[658]: Lid closed.
Aug 18 09:27:47 gurney systemd-logind[658]: Lid opened.
Aug 18 09:27:54 gurney systemd-logind[658]: Lid closed.
Aug 18 09:28:01 gurney systemd-logind[658]: Lid opened.
Aug 18 09:43:56 gurney systemd-logind[658]: Lid closed.
Aug 18 09:43:56 gurney systemd-logind[658]: Suspending...
Aug 18 09:44:02 gurney systemd-logind[658]: Lid opened.
Aug 18 09:44:02 gurney systemd-logind[658]: Operation finished.
Aug 18 09:44:05 gurney systemd-logind[658]: Lid closed.
Aug 18 09:44:12 gurney systemd-logind[658]: Lid opened.我想要在盖子关闭时可靠地触发,我不知道为什么没有,我能做些什么来调查原因呢?
到目前为止,我已经试着查看日志输出(大致上是这样的--它证实了有一个问题,但没有更多),以及在盖子关闭/打开过程中udevadm monitor的输出,但是那里的输出很嘈杂,也没有那么大的帮助。
发布于 2015-08-18 18:25:55
有些版本的systemd拒绝挂起,如果您在启动计算机后三分钟内关闭盖子,并且可能在恢复后再关闭一个较小的超时时间。这些数量是不可配置的。这会是你的问题吗?
有关调试工具,请参阅这篇文章以提高日志级别以使logind实际上告诉您为什么不挂起(不是非常直观的):
http://lists.freedesktop.org/archives/systemd-devel/2013-March/010004.html
基于@ajp的评论,假设您的系统是最新的,您想要的解决方案似乎是将HoldoffTimeoutSec=0s添加到/etc/systemd/logind.conf中。事实上,这一点现在似乎已经记录在systemd.conf的手册页面中了。我很高兴我从回答这个问题中学到了一些东西。
https://unix.stackexchange.com/questions/224037
复制相似问题