Meelis Roos wrote:
> $ glxinfo
> name of display: localhost:10.0
> Xlib: connection to ":0.0" refused by server
> Xlib: Client is not authorized to connect to Server
> display: localhost:10 screen: 0
> direct rendering: No
>
> If the display is different from :0.0 (:1.0, remote display, whatever)
> then GLX initialization tries to connecxt to :0.0 and fails. Sometimes
> this takes time, depending on user configuration. For example, on my
> home computer I have to wait quite a long for this :0.0 connect timeout
> for some reason when running GLX things on :1.0. I have seen this
> behaviour several times and today I decided to find out what's wrong.
>
> If this si the wrong list and there is a better list for GLX library
> problems, please direct me there.
>
> Below is an excerpt from ltrace -S glxinfo to find out the call trace.
> It basically shows that glxinfo calls glXMakeCurrent with correct
> display struct but inside glXMakeCurrent a connection to :0.0 is made.
>
> A little digging in the code shows that glXMakeCurrent saves old
> context:
> oldGC = __glXGetCurrentContext();
>
> __glXGetCurrentContext() finds no previous context and uses dummyContext
> instead. Somehow dummyContext is used without check later and it seems
> that this results in spurious connect to default display :0.0. I have
> not determined where the exact call is since I don't have time to
> recompile it with debug info currently.
>
> This trace is from XFree 4.1.0-17 Debian package (because that's what
> I'm running on the computer where ltrace works) but I tried it with
> 4.2.99.1 CVS on another computer (sparc, so no ltrace) and the result
> was similar - it still connected to :0.0. Even more, it segfaulted
> somewhere after that but my current binaries are without debug info and
> I can't find out what exactly happened. Anyway, this GLX problem is
> present both in 4.1 and 4.2 current.
>
> 17369 XCreateWindow(0x08053b00, 49, 0, 0, 100)= 0x0302
> 17369 glXCreateContext(0x08053b00, 0x08055848, 0, 1, 1
> 17369 malloc(1308
> 17369 SYS_brk(0x08057000) = 0x08057000
> 17369 <... malloc resumed> ) = 0x08055d10
> 17369 malloc(262140
> 17369 SYS_mmap(0xbb04, 262144, 0x40337dd0, 266240, 0x8000) = 0x40392000
> 17369 <... malloc resumed> ) = 0x40392008
> 17369 <... glXCreateContext resumed> )= 0x08055d10
> 17369 glXMakeCurrent(0x08053b00, 0x0302, 0x08055d10, 1, 1
> 17369 SYS_write(3, "\217\024 ", 232) = 232
> 17369 SYS_read(3, ???, 32)= -11
> 17369 SYS__newselect(4, 0xbaac, 0, 0, 0) = 1
> 17369 SYS_read(3, "\001", 32) = 32
> 17369 XOpenDisplay(":0.0"
> 17369 SYS_uname(0xb534) = 0
> 17369 SYS_socketcall(1, 0xb774, 0x401e8fdc, 0x401e69e8, 60) = 4
> 17369 SYS_uname(0xb574) = 0
> 17369 SYS_uname(0xb474) = 0
> 17369 SYS_socketcall(3, 0xb754, 0x401feac0, 19, 0xb7cc) = 0
> 17369 SYS_uname(0xb5b4) = 0
> 17369 SYS_fcntl64(4, 2, 1, 2, 4) = 0
> 17369 SYS_access(0x08054678, 4, 0x401e8fdc, 0x08054678, 0xb82e) = 0
> 17369 SYS_open("/home/mroos/.Xauthority", 0, 0666) = 5
> 17369 SYS_fstat64(5, 0xb58c, 0x40338a40, 0x4033c36c, 5) = 0
> 17369 SYS_mmap(0xb554, 0xb58c, 0x40337dd0, 0x080568d8, 4096) = 0x40016000
> 17369 SYS_read(5, "", 4096) = 304
> 17369 SYS_read(5, "", 4096) = 0
> 17369 SYS_close(5)= 0
> 17369 SYS_munmap(0x40016000, 4096)= 0
> 17369 SYS_brk(0x08058000) = 0x08058000
> 17369 SYS_writev(4, 0xb954, 1, 1, 4) = 12
> 17369 SYS_fcntl64(4, 3, 0, 3, 4) = 2
> 17369 SYS_fcntl64(4, 4, 2050, 4, 4) = 0
> 17369 SYS_read(4, ???, 8) = -11
> 17369 SYS__newselect(5, 0xb8cc, 0, 0, 0) = 1
> 17369 SYS_read(4, "", 8) = 8
> 17369 SYS_read(4, "Client is not authorized to conn"..., 48) = 48
> 17369 SYS_write(2, "Xlib: connection to ":0.0" refus"..., 52) = 52
> 17369 SYS_write(2, "Client is not authorized to conn"..., 45) = 45
> 17369 SYS_write(2, "\r\n", 2) = 2
> 17369 SYS_socketcall(13, 0xb8c4, 0x401e8fdc, 0x08056868, 0x08056820) = 0
> 17369 SYS_close(4)= 0
> 17369 <... XOpenDisplay resumed> )= NULL
> 17369 malloc(2244)= 0x080562b8
> 17369 <... glXMakeCurrent resumed> ) = 1
>
>
Meelis,
When you have time, build the DRI trunk as debuggable and send us
whatever info you find. A patch would be great :-) Post to
[EMAIL PROTECTED]
Regards,
Jens
--
/\
Jens Owen/ \/\ _
[EMAIL PROTECTED] /\ \ \ Steamboat Springs, Colorado
--