[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
--Nq2Wo0NMKNjxTN9z
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.
>=20
> When I run acpi_listen and press the FnF4 (sleep) button I get:
> $acpi_listen
> ^@^@button/sleep SBTN 00000080 00000000 K
>=20
> I then created a script:
> $ cat /etc/acpi/suspend.sh
> #!/bin/bash
> pm-suspend
>=20
> 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
action=3D/etc/acpi/sleep.sh
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
--=20
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
--Nq2Wo0NMKNjxTN9z
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEARECAAYFAk8wXpUACgkQkVdEXeem14+tvgCfSY+NN2iputpwdo8FwxlDZrvT
sqIAnj+Aa/6WXsYI8pEbSAgSm8U1J3tT
=lBx4
-----END PGP SIGNATURE-----
--Nq2Wo0NMKNjxTN9z--