Disable brightness and keyboard back-light at start-up?
Solution 1
To turn off the keyboard backlight on boot, you need to add this to /etc/rc.local
:
echo '0' > /sys/devices/platform/[a name related to your laptop ]/leds/smc::kbd_backlight/brightness
You have an Asus laptop but you input applesmc.768
so it didn't work. For my case I added to /etc/rc.local
the following line:
echo '0' > /sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/brightness
and it worked.
Solution 2
3 years later I'm facing the same issue in Debian with Mate. I solved it this way:
-
Create a shellscript file in any path:
sensible-editor login.sh
-
Add the following content to the file:
#!/bin/bash sleep 3 dbus-send --type=method_call --print-reply=literal --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness int32:0
-
Go to the Startup Applications
-
Add a new item there that will call the full path to the file this way:
sh /full/path/to/file/login.sh
Note in my case the sleep 3
was essential. You need the dbus-send
to run after the backlight keyboard turns on and it turned on a few seconds after Mate started. So the waiting was needed but how many seconds might depend on each system.
Also note this approach is better than the /etc/rc.local
one because you don't need to run anything as root and you can still change the backlight intensity after it runs. After updating /etc/rc.local
it was fixed in 0
.
Related videos on Youtube
Jairo
Updated on September 18, 2022Comments
-
Jairo over 1 year
I'm new with Linux and I have an issue that I have being researching and have not been able to find a solution so far. I was wondering if any help can be given. I have an Asus Q500A with Win-8 and Ubuntu 12.04 64 bit and Whenever i log-in to Ubuntu, it does so with full screen brightness and keyboard back-light at full . How do i get rid of this? How can I tweak the start-up setting for screen brightness and disable keyboard back-light at start-up?
Note: I already tried this and is not working.
Add this to
/etc/rc.local
:echo '2' > /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness echo '0' > /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
-
Admin over 9 yearsDid you get error after running above commands??
-
Admin over 9 yearsNone at all, the computer start's up normally but the only problem is that boots with keyboard brightness and keyboard back-light again.
-
-
user11171 over 5 yearsThis did not work for me on Ubuntu 16.04.3 LTS on a ThinkPad X230.
-
user11171 over 5 years
xbacklight
changes the screen backlight, not the keyboard backlight as the question asks about. -
Tedi Çela almost 5 yearsI have a ThinkPad T450 and it worked but I added on
rc.local
before the linesleep 3