Comment 20 for bug 392122

Revision history for this message
Alex Lusco (alex-lusco) wrote :

I'm very confident now in my previous statement and I'm pretty sure have found the bug.

Attached is a log file (that is only sort of helpful) using gnome-power-manager --verbose and it shows the following:

Turning on "reduce backlight brightness" -> Backlight immediately goes to 50 (the new "max")
Use hardware keys to turn brightness up -> Brightness will move all the way to 100 (past the "max")
Leave computer idle* ->brightness adjusts for idle dim amount of 15
User responds by moving mouse to kick out of idle more -> brightness will increase to reduced "max" of 50

So the immediate issue is that the hardware buttons are not respecting the "reduced backlight brightness" button. The clearly make it go past the max level of 50% and causes the unexpected behavior when coming out of idle. So the easiest resolution I think is make the hardware buttons respect the reduced backlight (note all the reduced backlight option does is multiply the normal backlight percentage by .5). This will cause some user confusion though as to why they can't make the brightness go all the way up so there needs to be some type of user feedback when the max is hit in this mode, probably as part of the nice little popup that comes up when hitting the brightness keys. I haven't inspected the code yet but it seems that the hardware keys really just ignore any of the internal scale options on the correct brightness percentage (shown below). If possible I'm just going to try make them utilize this percentage and the entire problem should be corrected. I've never looked at this code though so it may take me a while to figure it out.

TI:20:15:35 TH:0x1ba3c80 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,311
 - 1. main brightness 1.000000
TI:20:15:35 TH:0x1ba3c80 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,331
 - 2. battery scale 0.500000, brightness 0.500000
TI:20:15:35 TH:0x1ba3c80 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,349
 - 3. idle scale 1.000000, brightness 0.500000

* Now I can't prove this but it seems that it dims quickly when in reduced brightness mode like idle comes quicker. Maybe this is just paranoia. Regardless there should really be an option to set the idle timeout period to dim the screen and I can't find one.