Comment 39 for bug 173652

Revision history for this message
Michael Lustfield (michaellustfield) wrote : Re: unable to adjust screen brightness on recent Sony Vaio notebooks

I found an issue with that rc.local idea. It appears that those lines need to be executed after gdm is running. I created a script that lets you run it. Once running, press "i" to run the two lines that make screen brightness work. One uses sudo so you will need to be able to run that command. From there you can press either the up or down arrow keys to change the brightness. You don't need to run "i" each time you start the script, just each time gdm starts up. and obviously q will exit the script.

Hope it helps. I know it can be cleaned up, but I'm more concerned about a convenient and usable script. I keep this one in my ./bin.

#!/bin/bash

while true; do
 clear
 echo "up = Screen Brightness Up"
 echo "down = Screen Brightness Down"
 echo "i = Intialize Hardware"
 echo "q = Quit"

 read -s -n1 key

 clear

 case "$key" in
  $'\033')
   read -s -n1 key; read -s -n1 key
   case "$key" in
    A)
     xbacklight -time 0 -steps 1 -inc 10 2>/tmp/sonybright.log
     ;;
    B)
     xbacklight -time 0 -steps 1 -dec 10 2>/tmp/sonybright.log
     ;;
   esac
   ;;
  i)
   xrandr --output LVDS --set BACKLIGHT_CONTROL native
   sudo /etc/init.d/acpid restart
   ;;
  q)
   clear
   exit 0
   ;;
 esac
done