[gpm] Fwd: How to chose which backlight to control?



[ resend, subscribed ]

On Mon, Jul 7, 2008 at 11:06 PM, Jan Dittmer <jdi l4x org> wrote:
> Hi,
>
> $ ls /sys/class/backlight/
> acpi_video0  acpi_video1  thinkpad_screen
>
> Only acpi_video1 controls the backlight (0-15). All others are disfunctional.
> How can I tell gpm that? Or do I need to tell it hal? If yes, how?

Okay, I invistigated a bit, I first had to tell gpm to ignore the two
non-working
lcds. So I patched gpm-brightness-lcd.c to skip devices with info.ignore=true
set in hal (which I did by providing a matching fdi file).

Second problem is, that somehow last_set_hw doesn't match
gpm_brightness_lcd_get_hw. By commenting out that check in the _up and _down
methods, backlight control now works. Debug output from the patch shows:

[gpm_brightness_lcd_down] gpm-brightness-lcd.c:383 (12:32:04):   HW
Level 14, Last set 15
[gpm_brightness_lcd_up] gpm-brightness-lcd.c:340 (12:32:06):     HW Level
15, Last set 12
[gpm_brightness_lcd_down] gpm-brightness-lcd.c:383 (12:32:07):   HW
Level 14, Last set 15
[gpm_brightness_lcd_down] gpm-brightness-lcd.c:383 (12:32:07):   HW
Level 13, Last set 12
[gpm_brightness_lcd_down] gpm-brightness-lcd.c:383 (12:32:07):   HW
Level 12, Last set 11
[gpm_brightness_lcd_down] gpm-brightness-lcd.c:383 (12:32:08):   HW
Level 11, Last set 10

I cannot really see where this error is introduced... Perhaps some
developer can investigate
that further?

I'd appreciate any feedback!

Jan

Attachment: gpm-brightness-lcd.patch
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]