From b7bc694c6b98dac17763426d905a22d3ae17a018 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Wed, 14 Nov 2007 15:46:57 -0800 Subject: Fix kernel get_brightness function We need to look at "actual_brightness" rather than "brightness". The former contains the brightness value the kernel driver has actually set, while the latter is merely what the user requested. --- src/i830_lvds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/i830_lvds.c') diff --git a/src/i830_lvds.c b/src/i830_lvds.c index 694414a3..0942d1cb 100644 --- a/src/i830_lvds.c +++ b/src/i830_lvds.c @@ -293,7 +293,7 @@ i830_lvds_get_backlight_kernel(xf86OutputPtr output) char path[BACKLIGHT_PATH_LEN], val[BACKLIGHT_VALUE_LEN]; int fd; - sprintf(path, "%s/%s/brightness", BACKLIGHT_CLASS, + sprintf(path, "%s/%s/actual_brightness", BACKLIGHT_CLASS, backlight_interfaces[backlight_index]); fd = open(path, O_RDWR); if (fd == -1) { -- cgit v1.2.3