Laptop doesn't suspend on lid close
Pretty much what the title says.
It's a pretty old and "used" setup i'm having right now. I considered a fresh install several times but then i always come back to the "clean and learn"-approach of fixing stuff instead of throwing it away. My host is a Lenovo Thinkpad X1 Carbon 5th Gen.
I've had i3, gnome, dwm and KDE installed as my window managers/ DEs. I'm currently running KDE as my main DE.
What i've tried so far:
- Installed a different kernel, namely the xanmod-configuration (which get's compiled locally) and the LTS kernel. It's better there but it doesn't suspend reliably nevertheless.
- Looked at the power-settings in the KDE system-settings, but everything seams to be set up correctly
- Edited
logind.conffor suspend to work in docked or plugged in state. It works more reliably, if the laptop is docked!
logind.conf:
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
Right now i'm pretty much out of ideas. Does anybody know where i can look additionally? I will happily provide more information if required.
About this post
- Posted
- Archived
- Score
- 4 · 100% up
- Kind
- Text
- ID
- eq0evh
10 comments
What kind of setup exactly in regards to your swap partition and declaring the resume variable do you have?
Wow, that is a good question i haven't thought of before!
I have 16GB Ram and a swapfile (at /) with size 8GB. Will read about resume variables and come back here shortly
Ok, i have to say i haven't even set anything for the resume-variable! The LTS-Kernel is installed as a binary and for Xanmod i only set microarchitecture to 38, which is equivalent to native.
But as i interpret the Archwiki-Page, that's only relevant if i have a swap partition instead of a swapfile (?)
Well the wiki clearly states that you have to set a kernel parameter, regardless your swap setup.
That is something I have zero knowledge of, to be honest.
Did you check journald for more info? Try
journalctl | lessordmesgand check if there's any info. Sometimes it'll tell you which app/driver prevented sleep. There's also a possibility that the laptop is going to sleep and waking immediately.If you are having an immediate wake from sleep, you can check (for thinkpads only):
/sys/devices/platform/thinkpad_acpi/wakeup_reason0 will be normal behavior, 1 or 2 have to do with docks/bay ejection (IIRC).
Ironically i didn't have a suspend-issue since i posted. But i will check when it happens again.
I have a similar problem on my Laptop with Fedora installed.
When pressing the "suspend" key on my keyboard I see the expected behavior (doing "suspend" as configured in
logind.conf).But when closing the Lid, the screen only flickers but stays on and nothing happens.I configured
logind.conftoHandleLidSwitch=suspendand I also get a entry in my jounal when opening/closing the lid (e.g.systemd-logind[1084]: Lid closed.). But beside that I dont see anything in the logs.I also fiddled with various settings in
logind.confandsleep.confand also tried to exclude problems coming from gnome-shell e.g. , but nothing helped till now.Edit:
Seems that this was caused from a script which gnome-tweaks had in its autostart for the lid options gnome-tweaks has, and that was falsely activated.
Furthermore the
LidSwitchIgnoreInhibited=yesoption inlogind.confdidn't change anything regarding the gnome-tweaks inhibitor.