GNOME Bugzilla – Bug 627711
gnome-power-manager crashed with signal 5 in _XError on systems without XBACKLIGHT
Last modified: 2010-09-29 03:36:59 UTC
gnome-power-manager crashes due to an unhandled X error on systems without XBACKLIGHT: Gdk-ERROR **: The program 'gnome-power-manager' received an X Window System error. This probably reflects a bug in the program. The error was 'BadAtom (invalid Atom parameter)'. (Details: serial 160 error_code 5 request_code 150 minor_code 15) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) aborting... Trace/breakpoint trap (core dumped)
+ Trace 223360
session = 0x6c0b70 manager = <value optimized out> error = 0x0 context = 0x637320 ret = <value optimized out> options = {{long_name = 0x4214e0 "verbose", short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x7fffffffe16c, description = 0x421648 "Show extra debugging information", arg_description = 0x0}, {long_name = 0x4214e8 "version", short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x7fffffffe168, description = 0x421670 "Show version of installed program and exit", arg_description = 0x0}, {long_name = 0x4214f0 "timed-exit", short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x7fffffffe164, description = 0x4216a0 "Exit after a small delay (for debugging)", arg_description = 0x0}, {long_name = 0x4214fb "immediate-exit", short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x7fffffffe160, description = 0x4216d0 "Exit after the manager has loaded (for debugging)", arg_description = 0x0}, {long_name = 0x0, short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x0, description = 0x0, arg_description = 0x0}} __FUNCTION__ = "main" This happens on 2.31.90. It looks like the same bug affects master too
Created attachment 168554 [details] [review] 0001-Fix-627711-Don-t-crash-on-systems-which-don-t-have-X.patch Here is a patch which fixes this
Note that people experiencing this see "no XRANDR extension" when running gnome-power-manager --verbose Here is the downstream bug report: https://launchpad.net/bugs/614039
The same BadAtom can hit people who have the xrandr extension, but xbacklight is nonfunctional and returns None for the property name.
Created attachment 168574 [details] [review] patch for this issue, written by Will Woods
Created attachment 168580 [details] [review] Guard all X calls for priv->backlight Chris's patch did two things that Will's doesn't: 1) Guarded output_set_internal and output_get_limits, both of which also have this problem 2) Avoided the XSync at the end of foreach_screen But if you still like Will's patch, here's at least an updated one that adds checks for set_internal and get_limits. You can still avoid the reported crash without these, but seems like they should be guarded too.
Michael, please apply your patch. I'm away from my laptop at the moment. Thanks.
This was committed a while ago