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 566095 - After going onto battery, reduces backlight level until screen is blank
After going onto battery, reduces backlight level until screen is blank
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.24.x
Other All
: Normal major
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
: 571807 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-12-31 00:58 UTC by Sam Morris
Modified: 2009-03-04 15:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sam Morris 2008-12-31 00:58:41 UTC
Please describe the problem:
If I remove the power lead from my laptop, gnome-power-manager starts reducing the backlight level until the screen is off over the course of a few minutes.

If I try to reset the level with 'xbacklight -set 100' then g-p-m immediately overrides it, and the screen continues on its way to darkness.

While this happens, g-p-m does not respond to any other events, such as the suspend button or the backlight brightness keys being pressed.

Steps to reproduce:
1. Unplug power cord


Actual results:
Screen goes dark after a few minutes

Expected results:
Nothing

Does this happen every time?
Yes

Other information:
Only started happening with 2.24.

Here's the output of running gnome-power-manager --verbose --no-daemon while unplugging my laptop, and a backtrace from gdb:

TI:00:51:13     TH:0x24448c0    FI:gpm-array.c  FN:gpm_array_append,141
 - adding to 0x269ef70, x=45, y=100, data=65280
TI:00:51:13     TH:0x24448c0    FI:gpm-array.c  FN:gpm_array_append,141
 - adding to 0x269f100, x=45, y=12526, data=65280
TI:00:51:17     TH:0x24448c0    FI:gpm-manager.c        FN:ac_adapter_changed_cb,1028
 - Setting on-ac: 0
TI:00:51:17     TH:0x24448c0    FI:gpm-idle.c   FN:gpm_idle_set_system_timeout,287
 - Setting system idle timeout: 60
TI:00:51:17     TH:0x24448c0    FI:gpm-manager.c        FN:ac_adapter_changed_cb,1032
 - emitting on-ac-changed : 0
[New Thread 0x41075950 (LWP 24122)]
TI:00:51:17     TH:0x24448c0    FI:gpm-screensaver.c    FN:gpm_screensaver_add_throttle,318
 - adding throttle reason: 'On battery power': id 1180579573
TI:00:51:17     TH:0x24448c0    FI:gpm-screensaver.c    FN:gpm_screensaver_poke,410
 - poke
TI:00:51:17     TH:0x24448c0    FI:gpm-backlight.c      FN:gpm_backlight_brightness_evaluate_and_set,379
 - 1. main brightness 1.000000
TI:00:51:17     TH:0x24448c0    FI:gpm-backlight.c      FN:gpm_backlight_brightness_evaluate_and_set,397
 - 2. battery scale 0.500000, brightness 0.500000
TI:00:51:17     TH:0x24448c0    FI:gpm-backlight.c      FN:gpm_backlight_brightness_evaluate_and_set,416
 - 3. idle scale 1.000000, brightness 0.500000
TI:00:51:17     TH:0x24448c0    FI:gpm-backlight.c      FN:gpm_backlight_brightness_evaluate_and_set,436
 - 4. ambient scale 1.000000, brightness 0.500000
TI:00:51:17     TH:0x24448c0    FI:gpm-brightness.c     FN:gpm_brightness_trust_cache,102
 - using cache for value 100 (probably okay)
TI:00:51:17     TH:0x24448c0    FI:gpm-feedback-widget.c        FN:gpm_feedback_display_value,140
 - Displaying 0.500000 on feedback widget
TI:00:51:17     TH:0x24448c0    FI:gpm-refcount.c       FN:gpm_refcount_add,100
 - refcount now: 1
TI:00:51:17     TH:0x24448c0    FI:gpm-refcount.c       FN:gpm_refcount_add,101
 - non zero, so sending REFCOUNT_ADDED
TI:00:51:17     TH:0x24448c0    FI:gpm-brightness.c     FN:gpm_brightness_trust_cache,102
 - using cache for value 100 (probably okay)
TI:00:51:17     TH:0x24448c0    FI:gpm-brightness-xrandr.c      FN:gpm_brightness_xrandr_foreach_screen,414
 - using resource 0x26464f0
TI:00:51:17     TH:0x24448c0    FI:gpm-brightness-xrandr.c      FN:gpm_brightness_xrandr_foreach_resource,375
 - resource 1 of 2
TI:00:51:17     TH:0x24448c0    FI:gpm-brightness-xrandr.c      FN:gpm_brightness_xrandr_foreach_resource,375
 - resource 2 of 2
TI:00:51:17     TH:0x24448c0    FI:gpm-brightness-xrandr.c      FN:gpm_brightness_xrandr_output_set,322
 - percent=50, absolute=12382
TI:00:51:17     TH:0x24448c0    FI:gpm-brightness-xrandr.c      FN:gpm_brightness_xrandr_output_set,324
 - hard value=24765, min=0, max=24765
[New Thread 0x41876950 (LWP 24125)]
[New Thread 0x42077950 (LWP 24126)]
[New Thread 0x42878950 (LWP 24127)]
[New Thread 0x43079950 (LWP 24128)]
[Thread 0x42878950 (LWP 24127) exited]
[Thread 0x43079950 (LWP 24128) exited]
[Thread 0x42077950 (LWP 24126) exited]
[New Thread 0x42077950 (LWP 24129)]
[New Thread 0x43079950 (LWP 24130)]
[Thread 0x42077950 (LWP 24129) exited]
[Thread 0x43079950 (LWP 24130) exited]
[New Thread 0x43079950 (LWP 24132)]
[New Thread 0x42077950 (LWP 24133)]
[New Thread 0x42878950 (LWP 24134)]
[Thread 0x42878950 (LWP 24134) exited]
^C
Program received signal SIGINT, Interrupt.
0x00007f41fb271ce2 in select () from /lib/libc.so.6

(gdb) where
  • #0 select
    from /lib/libc.so.6
  • #1 ??
    from /usr/lib/libxcb.so.1
  • #2 xcb_wait_for_reply
    from /usr/lib/libxcb.so.1
  • #3 _XReply
    at ../../src/xcb_io.c line 366
  • #4 XSync
    at ../../src/Sync.c line 48
  • #5 IA__gdk_flush
    at /tmp/buildd/gtk+2.0-2.14.5/gdk/x11/gdkevents-x11.c line 2546
  • #6 gpm_brightness_xrandr_output_set_internal
    at gpm-brightness-xrandr.c line 127
  • #7 gpm_brightness_xrandr_foreach_screen
    at gpm-brightness-xrandr.c line 349
  • #8 gpm_brightness_xrandr_set
    at gpm-brightness-xrandr.c line 443
  • #9 gpm_brightness_set
    at gpm-brightness.c line 133
  • #10 gpm_backlight_brightness_evaluate_and_set
    at gpm-backlight.c line 453
  • #11 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.18.3/gobject/gclosure.c line 767
  • #12 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.18.3/gobject/gsignal.c line 3244
  • #13 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.18.3/gobject/gsignal.c line 2977
  • #14 IA__g_signal_emit
    at /build/buildd/glib2.0-2.18.3/gobject/gsignal.c line 3034
  • #15 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.18.3/gobject/gclosure.c line 767
  • #16 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.18.3/gobject/gsignal.c line 3244
  • #17 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.18.3/gobject/gsignal.c line 2977
  • #18 IA__g_signal_emit
    at /build/buildd/glib2.0-2.18.3/gobject/gsignal.c line 3034
  • #19 watch_device_properties_modified_cb
    at libhal-gdevice.c line 311
  • #20 marshal_dbus_message_to_g_marshaller
    at dbus-gproxy.c line 1665
  • #21 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.18.3/gobject/gclosure.c line 767
  • #22 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.18.3/gobject/gsignal.c line 3244
  • #23 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.18.3/gobject/gsignal.c line 2977
  • #24 IA__g_signal_emit
    at /build/buildd/glib2.0-2.18.3/gobject/gsignal.c line 3034
  • #25 dbus_g_proxy_manager_filter
    at dbus-gproxy.c line 1718
  • #26 dbus_connection_dispatch
    from /usr/lib/libdbus-1.so.3
  • #27 message_queue_dispatch
    at dbus-gmain.c line 101
  • #28 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.18.3/glib/gmain.c line 2144
  • #29 g_main_context_iterate
    at /build/buildd/glib2.0-2.18.3/glib/gmain.c line 2778
  • #30 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.18.3/glib/gmain.c line 2986
  • #31 main
    at gpm-main.c line 268

[ forwarded from http://bugs.debian.org/510268 ]
Comment 1 Sam Morris 2008-12-31 22:41:18 UTC
If I disable 'On Battery Power' -> 'Reduce backlight brightness' then this does not happen, phew :)
Comment 2 Richard Hughes 2009-01-02 09:29:07 UTC
2009-01-02  Richard Hughes  <richard@hughsie.com>

	* src/gpm-brightness-xrandr.c: (gpm_brightness_xrandr_output_set):
	Don't step through each brightness state when we fade modes, some
	devices using XRandR have an insane number of steps. Use the step
	value we calculated for the _up and _down logic.
	Fixes #566095
Comment 3 James Strother 2009-02-16 05:08:39 UTC
*** Bug 571807 has been marked as a duplicate of this bug. ***
Comment 4 Richard Hughes 2009-03-04 15:33:02 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.