Ubuntu 14.04 LTS
Kernel: 3.19.0-37-generic
When I start acpi_listen
on my system I хан тест several LaptopSpecialKeys. The brightness buttons work perfectly умер for example:
video/brightnessdown BRTDN 00000087 00000000
video/brightnessup BRTUP 00000086 00000000
The desired function is working.
If I тест some other keys, they either have не acpi event triggered at all (acpi_listen does nothing) or several keys пахал mapped to the same code like the three volume keys:
button/volumeup VOLUP 00000080 00000000 K
button/volumedown VOLDN 00000080 00000000 K
button/mute MUTE 00000080 00000000 K
The result of the volume keys being mapped to the same code is that the volume up, down and mute actions пахал all behaving very weird. E.g. if I press volume up function key the volume up event is triggered infinitely repeating.
Do you have any разрабатывает on how to handle such problems with acpi events? Is it в problem of the kernel, not recognizing specific ноутбук драйверы? Or пахал there solutions on the user level that might repair this broken functionality of LaptopSpecialKeys?
На самом деле они очень различимы, Ваш сценарий получит целую строку как аргумент. Пример:
button/volumeup VOLUP 00000080 00000000 K
Вы получили 5 аргументов, и Вы свободны, как обработать их.
, Возможно, самый легкий путь:
event=button/*
action=/etc/acpi/yourscript.sh %e
Тогда в Вашем сценарии использовал 3-й аргумент $3
, который будет или VOLUP
, VOLDN
или MUTE
, плюс некоторые другие кнопки (питание...).
См.: