7

I have a scripts to control display brightness:

/etc/acpi/actions/bl_down.sh:

#!/bin/sh
bl_device=/sys/class/backlight/intel_backlight/brightness
echo $(($(/usr/bin/cat $bl_device)-10)) | sudo /usr/bin/tee $bl_device

Running it as ./bl_down.sh works as expected.

So I tried to bind it to my keyboard like so:

/etc/acpi/events/bl_down:

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

However, this doesn't do anything except print the following in journalctl:

 May 20 13:53:51 mowgli root[32154]: ACPI group/action undefined: video/brightnessdown / BRTDN

Any ideas?

Volume UP and DOWN outputs:

ACPI group/action undefined: button/volumedown / VOLDN

However, it works just fine.

Slava Knyazev
  • 577
  • 3
  • 8
  • 23
  • Maybe you need to start the `systemctl start apcid.service` to register those events. Try to run `acpi_listen` and push the buttons to see what they fire. – eckes Jun 04 '17 at 19:46
  • @eckes acpid is running fine. ```/etc/acpi/actions ▶ acpi_listen video/brightnessdown BRTDN 00000087 00000000 video/brightnessdown BRTDN 00000087 00000000 video/brightnessup BRTUP 00000086 00000000 video/brightnessup BRTUP 00000086 00000000 video/brightnessup BRTUP 00000086 00000000 ``` – Slava Knyazev Jun 04 '17 at 20:07

1 Answers1

0

update your file /etc/acpi/events/bl_down and quote the definition

event="video/brightnessdown BRTDN 00000087 00000000 K "

shell variables assignments to a string must have the entire string quoted

Scott Stensland
  • 464
  • 5
  • 14