Results 1 to 10 of 16

Thread: Macbook Pro Adjust Backlight and Brightness Defaults

Threaded View

  1. #11
    Join Date
    Mar 2012
    Near one of my computers
    Ubuntu 12.04 Precise Pangolin

    Re: Macbook Pro Adjust Backlight and Brightness Defaults

    Quote Originally Posted by stefprez View Post
    Sorry for the long delay! Here's my rc.local.

    #$backlight_brightness range  0-82311
    echo $backlight_brightness > /sys/devices/virtual/backlight/apple_backlight/subsystem/gmux_backlight/brightness
    #$kbd_brightness range 0-255
    echo $kbd_brightness > /sys/class/leds/smc\:\:kbd_backlight/brightness
    echo 4 > /sys/devices/virtual/backlight/apple_backlight/subsystem/gmux_backlight/brightness
    exit 0
    When I enter "4" for X on the command you supplied, it dims my screen to almost off, which is what I would expect, however the rc.local doesn't seem to be doing this on boot or wake from sleep. Do I need to include a sudo su command or something in rc.local? Is there another reason why the screen is still defaulting to 1000 suns brightness possibly? Thanks for the help so far!
    What are those first two executed lines doing? The ones starting with 'echo $*_brightness'? You don't need 'sudo su' because when this script is run, it is run as root. The script should execute near the end of boot, when it enters runlevel 5 and sets up a multiuser graphical session.

    Try using this for your /etc/rc.local for now. Make sure to backup your current one if you want to save it.

    If you want to save it.
    sudo mv /etc/rc.local /etc/rc.local.backup
    To move it back later.
     sudo mv /etc/rc.local.backup /etc/rc.local
    #!/bin/sh -e
    #$backlight_brightness range  0-82311
    #echo $backlight_brightness > /sys/devices/virtual/backlight/apple_backlight/subsystem/gmux_backlight/brightness
    #$kbd_brightness range 0-255
    #echo $kbd_brightness > /sys/class/leds/smc\:\:kbd_backlight/brightness
    echo 4 > /sys/devices/virtual/backlight/apple_backlight/subsystem/gmux_backlight/brightness
    exit 0
    Then reboot and see what happens.

    Here is mine, which works on my MBP 8,1, for comparison if you want.
    #!/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 '5' > /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness
    echo '25' > /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
    exit 0
    Best of luck,
    Last edited by Kopkins; September 5th, 2012 at 04:26 PM.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts