View previous topic :: View next topic |
Author |
Message |
SilverSnake n00b
Joined: 01 Oct 2002 Posts: 50 Location: Linköping, Sweden
|
Posted: Sun Oct 06, 2002 2:54 am Post subject: X Starts REAL slow. |
|
|
Heya,
Recently got X working somewhat good. It now runs in 1280x1024 instead of 800x600. I got the NVidia drivers working (get the NV splash on startup). But X starts real slow. When I type "kdm" or restart my X Server at the login page, even when I log out, it passes several seconds with just a black screen and the monitor blinks twice with parts of whatever was visible before (almost as if changing resolution).
Before I installed Gentoo I ran RedHat 7.3 and there it took a mere fraction of a second to restart my X Server. Monitor blinked once, real quick, and it was done. I guess I've failed to set up my XF86Config correctly, but I got this NV_Check.sh script from a friend and it now runs without any complaints.
Should I append my XF86Config file for review? The above listed script? They are both pretty lengthy, so I ask first before posting them
Thanks in Advance. _________________ da SilverSnake is back! |
|
Back to top |
|
|
Mnemia Guru
Joined: 17 May 2002 Posts: 476
|
Posted: Sun Oct 06, 2002 3:17 am Post subject: |
|
|
Many of the times I've had problems with X starting very slow it's been caused by slow or failing name resolution. Do you have a hostname set in /etc/hostname, and is it a valid DNS entry? Check /etc/hosts as well and perhaps add your hostname and IP address there. There are more posts on this topic in the forums if you search. |
|
Back to top |
|
|
SilverSnake n00b
Joined: 01 Oct 2002 Posts: 50 Location: Linköping, Sweden
|
Posted: Sun Oct 06, 2002 2:12 pm Post subject: |
|
|
My hosts file is almost empty, and it shouldn't be any problem as I got a 10MBit LAN connection to my DNS server. And since the screen flickers a few times I beleive it's something else...
I get the following error msg when I try to start emacs from a terminal, when I try to play movies with mplayer (executed through terminal) and I've seen it somewhere else... I believe it might be connected to my problem.
Code: | Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
emacs: Cannot connect to X server :0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine. |
I checked my environment variables and found
That looks weird to me, but I'm not that good at this either
I think my problem lies within my X-server somewhere now at least. Any further ideas? Should I post my XF86Config so you can take a look at it maybe?
Edit: Oh ya, I cannot find any program named 'xhost' on my machine. (of course I tried without the singlequotes )
Thanks a lot! _________________ da SilverSnake is back! |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Sun Oct 06, 2002 5:11 pm Post subject: |
|
|
Sounds like a path. issue. Normally, emerging X sets up the correct path information. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
SilverSnake n00b
Joined: 01 Oct 2002 Posts: 50 Location: Linköping, Sweden
|
Posted: Sun Oct 06, 2002 6:00 pm Post subject: |
|
|
kanuslupus wrote: | Sounds like a path. issue. Normally, emerging X sets up the correct path information. |
Should I just re-emerge X? i.e. "emerge xfree" ? _________________ da SilverSnake is back! |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Oct 06, 2002 6:31 pm Post subject: |
|
|
SilverSnake wrote: | And since the screen flickers a few times I beleive it's something else... |
Maybe your XF86Config-4 configuration file has some modelines or resolutions that aren't really supported by your graphics card / monitor. Try reconfiguring X before you recompile it.
Quote: | Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
I checked my environment variables and found
That looks weird to me, but I'm not that good at this either |
I have "DISPLAY=:0.0". What user are you starting X as and what user are you running under when you get these errors?
Quote: | Edit: Oh ya, I cannot find any program named 'xhost' on my machine. (of course I tried without the singlequotes ) |
It should be in /usr/X11R6/bin/xhost. Does that file exist? If it's missing, you may need to recompile xfree. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
SilverSnake n00b
Joined: 01 Oct 2002 Posts: 50 Location: Linköping, Sweden
|
Posted: Sun Oct 06, 2002 6:47 pm Post subject: |
|
|
rac wrote: | Maybe your XF86Config-4 configuration file has some modelines or resolutions that aren't really supported by your graphics card / monitor. Try reconfiguring X before you recompile it. |
Well, right now I've only been working on my XF86Config file, what's the differance to the -4 one? Should I insert my settings into both of them? It was by modifying the non-4 one that I got my higher resolution working (by adding a modeline)
Quote: | I have "DISPLAY=:0.0". What user are you starting X as and what user are you running under when you get these errors? |
I start X as root (with "kdm") and I run under one of my ownmade users when I get errors mostly, but they appear all the time when I have su'ed to root in a shell too.
Quote: | It should be in /usr/X11R6/bin/xhost. Does that file exist? If it's missing, you may need to recompile xfree. |
Ahh, there it is. I got it. When I run it (without any flags or anything) I get this output.
Code: | bash-2.05a# /usr/X11R6/bin/xhost
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
/usr/X11R6/bin/xhost: unable to open display ":0" |
I guess running 'emerge xfree' again might be what I need to do. What settings should I look over before doing so?
Thanks for helping me out _________________ da SilverSnake is back! |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Oct 06, 2002 7:51 pm Post subject: |
|
|
SilverSnake wrote: | Well, right now I've only been working on my XF86Config file, what's the differance to the -4 one? |
See the XF86Config man page for details - basically -4 will override the other one, because it's earlier in the search path.
Quote: | I start X as root (with "kdm") and I run under one of my ownmade users when I get errors mostly, but they appear all the time when I have su'ed to root in a shell too. |
These may be two different issues. I'm not familiar with kdm, but I'll assume it's similar to xdm. I use xdm, and log in as a normal user. However, I will see similar errors when I try to run an X program from a root shell. The way I deal with this is to copy the .Xauthority file from the home directory of the user who logged in to root's home directory. There are other ways to do this.
Quote: | Ahh, there it is. I got it. When I run it (without any flags or anything) I get this output.
bash-2.05a# /usr/X11R6/bin/xhost
Xlib: connection to ":0.0" refused by server |
That is probably the .Xauthority problem I mentioned earlier. The question is why /usr/X11R6/bin isn't in your PATH. Do you have a /etc/env.d/10xfree file?
Quote: | I guess running 'emerge xfree' again might be what I need to do. What settings should I look over before doing so? |
Well, it would be a real last resort for me, because my machines are, by most other posters' standards, slow outdated slugs. I would look over my CFLAGS and maybe log the output of "emerge xfree" using the tee command so that I could look over it for errors later. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
Malakin Veteran
Joined: 14 Apr 2002 Posts: 1692 Location: Victoria BC Canada
|
Posted: Sun Oct 06, 2002 8:14 pm Post subject: |
|
|
Quote: | Well, right now I've only been working on my XF86Config file, what's the differance to the -4 one? |
Gentoo sets up XF86Config by default, just use that. On most distros however XF86Config-4 is used, if both files exist XF86Config-4 is used (assuming xfree is version 4+).
You might as well try adding your hostname to your hosts file, so for example my hostname on this box is malakin02 so I add "127.0.0.1 malakin02" to my /etc/hosts file. If you're not sure what your hostname is just type "echo $HOSTNAME" |
|
Back to top |
|
|
SilverSnake n00b
Joined: 01 Oct 2002 Posts: 50 Location: Linköping, Sweden
|
Posted: Sun Oct 06, 2002 8:15 pm Post subject: |
|
|
rac wrote: | See the XF86Config man page for details - basically -4 will override the other one, because it's earlier in the search path. |
I see.. well, standing at / performing a "find | grep XF86Config-4" gave no hits, so I assume I don't even have such a file
Quote: | These may be two different issues. I'm not familiar with kdm, but I'll assume it's similar to xdm. I use xdm, and log in as a normal user. However, I will see similar errors when I try to run an X program from a root shell. The way I deal with this is to copy the .Xauthority file from the home directory of the user who logged in to root's home directory. There are other ways to do this. |
The reason I use kdm is because that's the one they suggested in the guide The .Xauthority is avilable in both my user's dir and in /root/. For my user it's a bit above 100bytes big, for root it's 0. For my user it seems to be a binary file.
Quote: | That is probably the .Xauthority problem I mentioned earlier. The question is why /usr/X11R6/bin isn't in your PATH. Do you have a /etc/env.d/10xfree file? |
Yepp, such a file is present.
Quote: | Well, it would be a real last resort for me, because my machines are, by most other posters' standards, slow outdated slugs. I would look over my CFLAGS and maybe log the output of "emerge xfree" using the tee command so that I could look over it for errors later. |
Ok, well, recompiling X isn't really scaring me _that_ much, but if I don't have to then I'll gladly pass. So let's wait with this option for a bit and see if any of your other suspicions (or someone elses) might lead to a solution. _________________ da SilverSnake is back! |
|
Back to top |
|
|
SilverSnake n00b
Joined: 01 Oct 2002 Posts: 50 Location: Linköping, Sweden
|
Posted: Sun Oct 06, 2002 8:18 pm Post subject: |
|
|
Malakin wrote: | You might as well try adding your hostname to your hosts file, so for example my hostname on this box is malakin02 so I add "127.0.0.1 malakin02" to my /etc/hosts file. If you're not sure what your hostname is just type "echo $HOSTNAME" |
I got a static IP and right now that one is linked to my hostname in my hosts file (as well as a friend's on the same LAN). I got "127.0.0.1 localhost" on one line. Feels like that should be enough, but sure, I'll throw in my hostname after 127.0.0.1 as well. You really think it'll help, or was it more of a "btw post"? _________________ da SilverSnake is back! |
|
Back to top |
|
|
Mnemia Guru
Joined: 17 May 2002 Posts: 476
|
Posted: Sun Oct 06, 2002 8:25 pm Post subject: |
|
|
There have actually been times where adding the hostname to hosts did in fact solve a problem with slow X startup for me. However, I kind of doubt that that is your main problem here because it sounds like your X and/or your path have gotten misconfigured somehow. |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Oct 06, 2002 8:31 pm Post subject: |
|
|
SilverSnake wrote: | Quote: | The question is why /usr/X11R6/bin isn't in your PATH. Do you have a /etc/env.d/10xfree file? |
Yepp, such a file is present. |
Then I wonder why you couldn't find xhost earlier. "which xhost" finds it for me, because env-update adds /usr/X11R6/bin to the default PATH thanks to the stuff it finds in that /etc/env.d file.
The hostname stuff is a good suggestion, and was the first thing I thought of too, but the fact that your screen is flickering and changing resolutions sounds like it's an XF86Config modeline or resolution problem to me. If you start over with an XF86Config generated by the xf86config interactive utility or something described in the desktop guide, or experiment with using more conservative refresh rates, resolution settings, color depths, does any of this make X start up faster? Maybe /var/log/XFree86.0.log has some clues. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
helmers Guru
Joined: 16 Sep 2002 Posts: 553 Location: Stange, Norway
|
Posted: Sun Oct 06, 2002 8:32 pm Post subject: |
|
|
What it sounds like is the delay with NVidia cards that several users have reported. However, this seems to happen in Windows as well. To see if that's your problem, switch to the "nv" driver in XF86Config. If you have the problem, please say what card, mobo and CPU you have.
--
hth
Helmers |
|
Back to top |
|
|
SilverSnake n00b
Joined: 01 Oct 2002 Posts: 50 Location: Linköping, Sweden
|
Posted: Sun Oct 06, 2002 8:59 pm Post subject: |
|
|
rac wrote: | Then I wonder why you couldn't find xhost earlier. "which xhost" finds it for me, because env-update adds /usr/X11R6/bin to the default PATH thanks to the stuff it finds in that /etc/env.d file. |
hmm....
Code: |
bash-2.05a# env-update
>>> Regenerating /etc/ld.so.cache...
bash-2.05a# which xhost
which: no xhost in (/sbin:/bin:/usr/sbin:/usr/bin)
bash-2.05a# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin
|
But in my /etc/env.d/10xfree file I got "PATH=/usr/X11R6/bin".
Quote: | The hostname stuff is a good suggestion, and was the first thing I thought of too, but the fact that your screen is flickering and changing resolutions sounds like it's an XF86Config modeline or resolution problem to me. If you start over with an XF86Config generated by the xf86config interactive utility or something described in the desktop guide, or experiment with using more conservative refresh rates, resolution settings, color depths, does any of this make X start up faster? Maybe /var/log/XFree86.0.log has some clues. |
Here comes all warning and error lines I can find in my /var/log/XFree86.0.log:
(WW) Option "XkbOptions" requires an string value
(WW) Open APM failed (/dev/apm_bios) (No such file or directory)
(WW) System lacks support for changing MTRRs
(WW) (1400x1050,Samtron 7Ei) mode clock 122MHz exceeds DDC maximum 110MHz
(EE) NVIDIA(0): Failed to load glX
I have commented out the:
Load "glx"
in my XF86Config file, as it says you should in the Desktop install guide. But I've also tried running with it non-commented, and problem persists.
I will try the idea helmers suggested with trying to run with the 'nv' driver instead and see if it's NVidia specific.
Should be back with another post within the hour at least _________________ da SilverSnake is back! |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Oct 06, 2002 9:06 pm Post subject: |
|
|
SilverSnake wrote: | But in my /etc/env.d/10xfree file I got "PATH=/usr/X11R6/bin". |
Do you also have a ROOTPATH entry? Here's my entire /etc/env.d/10xfree: Code: | PATH=/usr/X11R6/bin
ROOTPATH=/usr/X11R6/bin
LDPATH=/usr/X11R6/lib
MANPATH=/usr/X11R6/man
INFODIR=/usr/X11R6/info
XINITRC=/etc/X11/xinit/xinitrc |
_________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
SilverSnake n00b
Joined: 01 Oct 2002 Posts: 50 Location: Linköping, Sweden
|
Posted: Sun Oct 06, 2002 9:11 pm Post subject: |
|
|
rac wrote: | Do you also have a ROOTPATH entry? |
Yepp.. ->
Code: | PATH=/usr/X11R6/bin
ROOTPATH=/usr/X11R6/bin
LDPATH=/usr/X11R6/lib
MANPATH=/usr/X11R6/man
INFODIR=/usr/X11R6/info
XINITRC=/etc/X11/xinit/xinitrc
|
I tried switching to the 'nv' driver instead of 'nvidia' and X started up much faster, just as fast as I expect it to. So I guess it has to do with that I want to run with NVidia drivers, if there is no solution to that, I'll just have to live with it.
But I still got the problem with not being able to launch X application from a console and such, I think that if I could resolve that problem I could boost my performance at least some.
Edit: btw, the delay I experience is NOT something I experience when running Windows (not XP nor 2000). I would still like to be able to make it start faster. Could replacing kdm with xdm make any diff? Or is it "below" that level the problem is located? _________________ da SilverSnake is back! |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Oct 06, 2002 9:54 pm Post subject: |
|
|
SilverSnake wrote: | But I still got the problem with not being able to launch X application from a console and such, I think that if I could resolve that problem I could boost my performance at least some. |
The .Xauthority thing is not going to go away. Sorry to keep harping on the fact that you can't find xhost, but I wonder if it's related to kdm, profile, and my bash prompt.. Read all the way down to where kanuslupus finds something from the KDE FAQ. Now I don't use KDE, and so I have no idea how it's supposed to work in Gentoo, but does adding ". /etc/profile" to your user's .xsession file improve matters at all? I can see how not having /usr/X11R6/bin in your PATH could cause several problems.
Quote: | Could replacing kdm with xdm make any diff? Or is it "below" that level the problem is located? |
I doubt it - I think it's below that level. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
SilverSnake n00b
Joined: 01 Oct 2002 Posts: 50 Location: Linköping, Sweden
|
Posted: Sun Oct 06, 2002 10:56 pm Post subject: |
|
|
rac wrote: | The .Xauthority thing is not going to go away. Sorry to keep harping on the fact that you can't find xhost, but I wonder if it's related to kdm, profile, and my bash prompt.. Read all the way down to where kanuslupus finds something from the KDE FAQ. Now I don't use KDE, and so I have no idea how it's supposed to work in Gentoo, but does adding ". /etc/profile" to your user's .xsession file improve matters at all? I can see how not having /usr/X11R6/bin in your PATH could cause several problems.I doubt it - I think it's below that level. |
Hmm... first out, there is no .xsession or .Xauthority or Xsession files in my user's home dir. Only one I find is .xsession-error which is empty. Same goes for the /root/ dir.
This smells fishy... Are we maybe getting to where the problem lies?
And I think we should solve this problem, because that prolly helps me get stuff working again _________________ da SilverSnake is back! |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Oct 06, 2002 11:05 pm Post subject: |
|
|
SilverSnake wrote: | there is no .xsession or .Xauthority or Xsession files in my user's home dir. |
I think somebody that actually has ever used KDE is going to have to bail me out here. It sure sounds like /etc/profile is not getting loaded in your X terminals, but I don't know the right way to do it with kdm/KDE. If you stop kdm, and log in at a console, make a trivial .xinitrc file that just has "kde" in it and then start X with "startx", do things work then? _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Sun Oct 06, 2002 11:08 pm Post subject: |
|
|
Not having used KDE, I think I've read that 'startkde' is used instead of startx. I could be on crack though. _________________ Quis separabit? Quo animo?
Last edited by pjp on Sun Oct 06, 2002 11:09 pm; edited 1 time in total |
|
Back to top |
|
|
SilverSnake n00b
Joined: 01 Oct 2002 Posts: 50 Location: Linköping, Sweden
|
Posted: Sun Oct 06, 2002 11:09 pm Post subject: |
|
|
rac wrote: | I think somebody that actually has ever used KDE is going to have to bail me out here. It sure sounds like /etc/profile is not getting loaded in your X terminals, but I don't know the right way to do it with kdm/KDE. If you stop kdm, and log in at a console, make a trivial .xinitrc file that just has "kde" in it and then start X with "startx", do things work then? |
Well, I don't run KDE most of the time (I got it emerged though). I run kdm, Gnome 2.0.2 and SawFish 2.0. Is there something I could hack my /etc/profile with to see if it's loaded? For example "echo "it's loaded" >> /home/user/test.log" or something? Rebooting is not a problem
[edit]
I should have read your post more carefully. Right now nothing that has with X to do is loaded on boot, instead I just launch "kdm" after logging in as root and there I select Gnome, but could select KDE if I wanted to. I guess I could test the .xinitrc thing to see if that solves anything.
[/edit] _________________ da SilverSnake is back! |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Oct 06, 2002 11:12 pm Post subject: |
|
|
SilverSnake wrote: | I run kdm, Gnome 2.0.2 and SawFish 2.0. |
Any chance you could try switching to xdm or startx or something non-kdm for a while?
Quote: | Is there something I could hack my /etc/profile with to see if it's loaded? For example "echo "it's loaded" >> /home/user/test.log" or something? |
I guess you could do this if you want to. To me, the fact that /usr/X11R6/bin is not in your PATH is pretty convincing evidence that it's not being sourced. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
SilverSnake n00b
Joined: 01 Oct 2002 Posts: 50 Location: Linköping, Sweden
|
Posted: Sun Oct 06, 2002 11:18 pm Post subject: |
|
|
rac wrote: | Any chance you could try switching to xdm or startx or something non-kdm for a while? |
Sure. Only reason I run kdm at all is because that's the only way I know of to launch Gnome with.
Well, I found out that I got xdm available and there's some nice files in my /etc/X11/xdm/ dir, like Xaccess and Xsession.
I'll reboot now (only way I know of to kill kdm ) and will be back with a statusreport in a couple of min! _________________ da SilverSnake is back! |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Oct 06, 2002 11:20 pm Post subject: |
|
|
SilverSnake wrote: | Sure. Only reason I run kdm at all is because that's the only way I know of to launch Gnome with. |
You should be able to simply set DISPLAYMANAGER=xdm and XSESSION=Gnome in /etc/rc.conf and xdm should launch GNOME for you. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
|