Skip to content

Instantly share code, notes, and snippets.

@nwjlyons
Last active March 10, 2025 02:47
Show Gist options
  • Save nwjlyons/c66bbdeb62ae60ee0ef4 to your computer and use it in GitHub Desktop.
Save nwjlyons/c66bbdeb62ae60ee0ef4 to your computer and use it in GitHub Desktop.
Turn Mac Book Pro backlit keyboard on and off under linux
# First su in as root
sudo su
# Then cd to backlight directory
cd /sys/class/leds/smc::kbd_backlight/
# Turn the backlight on
cat max_brightness > brightness
# Set to zero to turn off the backlight
echo 0 > brightness
@JohnSeals
Copy link

Works perfect on my old MacBook Pro!

@TheOnly3aq
Copy link

Works perfectly on my 2017 MacBook Pro running Kali Linux, thanks!

@jaraddowning
Copy link

I'm still not having any luck, running Fedora 41 with KDE. At least I have a place to start investigation after seeing this post.

@matymad
Copy link

matymad commented Mar 10, 2025

It worked perfectly in my case but I had to change the last part of the second command:
cd /sys/class/leds/spi::kbd_backlight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment