Buscar en este blog

29.11.17

Control de brillo en Asus UL30VT con Linux Mint 18

Este portátil (Asus UL30VT) funciona bastante bien con Linux Mint. Usando la tarjeta de video Intel, por defecto las combinaciones de botones "Fn+F5/F6" no funcionan para subir o bajar el brillo de la pantalla.
La solución consiste en indicarle al demonio acpid los eventos que debe esperar y las acciones a ejecutar.
Basta crear/modificar 3 archivos en Linux Mint 18 (también válido para Mint 17) y otras distribuciones.

/etc/acpi/events/screen-brightness-up
event=hotkey ATK0100:00 0000001[0123456789abcdef]
action=/etc/acpi/brightness up
 /etc/acpi/events/screen-brightness-down
event=hotkey ATK0100:00 0000002[0123456789abcdef]
action=/etc/acpi/brightness down
/etc/acpi/brightness
#!/bin/bash
export SEED=10
if [ ! -f ~/.brightness ]; then
       echo 255 > ~/.brightness;
fi
export BRIGHTNESS=`cat ~/.brightness`
case "$1" in
       "up")
               export BRIGHTNESS=$[$BRIGHTNESS+$SEED];
       ;;
       "down")
               export BRIGHTNESS=$[$BRIGHTNESS-$SEED];
       ;;
       *)
               export BRIGHTNESS=1;
       ;;
esac
if [ "$BRIGHTNESS" -gt "255" ]; then
       export BRIGHTNESS=255;
fi
if [ "$BRIGHTNESS" -gt "0" ]; then
       echo $BRIGHTNESS > ~/.brightness
    setpci -s 00:02.0 F4.B=`printf '%x' $BRIGHTNESS`
fi
if [ "$BRIGHTNESS" -lt "0" ]; then
       echo "This makes your screen off";
fi
chmod +x /etc/acpi/brightness 

systemctl restart acpid