I'm using a MacBook Pro (Mid-2012 model; MacBookPro9,2), dual-booting OS X Yosemite with Ubuntu 15.04, and I'm having an issue with the keyboard backlight brightness.

Apparently this issue has been around for a long time, especially on Macs, with display brightness too, not just the keyboard backlight, but the reason was altogether different. This seems to have been resolved in 15.04 with systemd now setting the brightness for display and keyboard backlight, with one caveat -- it won't set either to zero.

This is fine, even desired, for the display -- if I set the display to zero brightness and reboot, it's then set to 1/15 on boot. However, if I set the keyboard backlight to zero brightness, it's set to 255/255 (i.e. 100%) on reboot. Note that all this is completely fine for non-zero values; they're remembered and restored perfectly.

Also, even though the values aren't "remembered" on reboot, systemd is still storing the correct value of 0 in the two files in /var/lib/systemd/backlight/, which are pci-0000:00:02.0:backlight:acpi_video0 and platform-applesmc.768:leds:smc::kbd_backlight for the display and keyboard backlight, respectively.

So is there any way to change this behaviour? If I set the keyboard backlight off and reboot, it should remain off after all, not blind me on reboot...

  • systemd-backlight is the service responsible for saving and loading the backlight of devices. The man page mentions being able to set a udev property so that there is no "minimum" backlight enforced, but I don't have much experience with udev. – saiarcot895 Jul 23 '15 at 3:31

EDIT: This answer will not work, because the --no-clamp option wasn't merged in into systemd.

The systemd-backlight service is responsible for saving the backlight value at shutdown and restoring the backlight at startup. The service has a restriction that, upon restoration, the minimum backlight is at least of the value 1 or 5% of the maximum brightness, whichever is greater. However, there is a way to disable this restriction.

To do this, run sudo systemctl edit systemd-backlight@.service, and insert the following and save:

ExecStart=/lib/systemd/systemd-backlight -no-clamp load %i
ExecStop=/lib/systemd/systemd-backlight -no-clamp save %i

This basically runs the service, but with the -no-clamp argument added in.

Source: https://bbs.archlinux.org/viewtopic.php?id=197089

  • The -no-clamp switch doesn't seem to work. I tried --no-clamp instead, without success. Booting the kernel verbosely, I can see that all 3 instances of systemd-backlight (for acpi_video0, intel_backlight, and smc::kbd_backlight) fail, and systemctl status systemd-backlight@* for each device reports failure. After reading the source you provided and the man page for systemd-backlight, I've undone your suggestion and modified the udev rules in /lib/udev/rules.d/99-systemd.rules for the keyboard backlight to set ENV{ID_BACKLIGHT_CLAMP}="0". However, this still doesn't fix the problem. – Navjivan Pal Jul 23 '15 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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