You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, June 28th 2004, 3:23am

KDE applications starting slowly with remote X server

KDE 3.2.3 on Debian Unstable

I have a setup with a powerful "application server" dedicated to running my applications. This machine has 2 x XP2200, 512MB and a filesystem spread accross 8 disks (6 scsi).

My workstation is a diskless PC running an X server against kdm on the application server, basically a thin client.

Everything is running fine, except:
Starting most (any?) KDE applications takes 5 seconds or more. This time is certainly not spend waiting for hardware resources.

'strace -T konsole' reveals that something tries to connect to /tmp/.X11-unix/X0 six times during startup, waiting one second between each attempt. Finally the application sees reason and connects to the remote X server making konsole appear. The attempts to connect to the non-existant local X server seem to be a terrible waste of time.

<snip>
uname({sys="Linux", node="lyn", ...}) = 0 <0.000062>
socket(PF_FILE, SOCK_STREAM, 0) = 4 <0.000087>
uname({sys="Linux", node="lyn", ...}) = 0 <0.000050>
uname({sys="Linux", node="lyn", ...}) = 0 <0.000061>
connect(4, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"}, 19) = -1 ENOENT (No such file or directory) <0.000104>
close(4) = 0 <0.000061>
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 <0.000074>
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 <0.000071>
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 <0.000061>
nanosleep({1, 0}, {1, 0}) = 0 <1.002515>
uname({sys="Linux", node="lyn", ...}) = 0 <0.000064>
socket(PF_FILE, SOCK_STREAM, 0) = 4 <0.000087>
uname({sys="Linux", node="lyn", ...}) = 0 <0.000053>
uname({sys="Linux", node="lyn", ...}) = 0 <0.000050>
connect(4, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"}, 19) = -1 ENOENT (No such file or directory) <0.000106>
close(4) = 0 <0.000059>
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 <0.000068>
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 <0.000070>
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 <0.000062>
nanosleep({1, 0}, {1, 0}) = 0 <1.002543>
uname({sys="Linux", node="lyn", ...}) = 0 <0.000009>
socket(PF_FILE, SOCK_STREAM, 0) = 4 <0.000030>
uname({sys="Linux", node="lyn", ...}) = 0 <0.000007>
uname({sys="Linux", node="lyn", ...}) = 0 <0.000007>
connect(4, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"}, 19) = -1 ENOENT (No such file or directory) <0.000033>
close(4) = 0 <0.000016>
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 <0.000008>
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 <0.000009>
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 <0.000008>
nanosleep({1, 0}, {1, 0}) = 0 <1.002374>
</snip>


What is causing this silly behaviour? -and how do I get rid of it?


Best Regards,

Michael A.

2

Monday, June 28th 2004, 5:25pm

Re: KDE applications starting slowly with remote X server

Quoted

Original von mandersen

KDE 3.2.3 on Debian Unstable
[...]
Everything is running fine, except:
Starting most (any?) KDE applications takes 5 seconds or more. This time is certainly not spend waiting for hardware resources.

'strace -T konsole' reveals that something tries to connect to /tmp/.X11-unix/X0 six times during startup, waiting one second between each attempt. Finally the application sees reason and connects to the remote X server making konsole appear. The attempts to connect to the non-existant local X server seem to be a terrible waste of time.


I think I can confirm what you're seeing. In my case the machine is running a kdm so I don't get the "no such file or directory" message but it fails one step later:
[code:1]Xlib&#58; connection to "&#58;0.0" refused by server
Xlib&#58; No protocol specified
[/code:1]
(This message comes up only once, not six times as in your case (*).)

It should not try to connect to the local X server on that machine because I'm starting that app from a ssh session with X11 forwarding.

The app comes up anyway after some time (that may well be the normal startup time of a KDE app over my slow LAN (10 MBit)) and on the correct X server (the one I'm sitting in front of ;-)).

No idea how to solve it, though. I'm also on KDE 3.2.3 on Debian unstable. Maybe that's a packaging problem? Can anyone with a different distro confirm this behaviour?

---------

(*) This is true if I've run another KDE app recently. The first KDE app
to start up causes more output:
[code:1]QPixmap&#58; Cannot create a QPixmap when no GUI is being used
QPixmap&#58; Cannot create a QPixmap when no GUI is being used
Xlib&#58; connection to "&#58;0.0" refused by server
Xlib&#58; No protocol specified

QPixmap&#58; Cannot create a QPixmap when no GUI is being used
QPixmap&#58; Cannot create a QPixmap when no GUI is being used
kbuildsycoca running...[/code:1]
This seems to be the startup of needed services. In this case the time needed is several seconds longer.

3

Monday, June 28th 2004, 6:07pm

Re: KDE applications starting slowly with remote X server

Quoted

Original von cmbofh

No idea how to solve it, though. I'm also on KDE 3.2.3 on Debian unstable. Maybe that's a packaging problem? Can anyone with a different distro confirm this behaviour?

I tested this myself by connecting to an older Gentoo box I still have around (KDE: 3.2 BRANCH >= 20040204) and there the problem does not occur.

It would still be good if someone with KDE 3.2.3 on a distro other than Debian unstable could try it out.

4

Tuesday, June 29th 2004, 3:14pm

Re: KDE applications starting slowly with remote X server

Quoted

Original von cmbofh


I tested this myself by connecting to an older Gentoo box I still have around (KDE: 3.2 BRANCH >= 20040204) and there the problem does not occur.

It would still be good if someone with KDE 3.2.3 on a distro other than Debian unstable could try it out.


I seem to recall that the server I previously had installed (also Debian Unstable) did not have this problem. Back then the KDE version would probably have been an early 3.2.

I think I will try to raise the problem as a Debian bug.

Best Regards,

Michael A.