summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hessellund <osos@openeyes.dk>2009-07-24 11:25:02 +0200
committerDanny Kukawka <danny.kukawka@web.de>2010-04-16 15:00:37 +0200
commitf17eef3b46ae14b316afed09e472a52d4efee9c7 (patch)
treeebc8ef0efec0d27f3446e6f4c00af45310b617d6
parentdeb645cdaf8a008bc75bfb3077010ede573f6826 (diff)
read brightness from actual_brightness and not from brightness
The 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! fd.o#21612
-rw-r--r--hald/linux/addons/addon-generic-backlight.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hald/linux/addons/addon-generic-backlight.c b/hald/linux/addons/addon-generic-backlight.c
index 952a369d..fd2d8f56 100644
--- a/hald/linux/addons/addon-generic-backlight.c
+++ b/hald/linux/addons/addon-generic-backlight.c
@@ -64,7 +64,7 @@ get_backlight ()
f = NULL;
value = -1;
- g_snprintf (sysfs_path, sizeof (sysfs_path), "%s/brightness", path);
+ g_snprintf (sysfs_path, sizeof (sysfs_path), "%s/actual_brightness", path);
f = fopen (sysfs_path, "rb");
if (f == NULL) {