Originally Posted by
stefprez
Sorry for the long delay! Here's my rc.local.
Code:
#$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.
Code:
sudo mv /etc/rc.local /etc/rc.local.backup
To move it back later.
Code:
sudo mv /etc/rc.local.backup /etc/rc.local
Code:
#!/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.
Code:
#!/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,
Kopkins
Bookmarks