Score:0

Lid switch bouncing for ThinkPad laptop Ubuntu 18.04

br flag

I have a Lenovo Thinkpad T540p with Ubuntu 18.04 and when I manually suspend the laptop & then close the lid, the laptop actually resumes. Looking through the side of the lid, I can see the screen flickering.

Running journalctl -u systemd-logind.service I can see the following:

 iul 18 20:36:08 vt-thinkpad systemd-logind[966]: Lid closed.
 iul 18 20:36:08 vt-thinkpad systemd-logind[966]: Lid opened.
 iul 18 20:36:08 vt-thinkpad systemd-logind[966]: Lid closed.
 iul 18 20:36:08 vt-thinkpad systemd-logind[966]: Lid opened.
 iul 18 20:36:08 vt-thinkpad systemd-logind[966]: Lid closed.
 iul 18 20:36:08 vt-thinkpad systemd-logind[966]: Lid opened.
 iul 18 20:36:08 vt-thinkpad systemd-logind[966]: Lid closed.
 iul 18 20:36:09 vt-thinkpad systemd-logind[966]: Lid opened.
 iul 18 20:36:09 vt-thinkpad systemd-logind[966]: Lid closed.
 iul 18 20:36:09 vt-thinkpad systemd-logind[966]: Lid opened.
 iul 18 20:36:09 vt-thinkpad systemd-logind[966]: Lid closed.
 iul 18 20:36:09 vt-thinkpad systemd-logind[966]: Lid opened.
 iul 18 20:36:09 vt-thinkpad systemd-logind[966]: Lid closed.
 iul 18 20:36:09 vt-thinkpad systemd-logind[966]: Lid opened.
 iul 18 20:36:09 vt-thinkpad systemd-logind[966]: Lid closed.
 iul 18 20:36:09 vt-thinkpad systemd-logind[966]: Lid opened.

This tells me that the hardware switch might be broken & it bounces.

I have tried the following changes:

  • Gnome Tweak Tools -> Don't suspend on lid close

  • /etc/systemd/logind.conf changed to

    24 HandleLidSwitch=ignore
    25 HandleLidSwitchDocked=ignore 
    26 #PowerKeyIgnoreInhibited=no
    27 #SuspendKeyIgnoreInhibited=no
    28 #HibernateKeyIgnoreInhibited=no
    29 LidSwitchIgnoreInhibited=no
    
  • /etc/UPower/UPower.conf changed to:

    31 #
    32 # Some laptops are broken. The lid state is either inverted, or stuck
    33 # on or off. We can't do much to fix these problems, but this is a way
    34 # for users to make the laptop panel vanish, a state that might be used
    35 # by a couple of user-space daemons. On Linux systems, see also
    36 # logind.conf(5).
    37 #
    38 # default=false
    39 IgnoreLid=true
    

I am a bit lost. Ideally I would find a way to debounce/ignore the repeated Open/Close cycle happening in less than 1s or so, but I am good with completely ignoring the Lid switch if possible. Because of this issue, I am unable to close the lid when suspending my laptop. I can only turn it off, which is not a viable option for me.

What can I do about this?

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.