Comment 2 for bug 372874

Revision history for this message
In , Johannes Hessellund (osos) wrote :

In addon-generic-backlight.c line 67
http://cgit.freedesktop.org/hal/tree/hald/linux/addons/addon-generic-backlight.c

get_backlight function read from the wrong sysfs file.
The real backlight value is available from 'actual_brightness', whereas 'brightness' is used for changing/setting the backlight through software.
'brightness' always reads last value writen to it.
Backlight which is hardware controlled, as with many thinkpads (ex T42), does not update 'brightness'. Thus hald is not returning the right value!

line 67 should be:
   g_snprintf (sysfs_path, sizeof (sysfs_path), "%s/actual_brightness", path);

On my T42 the sysfs path is:
   /sys/class/backlight/thinkpad_screen/actual_brightness