How to Enable Keyboard Backlight Function Key Combinations

This tutorial is for those using Zorin 15.3 on a newer laptop with a keyboard backlight. This will adjust the brightness of the keyboard backlight. You will still need to enter windows to change the light patterns and color.

You may have to use sudo if it won't allow you to create/edit the following. Add sudo before the terminal commands below if you get a permission denied error.

Let's get started. Open terminal and type in the following:

cd /etc/acpi

now make sure you have asus-keyboar-backlight.sh.

now enter the events folder. There should be two files, asus-keyboard-backlight-down and -up (these may be named slightly different depending on your model of laptop but will include keyboard-backlight-down/up):

cd events

to list the contents of this directory type:

ls

Now we will find out the identifiers for your keyboard backlight function key combinations:

acpi_listen

then press your function key + up and function key + down arrow combo (this is what it is on asus tuf a17) for the keyboard brightness up and down respectively.

example output:
0B3CBB35-E3C2- 000000ff 00000000
0B3CBB35-E3C2- 000000ff 00000000

They look exactly the same, but I assure you they are different!

press ctrl + c. Those two values are what you need. Terminal command:

sudo gedit asus-keyboard-backlight-up

Inside paste or type your keyboard first acpi identifier from the terminal…should look similar to this:

# /etc/acpi/events/asus-keyboard-backlight-up
# This is called when the user presses the key brightness
# up button and calls /etc/acpi/asus-keyboard-backlight.sh for
# further processing.

event=hotkey ATKD 000000c4
action=/etc/acpi/asus-keyboard-backlight.sh up

do the same for the down.

It should work after that .

If you don’t have the *backlight.sh file…it should have this script in it.

#!/bin/sh

# this directory is a symlink on my machine:
KEYS_DIR=/sys/class/leds/asus::kbd_backlight

test -d $KEYS_DIR || exit 0

MIN=0
MAX=$(cat $KEYS_DIR/max_brightness)
VAL=$(cat $KEYS_DIR/brightness)

if [ “$1” = down ]; then
VAL=$((VAL-1))
else
VAL=$((VAL+1))
fi

if [ “$VAL” -lt $MIN ]; then
VAL=$MIN
elif [ “$VAL” -gt $MAX ]; then
VAL=$MAX
fi

echo $VAL > $KEYS_DIR/brightness

And that is it. In terminal type:

service acpid restart

or reboot your machine. Test the keyboard backlight function key combinations. Please let us know it is working for you.