Skip to content
Macbook screen and keyboard backlight on the ambient light
Branch: master
Clone or download
Latest commit 95c5044 May 13, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src chore: update PKGBUILD May 13, 2019
.gitignore init Apr 26, 2019
PKGBUILD chore: update PKGBUILD May 13, 2019 doc: Apr 26, 2019
macbook-lighter.service chore Apr 26, 2019


MacBook keyboard and screen backlight adjust on the ambient light. Internally, macbook-lighter reads the following files:

  • /sys/devices/platform/applesmc.768/light
  • /sys/class/backlight/intel_backlight/brightness
  • /sys/class/backlight/intel_backlight/max_brightness
  • /sys/class/leds/smc::kbd_backlight/brightness
  • /sys/class/leds/smc::kbd_backlight/max_brightness

So you're expected to install corresponding Nvidia/Intel drivers first.


All commands including macbook-lighter-kbd, macbook-lighter-screen will be available with sudo previledge once macbook-lighter finished install.

To use in non-root environment such as xbindkeys, it's recommended to setup an "udev" rule to allow users in the "video" group to set the backlights. Place a file /etc/udev/rules.d/90-backlight.rules containing:

SUBSYSTEM=="backlight", ACTION=="add", \
  RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness", \
  RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"

And a file /etc/udev/rules.d/91-leds.rules containing:

SUBSYSTEM=="leds", ACTION=="add", \
  RUN+="/bin/chgrp video /sys/class/leds/%k/brightness", \
  RUN+="/bin/chmod g+w /sys/class/leds/%k/brightness"


# Increase keyboard backlight by 50
macbook-lighter-kbd --inc 50
# Increase screen backlight by 50
macbook-lighter-screen --inc 50
# Set screen backlight to max
macbook-lighter-screen --max
# start auto adjust daemon
systemctl start macbook-lighter
# start auto adjust interactively, root previlege needed

Tested MacBook Versions

  • MacBook Pro Late 2013 (11,1)
  • Macbook Air 2012
You can’t perform that action at this time.