Comment 2 for bug 136380

Revision history for this message
unggnu (unggnu) wrote : Re: [Gutsy] sonybright.sh doesn't use the correct value range

I have forgot something to fix.
The third line "BRIGHTNESS=$(cat /sys/class/backlight/sony/actual_brightness)" is wrong since it returns on some circumstances 32 instead of zero. This happens through spicctrl ([ -x /usr/bin/spicctrl ] && /usr/bin/spicctrl -b 0 ) which is run if you try to lower brightness if it is already zero. The file /sys/class/backlight/sony/brightness isn't affected through spicctrl run so it should be used instead.
The other point is the brightness correction in line five which has the wrong value range from old sony_acpi.
Btw. I still don't know why this spicctrl line is used but I haven't changed this since the other brightness path isn't affected from this bug.