Comment 32 for bug 173652

Revision history for this message
Petr Menšík (pihhan) wrote : Re: unable to adjust screen brightness on recent Sony Vaio notebooks

I have wrote script for using xbacklight for acpi buttons. I believe your script wont work, because mine havent work also when done like yours. Problem is that xbacklight needs access to X server, when executed by acpi event, it does not have it. When executed from terminal when testing, it work well. Moreover, you have your own file to store brightness value. That is not needed, because xbacklight have increase and decrease options also.

My script is under https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/232464 bug in acpi routines. It does contain some more things, like lower bright on battery run. I suggest you take a look on archive, as it is a bit better.

As for nvidia driver: check /etc/acpi/sony-bright.sh script, how is that done. If nvclock does not need access to X server, you can basically remove all other there. Or, you might try edit /etc/acpi/events/sony-brightness-(up|down).sh, and there put nvclock command with full path and parameters. It might work better. Reload then acpid using sudo invoke-rc.d acpid reload.

Note that i dont need any change in xbacklight before changing backlight. I have combination there from startup and it does work fine enough.

 $ xrandr --prop | grep BACKLIGHT
 BACKLIGHT_CONTROL: combination
 BACKLIGHT: 10396 (0x0000289c) range: (0,26015)

I have Sony Vaio VGN-FZ210C with
 $ lspci|grep VGA
 00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)