After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 603108 - brightness never fully restores after idle dim on battery
brightness never fully restores after idle dim on battery
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-11-27 04:47 UTC by Byron Clark
Modified: 2012-03-23 16:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Creates separate master percentages for ac and battery (5.70 KB, patch)
2009-11-27 04:50 UTC, Byron Clark
none Details | Review

Description Byron Clark 2009-11-27 04:47:49 UTC
Backlight brightness is always calculated as follows:

1. Start with the master percentage
2. Scale brightness if on battery and we should dim on battery
3. Scale brightness if idle and we should dim on idle

This calculation works well and is correct in most cases.  The only wrinkle is when the user changes the brightness manually while on battery power.  In this case, master percentage is set to the new brightness.  When the system goes idle and gpm_backlight_evaluate_and_set is called, the new brightness is treated as the master percentage and scaled down.  When the system is no longer idle, the resulting calcluation is still the user set brightness scaled by the battery settings.

The end result is that a user that manually adjusts the brightness while on battery power will have to adjust the brightness after each idle time.
Comment 1 Byron Clark 2009-11-27 04:50:51 UTC
Created attachment 148573 [details] [review]
Creates separate master percentages for ac and battery

This patch keeps two master percentages and adds a utility function to determine which one should be used.  The battery percentage is defaulted to the /apps/gnome-power-manager/backlight/brightness_dim_battery.  This keeps the master percentage consistent through user adjustments and leaves ac and battery states completely separate.

I'm not fully happy with the approach, but it seems more sane than storing percentages > 100 in master percentage to account for brightness updates on battery power.
Comment 2 Richard Hughes 2012-03-23 16:08:25 UTC
Is this working better with GNOME 3.2 and 3.4?
Comment 3 Byron Clark 2012-03-23 16:19:26 UTC
This can probably be closed; I don't remember seeing the issue in my limited use of GNOME 3.2.