Red Hat Bugzilla – Bug 539921
Only dim diplay when power supply changes
Last modified: 2009-11-25 16:15:55 EST
Description of problem:
After resume from suspend, the display on my Samsung NC10 frequently dims, even while I am typing. Continued typing does not raise the brightness. Sometimes I see an additional icon in the system tray that points to http://blogs.gnome.org/hughsie/2009/08/17/gnome-power-manager-and-blanking-removal-of-bodges/ and says to report a bug to the distribution.
Version-Release number of selected component (if applicable):
When the dimming happens is not predictable, but it happens frequently after resume.
Steps to Reproduce:
3. use computer
Screen won't dim until idle.
Screen dims at random times.
This is a little more bizarre than expected. The screen continues to dim, even when I turn off the "Dim display when idle" checkbox in the "On Battery Power" section of the gnome-power-manager preferences.
Watching the output of 'devkit-power --monitor-detail' shows messages like this every time the display dims:
It appears that the on-low-battery state is changing even though the battery is approximately 80% full.
Changed title to reflect what the real problem is. gnome-power-manager attempts to change the brightness whenever it gets a message from DeviceKit-power showing a change when on-battery is set to yes. At least on my system these messages happen when the power supply hasn't changed. I guess the fix would be to get gnome-power-manager to check the last power supply state before attempting to dim or get DeviceKit-power to not send the spurious messages.
I have a Samsung NC10 and saw the same problem. There was an auto-dimming setting in the BIOS that I flipped to get rid of the confusing behavior. It's not really a solution, but it's a pretty good workaround.
The BIOS setting Andrew mentions is "Brightness Mode Control". Setting that to "User Control" instead of "Auto" greatly reduces the frequency at which the screen dims, but it still dims whenever one of those extra change messages comes through.
Created attachment 373821 [details]
Extract percentage using the correct type.
The problem was DeviceKit-power using a guint to extract the percentage in the on-low-battery calculation. The resulting value would be either 0 or -1 depending on the charge percentage. The attached patch fixes the problem in DeviceKit-power.
Patch applied, thanks.