1. Устанавливаем необходимые пакеты acpi acpid acpitool:
sudo apt-get acpi acpid acpitool
2. Под рутом запускаем:
acpi_listen
3. Нажимаем кнопку управления сенсором и смотрим вывод:
hotkey ATKD 0000008a 00000044
4. Создаем файл /etc/acpi/events/asus-lightsensor следующего содержания:
# /etc/acpi/events/asus-lightsensor
# This is called when the user presses the lightsensor button and calls
# /etc/acpi/asus-lightsensor.sh for further processing.
event=hotkey (ATKD|HOTK) 0000008a
action=/etc/acpi/asus-lightsensor.sh
5. Создаем собственно сам скрипт /etc/acpi/asus-lightsensor.sh :
#!/bin/sh
[ -f /usr/share/acpi-support/state-funcs ] || exit 0.
# get the current state of the light sensor
LSSTATUS=`cat /sys/devices/platform/asus-laptop/ls_switch | awk '{print}'`
# if getting the status failed, exit
test -z $LSSTATUS && exit 1
if [ $STATUS = 0 ]; then
echo 1 > /sys/devices/platform/asus-laptop/ls_switch
else
echo 0 > /sys/devices/platform/asus-laptop/ls_switch
fi
Теперь по этой кнопке можно включить и отключить сенсор автоматической яркости экрана!
Аналогичным образом можно задействовать другие кнопки, например блокирование тачпада:
https://forum.ubuntu.ru/index.php?topic=57590.0