You are not logged in.

#1 2023-11-23 09:19:44

sorkaud
Member
Registered: 2015-07-15
Posts: 43

Lid switch is not detected by libinput. lenovo ideapad slim 3 15abr8

Hi.

I have a problem that my laptop does not go into the suspend mode when I close my laptop.
I already changed my  /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. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the logind.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# Use 'systemd-analyze cat-config systemd/logind.conf' to display the full config.
#
# See logind.conf(5) for details.

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
HandlePowerKey=suspend
HandlePowerKeyLongPress=poweroff
#HandleRebootKey=reboot
#HandleRebootKeyLongPress=poweroff
#HandleSuspendKey=suspend
#HandleSuspendKeyLongPress=hibernate
#HandleHibernateKey=hibernate
#HandleHibernateKeyLongPress=ignore
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
LidSwitchIgnoreInhibited=yes
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodesMax=
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#StopIdleSessionSec=infinity

Also If I do

 sleep 3 && cat /proc/acpi/button/lid/LID/state 

and close the lid, it says "closed"
So my Lid switch is perfectly normal ( I also dual boot into the window and on windows it is working)

If I do

 systemctl suspend 

  It goes to sleep.


The problem I found is that there is no sign of lid switch on my journalctl
I also tried

 sudo libinput debug-events 

and type some chars and close the lid and open the lid.

The result is

-event2   DEVICE_ADDED            Video Bus                         seat0 default group1  cap:k
-event1   DEVICE_ADDED            Power Button                      seat0 default group2  cap:k
-event0   DEVICE_ADDED            Lid Switch                        seat0 default group3  cap:S
-event4   DEVICE_ADDED            Ideapad extra buttons             seat0 default group4  cap:k
-event5   DEVICE_ADDED            FTCS0038:00 2808:0101 Mouse       seat0 default group5  cap:p left scroll-nat scroll-button
-event6   DEVICE_ADDED            FTCS0038:00 2808:0101 Touchpad    seat0 default group5  cap:pg  size 100x67mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwt-on dwtp-on
-event3   DEVICE_ADDED            AT Translated Set 2 keyboard      seat0 default group6  cap:k
 event3   KEYBOARD_KEY            +0.000s	*** (-1) pressed
 event3   KEYBOARD_KEY            +0.118s	*** (-1) released
 event3   KEYBOARD_KEY            +0.309s	*** (-1) pressed
 event3   KEYBOARD_KEY            +0.408s	*** (-1) released
 event3   KEYBOARD_KEY            +6.999s	*** (-1) pressed
 event3   KEYBOARD_KEY            +7.110s	*** (-1) pressed

Only the keyboard seems recognized by libinput, although there is Lid switch with event 0.


How should I fix this?

I use X11 / outdated xmonad BTW.

Offline

Board footer

Powered by FluxBB