When I boot up my laptop (Asus K501UX) keyboard backlight is turned on automatically. I want to turn it off by default, when Ubuntu is loaded, without using any hot keys.
sudo find /sys/class/leds/ output:
/sys/class/leds/
/sys/class/leds/asus::kbd_backlight
/sys/class/leds/phy0-led
/sys/class/leds/input3::scrolllock
/sys/class/leds/input3::capslock
/sys/class/leds/input3::numlock
/sys/class/leds/asus::wlan 2 2 Answers
Create a bash-script:
sudo gedit /usr/sbin/asuskbbloffwith this content:
#!/bin/bash
KBBL="/sys/class/leds/asus::kbd_backlight"
# $KBBL may a directory or a symlink as of ubuntu 16.04
[ -d $KBBL -o -f $KBBL ] && echo 0 > $KBBL/brightness || echo "$KBBL does not exist!"Make it executable:
sudo chmod 0755 /usr/sbin/asuskbbloffTurn on your keyboard backlight and try to switch it off with this command:
sudo asuskbbloffWhen it worked for you, create an upstart-file:
sudo gedit /etc/init/asuskbbloff.confwith this content:
#
# This task is run on startup to turn of
# keyboard backlight on asus notebooks
#
description "turn of keyboard backlight"
start on startup
task
exec /usr/sbin/asuskbbloffReboot your system for testing.
11It doesn't work for me. But if I run
echo 3 > $KBBL/brightnessand then run
echo 0 > $KBBL/brightnessit works.