Ubuntu – Start asus laptop UX32VD with keyboard backlight off

asusbacklightkeyboardlaptop

I'd like a way to set the default keyboard backlight state to "off". I'm running Ubuntu 13.04 on an Asus Zenbook UX32VD. All the function keys work, but currently I have to turn off the keyboard backlight by pressing fn+F5 several times every time I boot up the computer. This is a minor annoyance I've often wanted to know how to avoid.

Is there any way to set the keyboard backlight to be in the off state when the computer turns on?

Best Answer

The following worked for me with the Asus N550JV running Ubuntu 13.10, but I think it may also work for you:

(1) Get full permissions on the file we need to control

Open up a terminal (CONTROL+ALT+T) and copy and paste this entire code block into the terminal:

sudo touch /etc/init.d/asus_kbd_backlight.sh && \
sudo chmod 777 /etc/init.d/asus_kbd_backlight.sh && \
sudo echo /bin/chmod 777 "/sys/class/leds/asus::kbd_backlight/brightness" > /etc/init.d/asus_kbd_backlight.sh && \
sudo chmod 744 /etc/init.d/asus_kbd_backlight.sh && \
sudo chown root:root /etc/init.d/asus_kbd_backlight.sh && \
sudo ln -s /etc/init.d/asus_kbd_backlight.sh /etc/rc2.d/S99asus_kbd_backlight.sh

then press ENTER. It will prompt you for your password.

(This was taken from LeoR's answer here)

(2) Create a startup script that changes the keyboard brightness

Enter the following command into the terminal:

echo 'echo 0 > /sys/class/leds/asus\:\:kbd_backlight/brightness' > ~/.my_startup_file.sh

(3) Call this script at startup

Open up "Startup Applications" (you can find this by pressing the Superkey to get to the Dash and typing Startup)

Click Add, then enter whatever you want for Name, and "sh /home/username/.my_startup_file.sh" for Command. Note: do not put "sh ~/.my_startup_file.sh". For example, my username is garrett, so I put "sh /home/garrett/.my_startup_file.sh".

Related Question