You are not logged in.

#1 2015-02-04 23:57:08

TheGuyWithTheFace
Member
Registered: 2012-12-09
Posts: 113

[SOLVED] How to set lid open behavior?

Lately my ThinkPad X201 has developed a habit of resuming from suspend while still closed in my bag. I've observed that this only happens when pressure is applied to a specific area of the lid near the hinge, such as when I put my bookbag on with the laptop wedged between books. My guess is that it's just taken one too many hits, and whatever mechanism for detecting a lid open is failing, sending signals to resume from suspend without me opening the computer.

Short of replacing the hardware itself, my best idea for a workaround so far is to simply ignore the default lid-open behavior. To wake the computer from suspend, I would just press the power button. My Desktop Environment is KDE, and I've looked around in the power settings area - I've seen options to configure lid close behavior, but no such options for lid open behavior. Hopefully this is an easy fix, can anyone point me in the right direction?

Otherwise, if anyone has any better ideas for a workaround, I'd love to hear it. This is the best I could think of for now, but my laptop sapping it's battery every day without warning is getting on my nerves (not to mention the overheating risk) so I'm willing to try anything at this point.

Last edited by TheGuyWithTheFace (2015-03-01 18:33:32)

Offline

#2 2015-02-05 02:11:00

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [SOLVED] How to set lid open behavior?

You can change the value of "HandleLidSwitch" in /etc/systemd/logind.conf to "Ignore." You'll need to restart the systemd-logind service, which will kill your current user session and require you to log back in, but afterward the lid switch should have no effect. Check out the logind.conf man page for more info.

Offline

#3 2015-02-05 03:11:23

TheGuyWithTheFace
Member
Registered: 2012-12-09
Posts: 113

Re: [SOLVED] How to set lid open behavior?

I think this was exactly what I was looking for! I'll keep an eye on it tomorrow, and update accordingly if it works.

Offline

#4 2015-02-05 13:07:59

TheGuyWithTheFace
Member
Registered: 2012-12-09
Posts: 113

Re: [SOLVED] How to set lid open behavior?

Hmm, it did not appear to work. Here is a copy of my newly-modified logind.conf:

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=ignore
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes

Offline

#5 2015-02-05 13:47:02

TheGuyWithTheFace
Member
Registered: 2012-12-09
Posts: 113

Re: [SOLVED] How to set lid open behavior?

I should note that when I say "It didn't work", I mean that the computer still isn't ignoring lid open/lid close - it still suspends when closed, and resumes when opened, and occasionally resuming without opening.

After reading through the logind.conf I posted, I also tried uncommenting and setting

lidSwitchIgnoreInhibited=no

, since it seemed suspicious. No result.

Last edited by TheGuyWithTheFace (2015-02-05 13:47:21)

Offline

#6 2015-02-05 14:02:52

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: [SOLVED] How to set lid open behavior?

No amount of playing with systemd is going to stop the hardware from resuming when it wants to.

Only this or hardware mod.

Offline

#7 2015-03-01 18:33:13

TheGuyWithTheFace
Member
Registered: 2012-12-09
Posts: 113

Re: [SOLVED] How to set lid open behavior?

(Sorry for the delay, it's been a busy few weeks and I wasn't able to try anything.)

That fix you linked worked, mich41! Running

echo " LID" > /proc/acpi/wakeup

to change the lid mode from enabled to disabled worked! I then added it as a startup script in systemd via the wiki, and it now works like a charm.

Thanks a lot!

Offline

Board footer

Powered by FluxBB