[ltp] Resolved- confused about power managment with T520 with Debian with no DE

linux-thinkpad@linux-thinkpad.org linux-thinkpad@linux-thinkpad.org
Mon, 6 Feb 2012 07:38:29 -0800

Thanks again to everyone for helping me figure out how to get my suspend
to work properly without using a DE.

Turns out that (evidently) my FnF4 button has an intermitent physical
problem. Playing around with acpi_listen showed me that pressing FnF4 onl=
caused an event occassionally and I can't depend on it. I will consider
sending the laptop back as it is still under warranty. Though I'm still
not sure there isn't some kind of software glitch interfering with it.

However, I was able to use the procedure provided by Claudius Hubig to
capture the lid closing event and write a few scripts that work.

This is how I approached it for anyone else wanting to try:

First, invoke acpi_listen, then close and re-open the lid. The event will
be shown onscreen, in my case it is "button/lid LID close" plus a few
other lines.

Second, write script placed into /etc/acpi/:

$cat /etc/acpi/lidclose.sh
echo "echoing from inside script lidclose.sh"
touch /etc/acpi/tested.ok

The first two lines are for testing the script and are later removed.
Turns out that the echo line doesn't work.

Second, create this script:

$cat /etc/acpi/lidclose
event=3Dbutton/lid LID close

The names of these two scripts can be anything you like, but be sure to
make them executable. I wrote these as root.

Then run /etc/init.d/acpid restart

Now when I close the lid the laptop goes into sleep as it should. I did
not need to do anything to make the laptop resume from sleep- it does so
upon opening the lid again.

Until I find a smaller and/or better program I will use the
xcfe4-power-manager for blanking the screen (in my case it doesn't work
for putting my laptop into sleep or hibernate mode).

Also thanks to Joerg Bruehe for the brief explanation of the setuid bit..=
I have always been a little confused about how to use that. Good to know
even if it doesn't work with symlinks like pm-suspend (as confirmed by
Jochen Spieker.

Again, thanks to everyone for your help!

Keith Ostertag
Harrisburg, PA, USA
 My system:
Lenovo Thinkpad T520
Intel i5-2410 with onboard graphics (i915) only
Intel SSD drive, 4GB RAM
Debian, using i3wm