[ltp] HOWTO - acpid and ibm-acpi on a T42p

Lenz Grimmer linux-thinkpad@linux-thinkpad.org
Wed, 15 Dec 2004 08:52:13 +0100 (CET)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

Thanks for the hints, they were quite helpful to finally get me going with 
this on my T42. Some additional comments below.

On Tue, 14 Dec 2004, morpheus wrote:

[...]

> Don't forget to do:
> # modprobe ibm_acpi
> to enable the module after installation.  Also, if you want it to
> automatically enable in Fedora all the time, edit /etc/rc.d/rc.local and
> add the line above to this file.

If you want to enable the Fn-Keys, make sure to also pass "hotkey=enable" 
to the ibm_acpi module (either as an option to modprobe or by adding it to 
/etc/modprobe.conf

[...]

> Next, save the following script as /etc/acpi/actions/Fn-F3.sh
> 
> #!/bin/bash
> if [ -f /etc/acpi/actions/lightoff ]; then
> radeontool light on
> rm /etc/acpi/actions/lightoff
> else
> radeontool light off
> touch /etc/acpi/actions/lightoff
> fi
> 
> This script will toggle your backlight on and off.

Instead of touching a file, you can simply query radeontool itself for the 
light status. Here is what I use to determine this (derived off a 
suggestion made by Konstantin Filtschew <mailoperator@uni.de> in this 
list):

[SNIP]
#!/bin/bash

RADEONTOOL='/usr/local/bin/radeontool'

status=`$RADEONTOOL light|sed s/The\ radeon\ backlight\ looks\ //`;

if [[ "$status" = "on" ]] ; then
  $RADEONTOOL light off
elif [[ "$status" = "off" ]] ; then
  $RADEONTOOL light on
fi
[SNIP]

Thanks for the hints!

Bye

	LenZ
- -- 
- ------------------------------------------------------------------
 Lenz Grimmer <lenz@grimmer.com>                             -o)
 [ICQ: 160767607 | Jabber: LenZGr@jabber.org]                /\\
 http://www.lenzg.org/                                       V_V
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQFBv+0uSVDhKrJykfIRAmIMAJkBh/SD6r/FCZEQnqnoLsskixnD/ACfclIz
ad3OoLSJnTjJ9JP7B2JieYk=
=CnBA
-----END PGP SIGNATURE-----