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.

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?

share|improve this question
    
do you have anything under /sys/class/backlight other than apple_backlight? –  Symin Jan 22 '13 at 23:28
add comment

3 Answers

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..

share|improve this answer
    
Wow, this works –  Christian Stewart Jan 7 at 16:45
add comment

This is a current bug with the Macbook Pro. How do I know? I had a Macbook Pro user start is as the bug. It has to do with the setting getting changed, but the hardware not picking up the change. For some Macbook Pro users, it doesn't matter what you change it to, or if you hard-change it manually by echoing the "setting" to the register, the flag gets changed, but the hardware does not pick up that change. It has to do with the ACPI interface to the hardware.

* There is a current work-around, although not elegant. If you get into OSX and change your brightness settings, then when you reboot and get back into Ubuntu, that last OSX brightness setting is the setting that is current when Ubuntu boots up.

If you have that problem, please subscribe to this bug, to help it get resolved: Backlight control does not work, but there are entries in /sys/class/backlight.

share|improve this answer
add comment

I wonder if it may have something to do with whether you are booting in EFI mode. I believe that would be why Mac OS X can change the settings, when Ubuntu cannot. This article has some info on booting in EFI mode: https://help.ubuntu.com/community/UEFI

best of luck!

share|improve this answer
add comment

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.