Comment 2 for bug 338733

Revision history for this message
Brian K. White (bkw777) wrote :

Same here, gma500, kernels 3.2.0, 3.5.0, and 3.6.0 though I think it's more a xorg problem than kernel.

For me these two things work:
echo 75 > /sys/class/backlight/psb-bl/brightness
and
xrandr --output LVDS-0 --set backlight 75

But xbacklight does not, and enlightenment 17's backlight module does not.

note:
For me, there is also a /sys/class/backlight/acpi_video0/brightness which only takes values from 0-to8 and which does not actually work.

Also, for me, setting acpi_backlight=vendor on the grub command line results in there not being a /sys/class/backlight/psb-bl/ directory any more, instead in it's place there is /sys/class/backlight/sony or maybe it was sonypi , but it works the same. It didn't make xbacklight start working nor e17's backlight module, and xrandr and sysfs (under the new name) both still worked.

As a work-around I wrote and am using this in the meantime:
http://code.google.com/p/bltool/

In my desktop I configured the keybindings for the hardware "Fn" keys for backlight (XF86MonBrightnessDown XF86MonBrightnessUp) to execute the commands "bltool -" and "bltool +".

Plus a menu shortcut to just run "bltool" with no options for a manual interactive slider.

You can also put it in a startup script or a laptop battery mode vs wall power script and set arbitrary leveles like "bltool 45" and "bltool 100"

All values are 0 to 100 percent. The script translates to whatever the range is used by your particular driver, be it 0-8, 0-32, 0-100, 0-127, 0-255 etc. So if your driver uses 0-255, you still say 50 if you want 50%, and it will figure out for itself to use 127 internally.

It even works outside of X. If you are at a text console it will uses sysfs instead of xrandr. If you haven't written a .bltool config file it will scan the sysfs directory and prompt you to pick one of the backlight directories it finds there. At the console it will use dialog, in X it will use zenity.

The only thing it won't do automatically is create the udev rul that allows regular users to write to the sysfs files, but "bltool --help" includes a rule you can just cut & paste and explicit instructions what file name to create and paste into.
And that's only needed for sysfs. the default mode is to use xrandr which is slower but doesn't need a udev rule to work. There is also a pre-made udev rule file in the download section of the bltool page.