笔记本电脑在“每隔一次”关闭盖子时不会暂停

笔记本电脑在“每隔一次”关闭盖子时不会暂停

我的 ubuntu 20.04 笔记本电脑在合上盖子时总是挂起,直到我第一次插入显示器。拔下显示器后我才意识到这个错误。我认为显示器损坏了 Ubuntu。

目前的行为:似乎每次我合上盖子时,它都会暂停。并不是每次都是这样,但你明白我的意思。在它不暂停的时候,它清楚地知道刚刚发生了什么,因为当我打开它时,GNOME 中的某些元素会闪烁一秒钟的白色,就像有东西刷新了一样。我还确信屏幕没有关闭,因为在盖子合上时我可以看到盖子下面。

暂停功能本身仍然有效,因为我仍然可以单击 gnome 顶部栏中某个按钮上的暂停按钮。

我知道这个网站上还有其他关于悬架问题的问题,但这个问题有所不同。

编辑:我还找到了该文件/etc/systemd/logind.conf,它有关于笔记本电脑盖的参数。我不知道哪一个导致了问题,所以这里是输出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
#HandleLidSwitchExternalPower=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


我在安装当天tlptlp-stat第一次连接了显示器,因此显示器可能与此无关,问题可能是由 TLP 引起的。我不确定是否应该卸载,tlp因为我的笔记本电脑电池对 Ubuntu 不太好,而 tlp 可以节省电量。但如果你认为它可以解决问题,我会卸载它。

另一个可能的问题是,systemd认为我已“停靠”(来自上面的输出:)#HandleLidSwitchDocked=ignore并“ ignores”它。我尝试更改ignoresuspend,但没有。它不起作用。

我认为如果它认为它处于对接状态,则很有可能。如果这有帮助,我进行了实验,我发现当我在显示器连接时关闭盖子时,显示器会像笔记本电脑屏幕一样充当一个屏幕。因此,基本上它在关闭并连接到显示器时不会暂停。

但我几乎可以肯定这与那台显示器有关。

Ubuntu 20.04

德:侏儒

笔记本电脑:戴尔 Inspiron 17 3000

相关内容