gtk+ and randr

Alex Deucher alexdeucher at gmail.com
Mon Jul 21 15:45:15 PDT 2008


On Mon, Jul 21, 2008 at 6:39 PM, Ben Gamari <ben at mw0.ath.cx> wrote:
> On Mon, 2008-07-21 at 23:39 +0200, Soeren Sandmann wrote:
>> Adam Jackson <ajax at nwnk.net> writes:
>>
>> > On Sun, 2008-07-20 at 16:40 -0400, Ben Gamari wrote:
>> > > Howdy all,
>> > >
>> > > As many of you probably know, GTK+ has apparently been calling
>> > > XRRGetScreenResources() on startup for some time now. Having a laptop, I
>> > > occasionally find myself using VGA displays which, for the last few
>> > > months, flickered horribly when starting a gtk+ application due to EDID
>> > > probing (as I reported in bug #16224 [1]). Earlier this week, this issue
>> > > was worsened when I pulled down the latest xorg commits from git. On my
>> > > intel hardware, even the LVDS output now flickers when starting a gtk+
>> > > application.
>> >
>> > XRRGetScreenResources is an expensive call.  Always.  If gtk is calling
>> > it on every app startup they're absolutely insane.
>>
>> I don't know any reason it has to be expensive or flicker, and if it
>> has to, then we have a problem, because at login time we do need to
>> call it to set the user's screen configuration; there is no way around
>> it. On most hardware I have tried it on, it hasn't been all that
>> expensive.
>
> On Intel hardware it seems to probe the outputs and re-acquire EDID
> information, which in itself seems to usually cause loss of sync. It
> seems this is what XRRGetScreenResources() is supposed to do so I really
> don't see any way to avoid the cost.

If you have monitors with EDIDs plugged into your connectors, then
you're fine.  if you have nothing on one or more connectors or a
monitor without an EDID, you may get flickering as the driver attempts
to use load detection to sense the presence of a monitor since there
is no EDID.

Alex



More information about the xorg mailing list