GNOME Bugzilla – Bug 661000
gnome-settings-daemon crashes when started in NX session
Last modified: 2011-10-10 13:55:37 UTC
this report has been filed here: https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/867631 "nome-settings-daemon crashes when started in NX session. (gnome-settings-daemon:20586): Gdk-WARNING **: The program 'gnome-settings-daemon' received an X Window System error. This probably reflects a bug in the program. The error was 'XSyncBadCounter'. (Details: serial 195 error_code 146 request_code 137 minor_code 5) (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.) " "This crashes because NX doesn't have an IDLETIME counter, and g-s-d just assumes the availability of it, despite this warning: (gnome-settings-daemon:19148): power-plugin-WARNING **: No idle counter " "Note, minor code 5 is XSyncQueryCounter, so this is a crash in gpm_idletime_get_time "
I can't run NX, so a patch to fix this would be very welcome. I imagine it's just a case of surrounding the code that crashes with: gdk_error_trap_push (); /* DPMSSetTimeouts() return value is often a lie, so ignore it */ DPMSSetTimeouts (screen->priv->xdisplay, 0, 0, 0); if (gdk_error_trap_pop ()) { do_something_sane(); } Thanks.
I can't run NX either, but I could probably still fix this when I get back from vacation next week if nobody else does, and ask one of the original reporters to test it.
I'm the original reporter. Based on the comment about gpm_idletime_get_time, I tracked down and commented out the call to gpm_idletime_get_time in idle_set_timeout_dim. I then rebuilt the Ubuntu package and installed it to validate and the problem appears to have gone away. Now, if one of you wanted to give me a general idea of how this should really be fixed and point me at the right source files I might be able to find some time this weekend to come up with a patch.
Actually, I apologize - I have several open bug reports and didn't realize I'm not the original reporter for https://bugs.launchpad.net/gnome-settings-daemon/+bug/867631
Created attachment 198515 [details] [review] test patch Can you test this patch please. Thanks.
Review of attachment 198515 [details] [review]: You're missing a call to XQueryExtension() when creating the counter.
(In reply to comment #5) > Created an attachment (id=198515) [details] [review] > test patch > > Can you test this patch please. Thanks. Patch applies cleanly to gnome-settings-daemon_3.2.0-0ubuntu5 and appears to resolve the issue.
(In reply to comment #7) > Patch applies cleanly to gnome-settings-daemon_3.2.0-0ubuntu5 and appears to > resolve the issue. Thanks for testing, I've pushed the patch to gnome-3-2 and master.
Sure, no problem. Glad to know I could help out.