[ltp] Re: confused about power managment with T520 with Debian with no DE

Claudius Hubig linux-thinkpad@linux-thinkpad.org
Mon, 6 Feb 2012 10:05:52 +0100


keitho@strucktower.com wrote:
>When I run acpi_listen and press the FnF4 (sleep) button I get:
>$acpi_listen
>^@^@button/sleep SBTN 00000080 00000000 K
>
>I then created a script:
>$ cat /etc/acpi/suspend.sh
>#!/bin/bash
>pm-suspend

You might want the shell script to do =E2=80=98something visible=E2=80=99 f=
or
testing, for example create a temporary file or something (just so
you know it was actually called).

>and the shell script:
>$cat /etc/acpi/events/fnf4-suspend
>event=3D^@button/sleep SBTN 00000080 00000000 K
>action=3D^@/etc/acpi/suspend.sh

Uhm. Try without the ^@ and maybe also without the "K". My
acpi_listen output is slightly different, though:

0 09:55 0 ares: ~ # acpi_listen=20
ibm/hotkey HKEY 00000080 00001009

Did you try, for example:

cat /etc/acpi/events/fnf4-suspend
event=3Dbutton/sleep SBTN 00000080 00000000
action=3D/etc/acpi/suspend.sh

You do not need to reboot, restarting the acpid (/etc/init.d/acpid
restart) should work just fne.

>Also, funny, when I try bash completion with man pm-<TAB> I only get a
>beep... though bash completion generally works for me.

But pm-utils is installed and also sports the appropriate man pages?

Btw, closing the lid should also trigger an ACPI event which you can
catch, if you like to :)

Best regards,

Claudius
--=20
BOFH excuse #41:

interrupt configuration error
Please use GPG: ECB0C2C7 4A4C4046 446ADF86 C08112E5 D72CDBA4
http://chubig.net/ http://nightfall.org