I have just installed Ubuntu 16.04 LTS on my Dell Latitude E6540 and my keyboard backlight is keeps going on after some time even after I switch them off using the shortcut keys (Fn+->).
Thanks in advance for any help.

- 13,021
- 37
- 88
- 112

- 141
6 Answers
echo 2 | sudo tee /sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/brightness
Worked for me I have a new 2in1 Inspiron 7568.

- 36,264
- 56
- 94
- 147

- 139
- 1
- 7
-
1This sets the light to level 2. Turning the light off can be done by echoing
0
into this file. But anyway - this does not answer the question posted here. – Bach Aug 29 '16 at 08:48 -
for thinkpad the directory is:
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::kbd_backlight
but I can't figure out what is triggering the backlight to turn on all the time – Jonathan Aug 29 '16 at 18:34
Just purchased a 2016 Dell XPS13-9350. Wiped off Windows 10, with immense joy by the way, and installed Ubuntu 16.04 LTS and the Cinnamon desktop. This is a sweet laptop combo.
The default setting is to dim the keyboard back light after 10 seconds of no key press. This was driving me absolutely crazy because I fly a lot and want the back light to stay on longer.
The file /sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/stop_timeout
contains the back light timeout value.
Answer 3 (above) did not work for me because the echo command did not work, even as root. Instead I did the following:
sudo nano /sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/stop_timeout
change the 10s
on line-1 to 300s
(Without quotes). This will change the timeout to 5 minutes. Change it to whatever you wish.
Save the file (Ctrl-O, Enter, Ctrl-X).
Hope this helps someone as frustrated with this as I was.
-
1If
sudo nano FILE
works, there's no reason whyecho ... > FILE
shouldn't work from a root shell. You probably ransudo echo ... > FILE
instead. See https://askubuntu.com/questions/230476/when-using-sudo-with-redirection-i-get-permission-denied. As such, your answer doesn't offer any improvement of the other answer. – David Foerster Sep 10 '16 at 07:23 -
I have been able to modify that file with nano but not with vim. Any idea why? With vim I got this error when trying :w "stop_timeout" "stop_timeout" E667: Fsync failed Press ENTER or type command to continue – Nisba Oct 08 '16 at 21:29
-
@Nisba I had the same problem with Neovim. I just used
echo 5m | sudo tee ...
as the first one mentions, but with this answer's file name. – Jonathan E. Landrum Apr 28 '17 at 01:56 -
1This worked for me. Amazingly, I find I am unable to delete the file, or write using vi - even via "sudo"...yet I am able to edit using nano!!! How wierd is that?? – fig Jun 19 '17 at 21:14
-
@fig @Nisba the likely reason is because vi wants to make a temporary file in that directory, and nano doesn't. You can still write with vi, but exit with
:x!
to override the complaint about the temp file. – Jonathan E. Landrum Jan 18 '18 at 03:35
I found fix in one of comments on launchpad bugtracker
Step 1: change system option
Edit file /etc/dbus-1/system.d/org.freedesktop.UPower.conf
change:
<allow send_destination="org.freedesktop.UPower"
send_interface="org.freedesktop.UPower.KbdBacklight"/>
to:
<deny send_destination="org.freedesktop.UPower"
send_interface="org.freedesktop.UPower.KbdBacklight"/>
Step 2: execute command with system startup
add folowing lines to the file /etc/rc.local
#!/bin/sh -e
# Mask kernel module
sudo systemctl mask systemd-backlight@leds\:dell\:\:kbd_backlight.service
exit 0
It is really works.
Keyboard backligt works too, but not automatically, by pressing Fn-keys only.

- 2,018
- 15
- 15
-
This worked for Dell Precision 7510 - Ubuntu 16.04.1. I have attempted other fixes but this seems to be the only one that worked for me. Thanks! – Mike Jun 22 '17 at 15:04
Another thing on Dell laptops (including my XPS 15, 9550) is that the backlight dims and goes off after 10 seconds idling.
There is a command that worked for me (Linux Mint 18 on a 9550, kernel 4.8) that allowed me choose the timeout :
sudo bash -c 'echo "60s" > /sys/class/leds/dell\:\:kbd_backlight/stop_timeout'
This is for a 60s timeout, which is sufficiant in my case. Of course, you can put anything here, like 3600s for an entire hour, which can comfortably relate to « stay on ».

- 611
- 5
- 5
-
cat /sys/class/leds/dell\:\:kbd_backlight/stop_timeout
returned10s
which is the default - in case any1 needs it – Anand Rockzz Jul 09 '18 at 06:01
I used to have my Dell Vostro 3560 keyboard-backlight constantly turned on after reboot, even if I had it turned off.
The fix was in /etc/UPower/UPower.conf
. I changed IgnoreLid=false
to IgnoreLid=true
.
That helped.

- 11
I have run into this problem on Ubuntu 22.04.1 with Mate.
- Pressing
<Fn>+<Space>
is not permanent because Mate overrides the backlight setting when the screen is unlocked. - Tweaking
systemd
does not help.
Solution
I have solved the problem by doing the following:
- Run
gsettings list-recursively | grep --color kbd
to find relevant settings. In the output, you will find these rows:
org.mate.power-manager kbd-backlight-battery-reduce true
org.mate.power-manager kbd-brightness-dim-by-on-battery 50
org.mate.power-manager kbd-brightness-dim-by-on-idle 75
org.mate.power-manager kbd-brightness-on-ac 100
- Change
kbd-brightness-on-ac
to0
andkbd-backlight-battery-reduce
tofalse
by running:
gsettings set org.mate.power-manager kbd-brightness-on-ac 0
gsettings set org.mate.power-manager kbd-backlight-battery-reduce false
Now the keyboard backlight will stay off when you unlock the screen.

- 101
sudo chmod a+w /sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/brightness
than set brightness to other value than 0 (0..9 are valid for me)echo 9 > /sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/brightness
– Stefan Krüger s-light May 09 '16 at 20:11