sony-vaio-z-series team mailing list archive
-
sony-vaio-z-series team
-
Mailing list archive
-
Message #02751
Re: Backlight with NVidia driver on Vaio Z11
Ah, ok, that's really cool. That is if you are running the in speed
mode, correct? The other option is to run in auto mode with bumblebee,
then stuff like screen brightness is controlled by the intel side of
things, and programs that need perf. can be run on nvidia.
On 08/25/2012 10:20 PM, Carlchristian Eckert wrote:
> I guess I found a solution for the backlight issue (I'm running
> ArchLinux 64bit Kernel 3.5.2 on a VGN-Z21VN with the NVidia 9300GS and
> driver version 304.37 ).
>
> Steps that I did:
> - adding acpi_backlight=vendor as a kernel parameter in Grub
> - adding Option "RegistryDwords" "EnableBrightnessControl=1" in
> xorg.conf (as found on several nvidia-related forums. Still not sure
> if that was necessary, but I will figure that out later)
> - installing nvidia-bl module (version 0.17.3-1)
> - the brightness is a value between 0 and 2047 in the file
> /sys/class/backlight/nvidia_backlight/brightness
>
> for convenience, I wrote the following script, which might be called
> e.g. with parameters "up" and "down" from your acpi-deamon (please
> forgive my bash-illiteracy :D )
>
> #!/bin/bash
> VALUES=( 0 30 80 200 400 600 2047 )
>
> IndexOf(){
> local i=0 S=$1; shift
> while [ $S != $1 ]
> do ((i++)); shift
> [ -z "$1" ] && { i=0; break; }
> done
> echo $i
> }
>
> cd /sys/class/backlight/nvidia_backlight
> BRIGHTNESS=`cat brightness`
> index=`IndexOf $BRIGHTNESS ${VALUES[@]}`
>
> if [ "$1" = "up" ]
> then
> # the number of brighness values minus 1
> if [ "$index" = "6" ]; then
> exit 0
> else
> DISPLAY=:0 xset dpms force on
> (( index++ ))
> fi
> else
> if [ "$index" = "0" ]; then
> DISPLAY=:0 xset dpms force off
> else
> (( index-- ))
> fi
> fi
>
> NEW_BRIGHTNESS=${VALUES[index]}
>
> echo $NEW_BRIGHTNESS > brightness
> exit 0
>
>
>
> if you have any improvements, don't hesitate to add :)
>
> Carlchristian
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~sony-vaio-z-series
> Post to : sony-vaio-z-series@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~sony-vaio-z-series
> More help : https://help.launchpad.net/ListHelp
--
Peter Rhone, Dipl. Phys.
Osterweih Str. 3
08056 Zwickau
Tel.: +1 206 299-2701
Cell: +49 (0) 1782059108
Follow ups
References