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

Marius Gedminas linux-thinkpad@linux-thinkpad.org
Tue, 7 Feb 2012 01:13:25 +0200

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Feb 05, 2012 at 02:55:23PM -0800, keitho@strucktower.com wrote:
> Claudius Hubig gave some examples of capturing the acpi event to invoke a
> shell script. I haven't been able to duplicate this.
> 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
> and the shell script:
> $cat /etc/acpi/events/fnf4-suspend
> event=3D^@button/sleep SBTN 00000080 00000000 K
> action=3D^@/etc/acpi/suspend.sh

There are weird NUL characters here?!

On my Ubuntu laptop (this is why I use Ubuntu, BTW: almost everything
works out of the box with no headachey configuration required, usually)
/etc/acpi/events/sleepbtn has

  event=3Dbutton[ /]sleep

without the "SBNT 0000..." bit at the end.

> This produces no output of any noticeable kind when I subsequently press
> the FnF4 button (after of course marking the scripts executable and
> rebooting).I also tried sustituting "3D" for the "^@" with no change.

Rebooting should not be required.  Maybe an /etc/init.d/acpid restart,
at most.

Drop the ^@ gunk, it's what prevents your acpi config from working.
I've no idea why acpi_listen prints it; this smells like a bug to me.

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

Is /usr/sbin in your PATH?

Marius Gedminas
UEFI stands for "Unified Extensible Firmware Interface", where "Firmware" i=
s an
ancient African word meaning "Why do something right when you can do it so
wrong that children will weep and brave adults will cower before you", and
"UEI" is Celtic for "We missed DOS so we burned it into your ROMs".
        -- Matthew Garrett

Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature

Version: GnuPG v1.4.11 (GNU/Linux)