You are not logged in.

#1 2019-12-09 03:59:18

dyster
Member
Registered: 2019-12-09
Posts: 4

Laptop lid changes is not detected by systemd

Hi

Since a couple of days ago, my laptop stopped suspending when I closed the lid. I'm not really sure what caused it. I have recently installed the optimus-manager, but the issue wasn't there for the first few days, so I really doubt it to be the problem. The system is completely up to date.

I use Openbox as WM; no DE installed.

Here is the output of

# journalctl --unit=systemd-logind --follow

when I close the lid, wait for ~ 10 seconds and open it again.

-- Logs begin at Sun 2019-07-28 15:14:39 EDT. --
Dec 08 22:41:55 moe systemd-logind[4960]: Watching system buttons on /dev/input/event0 (Lid Switch)
Dec 08 22:41:55 moe systemd-logind[4960]: Watching system buttons on /dev/input/event1 (Sleep Button)
Dec 08 22:41:55 moe systemd-logind[4960]: Watching system buttons on /dev/input/event4 (MosArt USB 2.4G Keyboard)
Dec 08 22:41:55 moe systemd-logind[4960]: Watching system buttons on /dev/input/event6 (MosArt USB 2.4G Keyboard Consumer Control)
Dec 08 22:41:55 moe systemd-logind[4960]: Watching system buttons on /dev/input/event7 (MosArt USB 2.4G Keyboard System Control)
Dec 08 22:41:55 moe systemd-logind[4960]: Watching system buttons on /dev/input/event3 (AT Translated Set 2 keyboard)
Dec 08 22:41:55 moe systemd[1]: Started Login Service.
Dec 08 22:41:55 moe systemd-logind[4960]: New session 1 of user dyster.
Dec 08 22:41:57 moe systemd-logind[4960]: Removed session 1.
Dec 08 22:41:59 moe systemd-logind[4960]: New session 3 of user dyster.

And here's the  output of

systemd-inhibit
WHO            UID USER PID COMM           WHAT  WHY                                       MODE 
NetworkManager 0   root 489 NetworkManager sleep NetworkManager needs to turn off networks delay

1 inhibitors listed.

And here is the contents of /etc/systemd/logind.conf:

[Login]
...
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
...

Does this mean that my laptop is damaged, or something else might be causing the problem?


Any help is appreciated.

Last edited by dyster (2019-12-09 04:01:14)

Offline

#2 2019-12-09 10:51:40

koffeinfriedhof
Member
Registered: 2017-11-30
Posts: 89

Re: Laptop lid changes is not detected by systemd

Hi!

Have a look at your acpi-events in journal. An example from x220:

Dec 09 11:44:23 x220arch systemd-logind[763]: Lid closed.
Dec 09 11:44:23 x220arch root[22568]: LID closed
Dec 09 11:44:23 x220arch systemd-logind[763]: Lid opened.
Dec 09 11:44:23 x220arch root[22570]: LID opened

You have to load the appropriate acpi modules (or try them). Messages come from /etc/acpi/handler.sh.

Perhaps it is an hardware issue too, my Thinkpad doesn't trigger these events any more because it lost its magnetic counterpart in palm rest (Just triggered it manually for the output).

Offline

#3 2019-12-21 10:31:58

theodore
Member
Registered: 2008-09-09
Posts: 151

Re: Laptop lid changes is not detected by systemd

I have a similar issue. Actually what happens in my case is that when I open the lid sometimes the systemd-logind does not detect it so it stays to the previous status. So next time that I close the lid it still thinks that it is closed and it does not get into sleep. Now if I open the lid again from this state it recognizes that it has been opened and next time I close the lid, sleep works fine again. It seems to be systematic the couple of times that I've tried it, the "Lid opened" status is recognized every second time I close and open the lid. I do not know why this is happening, any idea what to try?

Last edited by theodore (2019-12-21 10:35:25)

Offline

Board footer

Powered by FluxBB