Ubuntu – Macbook Pro 5.5 brightness settings work, are remembered, but are not used on startup

12.10brightnessmacmacbook

This question's similar to various others in the forum where users' brightness settings either don't work or are not remembered:

  1. Brightness controls doesn't work on a MacBook Pro 5.5 (ubuntu 12.04 LTS)
  2. Desktop doesn't remember brightness settings after a reboot

In a new (dual-boot) Ubuntu 12.10 install with encrypted home directory, brightness controls (both the slider in the Brightness and Lock settings panel and the function keys) worked out-of-the-box (hurrah!). Unfortunately, the setting was not remembered.

From thread (2), comment 13, I was able to get the system to remember the setting, but not to use it. For the record, on my system, it's necessary to adjust the path in rc.local:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo 0 > /sys/class/backlight/apple_backlight/brightness
exit 0

This successfully records the brightness level of the screen at shutdown, but it has no effect on the screen brightness. I can tell the value is recorded because:

  • /sys/class/backlight/apple_backlight/brightness contains a value at startup
  • the slider in the Brightness and Lock panel is in the right position
  • when I change move the slider in Brightness and Lock, or when I use the brightness function keys, the screen brightness changes to the next value to the value recorded in the brightness file (for example, if I use the function keys to set the backlight to the dimmest setting where it's still on, restart and use the function keys to dim the screen once, the backlight turns off)

Does anyone have any idea how to complete the last piece of the puzzle?

Best Answer

have you tried to set up manually in xrandr? Just try this one: to set brightness as 0.8 type this command in ~/.xprofile (make this file if it is not available yet)

xrandr --output LVDS1 --brightness 0.8

The code above is to set the main monitor (LVDS1) brightness to be 0.8. Just change it depend on your needs. Then, restart your mac and let see..