KB back light setting change: dir location and how to edit locked files?

Latest response


Can anyone help me change the KB backlit settings.
The KB light goes out after like 3 seconds.
I want to disable the feature, or set timeout to max setting.

I thought it would be in the /sys directory some where but I am a noob and also when I thought I found the right location I could not edit the files.
I am familiar with chown,chgrp,chmod, but on reboto, even those ownership and group setting was reverted back to root.

So, I am asking for :

How do I figure out keyboard settings, with what tool/ command? ( So I might not ask again)
What directory are the KB back light settings?
How do I figure out on my own next time where this directory would be for specific hardware settings?
How do I edit files in directories such as /sys that appear to have locked files?

Thank You,



Uhm... That's not an easy question. It really depends on the hardware you're using and the kind of driver used for your keyboard led "device".
A couple of questions:

  • What machine are you using and what distribution are you running exactly?
  • Have you tried with different Operating Systems? What was the behavior on those?

Hi Lowry,

We are going to need a bit more information to be helpful.

Which make and model of keyboard backlight are you trying to work with?

When you say "keyboard settings" are you still just referring to the backlight or do you need some guidance on configuring a different keyboard layout (French, German, etc)?

/sys is provided by the sysfs subsystem. It exports a number of kernel tunables to the filesystem, only some of which are editable (they will have owner rw in ls -l).

Usually, we use a command to send an on or off switch to these files (although some accept different data, like buffer sizes).

If I were to manipulate the screen backlight on my laptop, I would use:

# echo [0|1] > /sys/class/backlight/intel_backlight/bl_power

Which (should) in this example turn the screen backlight off or on, there is also a brightness setting (/sys/class/backlight/intel_backlight/brightness) which if I recall correctly accepts a range from 0 to 100.

let us know,


I am only wanting to change the setting for the Keyboard.
It has a backlight keyboard and the default timeout the light goes out is about 3 seconds.

I want to change the setting to disable or max timeout.
I am just unsure how to get hardware device info as well as location of setting change to change it.
I may also encounter issue with how to edit a file in /sys directory as they all seem to be non-editable even if
chmod,chown, chgrp on them.

Thank You,


Hi Wayne,

  • We need to know the make and model of the keyboard.

    • This allows us to check for known bugs.
  • you must be root to alter files in /sys

    • Not every file is writable
    • writable files will have the w attribute set for owner when examined with ls -l
  • /sys is an abstraction of the kernel and hardware state

    • Although represented as files, we are dealing with an interface to a kernel structure
  • we can manipulate these files by using echo to write data into the structure and cat to extract data out (yes other methods are available, but these are the simplest).

so, first, we need to know the make and model of the keyboard (or the laptop if that is what it is).

It would help us immensely if you also provided the output of ls -l /sys/class/leds/*/*.

Many thanks,