acpid to detect when my headphones are plugged in. According to
acpid_listen, the relevant events are
jack/headphone HEADPHONE unplug jack/headphone HEADPHONE plug
I created the file
/etc/acpi/events/headphone_jack like this:
event=jack/headphone.* action=/etc/acpi/actions/headphone.sh "%e"
The event still doesn't trigger if I use
jack[ /]headphone instead. The script
/etc/acpi/actions/headphone.sh looks like this:
amixer set Master off
In other words, every time the headphones are plugged in or unplugged, the volume is muted. This
amixer command works in the terminal. I restarted the
acpid service with
sudo /etc/init.d/acpid reload, but the event still isn't triggering.
What am I doing wrong? I'm using Debian 10 ("buster") x64 on a Thinkpad X1 Carbon 4th generation.