Score:1

Laptop Not Suspend when Lid Closed "every other time"

ar flag

My ubuntu 20.04 laptop used to always suspend wen the lid was closed, UNTIL I plugged in a monitor for the first time. I realized this error AFTER I unplugged the monitor. I think that the monitor has broken Ubuntu.

Current behavior: It seems like every other time I close the lid, it suspends. It's not exactly every other time, but you get the point. For times when it DOESN'T suspend, it clearly knows something has just happened because when I open it, some elements in GNOME flash white-ish for a second, as if something refreshed. I am also sure that the screen doesn't turn off because I can see under the lid while it's closed.

Suspension itself still works because I am still able to click the suspend button in one of the buttons in the gnome top bar.

I know that there are other questions on this site about suspension problems, but this is different.

EDIT: I also found the file /etc/systemd/logind.conf and it has parameters about laptop lid. I don't know which one is causing the problem, so here is the output of 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


I installed tlp and tlp-stat on the same day that I connected a monitor for the first time, so the monitor could possibly have nothing to do with it and the problem could be caused by TLP. I'm not sure if I should uninstall tlp because my laptop battery isn't very good with Ubuntu and tlp saves power. But if you think that it would solve the problem, I will uninstall it.

Another possible problem could be that systemd thinks I'm "docked" (from output above: #HandleLidSwitchDocked=ignore) and "ignores" it.

Ubuntu 20.04

DE: GNOME

laptop: Dell Inspiron 17 3000

Joepie Es avatar
eg flag
Have you tried to change '#HandleLidSwitchDocked=ignore' in '#HandleLidSwitchDocked=suspend'? Does it have any result if you do? <br>The monitor can't break your Ubuntu. I'm pretty sure it can think that you don't want to suspend though.
AlexFullinator avatar
ar flag
@JoepieEs No, I haven't tried that yet but I will try now.
AlexFullinator avatar
ar flag
@JoepieEs BTW...do you know of any way to check if systemd thinks I'm "docked," because that could also help
Joepie Es avatar
eg flag
No Alex, sorry.
pa4080 avatar
cn flag
Here is a particularly related topic: [How do I disable the touchpad when the lid is twisted or closed?](https://askubuntu.com/q/980997/566421)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.