Several ACPI event keys have the same идентификация

Ubuntu 14.04 LTS

Kernel: 3.19.0-37-generic

INTRO

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.

PROBLEM

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.

And the weirdest thing of all:

How does the acpi event distinguish between those three keys, recognizing that each - its own funcionality (VOLUP, VOLDN, MUTE), altough all three keys have the same code 0x80?

QUESTION

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?

3
задан 5 December 2015 в 13:11

1 ответ

На самом деле они очень различимы, Ваш сценарий получит целую строку как аргумент. Пример:

button/volumeup VOLUP 00000080 00000000 K

Вы получили 5 аргументов, и Вы свободны, как обработать их.

, Возможно, самый легкий путь:

event=button/*
action=/etc/acpi/yourscript.sh %e

Тогда в Вашем сценарии использовал 3-й аргумент $3, который будет или VOLUP, VOLDN или MUTE, плюс некоторые другие кнопки (питание...).

См.:

1
ответ дан 1 December 2019 в 17:35

Другие вопросы по тегам:

Похожие вопросы: