Asus Keyboard Backlight Timeout

This guide is split up into two sections, one for laptop manufacturers like Dell which have a built-in file for timeout (which can be edited to set up the timeout), and manufacturers like Asus,which need a bit of bash scripting to achieve the same.

On Dell Laptops

On this issue, the ASUS not only has 3 levels of brightness, but after timeout, which is a more reasonable period of time of 60seconds, than HP's ridiculous 15 seconds, the ASUS turns the keyboard backlight back on when you move the mouse. How simple and so much better is that.

You’ve lucked out if you have a Dell machine, setting the timeout is relatively simple on most of their models. Their timeout values are stored in a file; editing the file should be sufficient.

  1. Navigate to the directory containing the file.

    NOTE: If you don’t have such a file (and you’re using Dell), then search around in /sys/devices for a similar folder. If you searched and still can’t find it, follow the instructions in the next section.

    Future without past rare They are made up of the Anishinaabe Peoples who consist of the Ojibwe, Odawa, and Pottawatami Nations; the Haudenosaunee Peoples who include the Oneida; and the Leni-Lunaape peoples, also referred to as the Delaware or Munsee. Indigenous AcknowledgementAnova acknowledges the Indigenous peoples on whose traditional territory we gather and work. We also recognize the First Nations within the Middlesex-London area: Chippewas of the Thames First Nation; Oneida Nation of the Thames; and Munsee-Delaware Nation. There are many longstanding treaty relationships between Indigenous Nations and Canada.

  2. Open the stop_timeout file in a your text editor.
  3. Write your desired timeout value in seconds with a s for “second” after that. (ex. 30s for 30 seconds)NOTE: For values over 1 minute, place a m for “minute” after the value. (ex. 2m for 2 minutes.)

For all other Laptops (including Asus)

Though a file for setting the timeout doesn’t exist in most laptops, there would a file to display the current brightness level. Our first step is to poke around our /sys/ directory and find such a file.

In my Asus machine, it is at /sys/class/leds/asus::kbd_backlight/brightness. Checking the contents of this file should give you the current brightness level of your keyboard.

During an attempt to destroy one of the bridges crossing the Iraq-Kuwait border into Tierra Piedra, sniper Paul Foley is captured, while his other team member is killed. The next morning, John Bradley, a rifleman, is sent in alone to rescue Foley and complete the original mission of destroying the bridge. Conflict desert storm mods. Shortly after landing, Bradley comes into a firefight with a small force of mechanized infantry. Shortly after rescuing Foley, Bradley completes the mission of destroying the bridge, thus slowing the Iraqi forces advance.

This should show a value (0,1,2,3,etc.) depending on the brightness levels of your keyboard. Now, editing this file with a new value should change the brightness.
NOTE: Editing this file requires superuser priviledges; you need to run it through the /bin/sh -c command like so:

This above line should make your backlight dark. This means that our approach is working. The next step is to create a script that automates this procedure everytime your keyboard is idle for x amount of seconds.

  1. Install xprintidle through your package manager.
    Ubuntu:

    Arch Linux:

  2. Store the following bash code into a file in your home directory as a file called kbd_idle. Edit the x on line 4 with the desired timeout. Edit the /sys/ file too, if it differs.
  3. Make this file executable.
  4. Now, we have to create a systemctl service unit that can run this script in the background each time our computer starts. Save the following code in /etc/systemd/system as kbd_idle.service
  5. Start this system unit and enable it.

    This is probably a inefficient way to do it actually, but it works. If anyone has a better method, let me know.

According to
https://ubuntu-mate.community/t/keyb..unlock/6914/29
To disable the keyboard backlight completely, including the keyboard function keys
that controls the keyboard backlight on-off-dimer switch,
Edit the Linux file:
# vim /etc/dbus-1/system.d/org.freedesktop.UPower.conf
and in the 2 lines that contain 'KbdBacklight', change from 'allow' to 'deny'.
from:
<allow send_destination='org.freedesktop.UPower.KbdBacklight'
send_interface='org.freedesktop.DBus.Properties'/>
to:
<deny send_destination='org.freedesktop.UPower.KbdBacklight'
send_interface='org.freedesktop.DBus.Properties'/>
and from:
<allow send_destination='org.freedesktop.UPower'
send_interface='org.freedesktop.UPower.KbdBacklight'/>
to:
<deny send_destination='org.freedesktop.UPower'
Asend_interface='org.freedesktop.UPower.KbdBacklight'/>
In my particular case: Asus 304AUK, Linux Mint 18.3, kernel 4.4-70, upstart,
changing only the second line one worked best for me.
For me the setting take effect immediately upon saving the file, no restart needed.