GNOME Bugzilla – Bug 544072
GTK+ calls XRRGetScreenResources() altogether far too frequently
Last modified: 2009-03-06 03:48:41 UTC
Please describe the problem: GTK+ seems to call XRRGetScreenResources() on startup. This is an expensive call and causes the X server to probe outputs. This means that every time a GTK+ application is started, all outputs lose and must regain sync. This is Very Bad(TM). Original xserver bug: https://bugs.freedesktop.org/show_bug.cgi?id=16224 Mailing list thread: http://lists.freedesktop.org/archives/xorg/2008-July/037365.html Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
pretty clearly an issue on the X side of the fence...
If you read the thread and original bug report, you will see that the X people strongly disagree. XRRGetScreenResources() is currently designed to be a very expensive call: "XRRGetScreenResources is an expensive call. Always. If gtk is calling it on every app startup they're absolutely insane." -- David Airlie
At least get your quoting right. Ajax said that, not airlied.
I have the same problem here. Concerning the reproduction of the bug, I think it depends on the video driver. It happens only if it re-asks for EDID at each call to XRRGetScreenResources() (which, according to the Xorg maintainers, is the right thing to do). At least, with the intel driver, it happens. IMHO I feel like asking again for the EDID, even if the screen has not changed is rather useless. It also leads to all the programs using xrandr to cause my screen to flicker. However, I would like to suggest disabling the call in gtk until this is resolved. Having the screen flickering each time an application starts is just purely unacceptable from the point of view of the user :-(
So solutions I can think of here: a) request new API at xorg: anyone opened a bug for this? b) stop using the API altogether: what's the impact on gtk? c) use the API as little as possible, perhaps moving the information to a per-session location (e.g. xsettings); we could either move updating of this information to some other layer, or update it from whatever gtk app starts first, or periodically Is there any mailing-list thread discussing the issue with the API or lack of API for the information gtk is interested in, without reprobing outputs? Thanks,
You can find ajax' patch for a more suitable xrandr api on xorg-list
Thread: http://lists.freedesktop.org/archives/xorg/2008-July/thread.html#37365 Patch in msg: http://lists.freedesktop.org/archives/xorg/2008-July/037459.html Patch to the spec/headers: http://people.freedesktop.org/~ajax/patches/randrproto-1.3.patch AIUI, this still needs: * implementation in xrandr drivers and server * new xrandr, server and driver releases doesn't look like we'll get that anytime soon, so should usage of this API be reverted in Gtk+ until this is available?
Isn't this a duplicate of bug #571574?
Kinda *** This bug has been marked as a duplicate of 571574 ***