Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do I disable the keyboard backlight, by turning it completely off, on a Macbook in 12.04?

Whenever I reboot, Ubuntu sets the backlight to 100% brightness, and frustratingly the new function keys no longer support being held down, so I have to press the dim key about 50 times to turn off the backlight.

share|improve this question
    
Check askubuntu.com/questions/137355/… –  naught101 Oct 12 '12 at 11:26
    
@naught101, You linked to this question... –  Cerin Oct 12 '12 at 16:40
    
SOrry, I meant askubuntu.com/questions/142177/… –  naught101 Oct 13 '12 at 0:03

2 Answers 2

up vote 4 down vote accepted

Make the keyboard backlight device writable by everyone:

sudo chmod 777 /sys/class/leds/smc::kbd_backlight/brightness

Then, in your ~/.bash_aliases, add:

echo 0 | tee -a /sys/class/leds/smc::kbd_backlight/brightness

Alternatively, if you want the backlight to be disabled for all users, then add that line instead to /etc/profile.d/custom.sh.

The only caveat I've noticed is that unlocking your screen occassionally appears to reset the backlight to full brightness. Unfortunately, I don't know what's causing this.

share|improve this answer

(I know this is pertaining to ubuntu but thought it might be helpful to those running Mint as well)

Trying to add these to the bash aliases didn't work for me on Linux Mint running on a Macbook Air 2012 (probably doing something wrong).

I had to run a script as sudo at login

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
exit 0


See: how to run script as sudo at login

  1. I created a shell script in ~/subfolder/script.sh with the script from above.

  2. Then had to edit the sudoers file and enable the custom script to run without a password.

    username ALL=NOPASSWD:/full/path/to/script.sh
    
    # Replace username and path with your own
    
  3. Then basically just added

    sudo /full/path/to/script.sh
    

    to startup applications.

This is explained in the link.

Any suggestions for improvement would be appreciated, but this works for me.

share|improve this answer
    
This works as well on Asus Zenbook Prime, just use a command echo 0 > /sys/class/leds/asus\:\:kbd_backlight/brightness. Btw you can edit the sudoers file using sudo visudo –  tsusanka Sep 24 '13 at 9:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.