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
Created attachment 25584 [details] [review] addon-generic-backlight.c.diff This patch fixes this issue. Please test and commit!
Additional info: I'm using a Thinkpad T42. This patch solves the issue for thinkpads using thinkpad_acpi. On Ubuntu 9.04 this causes an issue with wrong notifications when changing brightness. Gnome-power-manager reads the brightness value through hal, thus always showing the last value writen to 'brightness', even though the brightness lvel actually might be higher or lower, if controlled thru hardwired brightness control. Please apply this simple patch.
http://cgit.freedesktop.org/~dkukawka/hal/commit/?id=d792a792846f9632edfdea3651a74fcd24b2ead7 get merged before the next release
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.