ACPI event not triggering associated action

1.6k views Asked by At

I've been trying for some time now to enable my computer's Fn+F9/F10 brightness control. Reading this thread, I tried to set up an acpi event/action script to manually change my brightness. The scripts themselves work - I can manually call bl_down.sh and bl_up.sh in the terminal.

However, for some reason the acpi events themselves aren't triggering the scripts. I've included the output of acpi_listen below, as well as the scripts:

~$ acpi_listen 
video/brightnessdown BRTDN 00000087 00000000 # FN+F9
video/brightnessup BRTUP 00000086 00000000   # FN+F10

bl_down.sh

#!/bin/sh

bl_device=/sys/class/backlight/intel_backlight/brightness
echo $(($(cat $bl_device)-100)) | sudo tee $bl_device

bl_up.sh

#!/bin/sh

bl_device=/sys/class/backlight/intel_backlight/brightness
echo $(($(cat $bl_device)+100)) | sudo tee $bl_device

So I know that acpi is enabled, and that the scripts work. It's just that the event itself for some reason isn't triggering the action. Any pointers in the right direction are appreciated!

EDIT: I forgot to include the actual acpi events:

bl_down

event=video/brightnessdown BRTDN 00000087 00000000
action=/etc/acpi/actions/bl_down.sh

bl_up

event=video/brightnessup BRTUP 00000086 00000000
action=/etc/acpi/actions/bl_up.sh
2

There are 2 answers

0
Try431 On BEST ANSWER

Welp, figured it out. Reading other posts on this site, I realized that I needed to restart acpid. After trying sudo /etc/init.d/acpid reload, everything is working as it should.

1
nicolevy On

You could use xbacklight instead. It manages your brightness by using the RandR extension of X11. You would then bind your hotkeys to:

xbacklight -inc 100

and

xbacklight -dec 100

You can replace '100' with whatever increment works for you. I've found this to be the easiest solution for me, personally.