笔记本电脑盖子关闭并重新打开后自动暂停

笔记本电脑盖子关闭并重新打开后自动暂停

我当前的内核版本

Linux xorist-Blade-Stealth 4.18.0-041800-generic #201808122131 SMP Sun Aug 12 21:33:20 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

我遇到的问题

首先,我觉得需要注意的是,我正在使用新安装的 Ubuntu 版本,我唯一做的就是更新内核。这次内核更新不可能与我遇到的问题直接相关,因为它在更新之前就存在了。

每次启动笔记本电脑时,它都会正常工作,直到我合上盖子,等待它挂起,重新打开它并让它重新唤醒。完成此过程后,它处于正常唤醒状态,大约需要 15-30 秒,它才会自动挂起。

如果我按下电源按钮将其唤醒并再次登录,它将在约 15-30 秒后继续自动挂起。这个问题一直存在,直到我完全重新启动笔记本电脑。

我已经尝试了以下所有答案帖子,但没有任何帮助。

有人知道如何解决此问题吗?

编辑

这是运行 cat /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=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#UserTasksMax=33%

答案1

首先要尝试

使用sudo -H gedit /etc/systemd/logind.conf并搜索此行:

#HandlLidSwitch=

更改为:

HandleLidSwitch=ignore

然后保存文件并重新启动。

答案2

这是系统设置的问题...?!

进入桌面菜单中的“系统设置”。然后进入“能源”。您可以在此处设置以下内容:

关闭屏幕 - 改为:“永不”

自动设置为待机 - 至:“关闭”

当关闭键时-至:“无”

这应该是解决办法。

(重新启动机器,一切就都正常了。)

您可以关闭笔记本电脑的盖子,它仍然可以运行,只要您打开盖子 - 只有屏幕关闭,但不暂停。

答案3

这是一个相当老的问题,但我自己解决了同样的问题后,我觉得我应该在这里发布解决方案。

内核参数button.lid_init_state=open已为我解决了 Fedora、Arch 和 Ubuntu 上的问题,同时允许笔记本电脑在合上盖子时仍处于挂起状态。将其放入 /etc/default/grub,然后运行 ​​update-grub

相关内容