Controlling Dell Laptop Keyboard Backlight from Command Line

Keyboard Trigger for Keyboar Backlight Keyboard Trigger for Keyboard Backlight

I didn’t take me long to start wondering if there was a way to control keyboard backlight on my Dell XPS 3890 laptop, and of course there is a simple enough solution.

Check Current Keyboard Backlight Level

IMPORTANT: This is Dell laptops (if not Dell XPS model) specific.

Go to the /sys/devices/platform/dell-laptop/leds/dell::kbd_backlight directory and cat the file called brightess:

[email protected]:/sys/devices/platform/dell-laptop/leds/dell::kbd_backlight # cat brightness

You can confirm the max value for brightness in a similar way:

[email protected]:/sys/devices/platform/dell-laptop/leds/dell::kbd_backlight # cat max_brightness

Set Keyboard Backlight Brightness

If you just echo the numeric value you want, it will immediately apply it to your laptop’s keyboard.

IMPORANT: you need to do it as root user.

Turning backlight off:

[email protected]:/sys/devices/platform/dell-laptop/leds/dell::kbd_backlight # echo 0 > brightness

Setting it to max brightness:

[email protected]:/sys/devices/platform/dell-laptop/leds/dell::kbd_backlight # echo 2 > brightness

I’m really excited! Must make this into a cronjob,

See Also

Keep Learning

Follow me on Facebook, Twitter or Telegram:
I learn with Educative: Educative I'm also a fan of SetApp for macOS: SetApp for macOS
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!
Recent Articles
31 Jan 2023

Homelab: MacBook Pro M2

17 Nov 2022

Video: awk delimiters

25 Oct 2022

macOS Ventura 13.0

Recent Tweets