I've been trying to get Fn+F3 to toggle the backlight on my trusty old Thinkpad R50 running Linux Mint 9 (~ Ubuntu 10.04 with some added codeds and stuff). I tried to do this by adding an event handler (backlight) in /etc/acpi/events:
Code:
event=button[ /]screenlock
action=/etc/acpi/backlight.sh
and a script (backlight.sh) for it in /etc/acpi:
Code:
#!/bin/sh
if [ -e /tmp/screenoff ]; then
sudo /usr/sbin/radeontool light on
rm -f /tmp/screenoff
else
sudo /usr/sbin/radeontool light off
touch /tmp/screenoff
fi
The result was that it doesn't work. However, if I run a second instance of acpid, the hotkey starts working. Then I took a look at this:
https://wiki.ubuntu.com/AcpiSupportDeprecation
From which I found out that ACPI events are passed to HAL through a socket in /var/run (is that why the /etc/apci/events doesn't work anymore?). In the same document it says that:
Quote:
hal-addon-acpi currently only handles a very limited set of ACPI events (button, ac_adapter, battery).
|
Bummer. So it can't be done with HAL and it doesn't work "the old fashioned way". How exactly does it work?