Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X speed problem
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
bukharin
n00b
n00b


Joined: 02 May 2004
Posts: 11
Location: Canberra, Australia

PostPosted: Sun May 02, 2004 9:30 am    Post subject: X speed problem Reply with quote

Hi everyone,

I'm a newbie to Gentoo but have been using linux on the desktop for a few years. I've just switched from Mandrake 9.0 because I wanted smoother updates, and felt like a change in general. So far, I'm very impressed with Gentoo!

Unfortunately, X in Gentoo is a lot slower than in Mandrake. For example, fast scrolling using pageup/pagedown in Mozilla is a lot less smooth; and when minimising/maximising a window, it's relatively easy to see the separate window components being drawn, whereas in Mandrake it's not. I can't really understand why this would be, but it's really annoying!

What I've tried so far:
- checked that DMA is enabled for my hard disks, and benchmarked them with hdparm -tT - same results as in Mandrake. Actually I initially stuffed this up, and got a major performance boost when fixed
- emerged nvidia-kernel and nvidia-glx (version 1.0.4496)
- checked that DRI is working - it is (glxgears gives framerates over 3000) - so presumably the nvidia kernel module is working properly
- checked that AGP is working - I'm using AGPGART at 4x, same as in Mandrake
- tried using my Mandrake XF86Config - no improvement (though I had to comment out 'FontPath "unix/:-1"' for that config file to work in Gentoo)
- made sure there are no processes running in the bg that are consuming resources

I'm kind of stuck now. I don't know exactly where to look next for potential problems. A couple of ideas that I have are
(1) is it a kernel misconfiguration? I'd appreciate any suggestions as to anything I need to look out for in my kernel config
(2) is it something to do with Gentoo using antialiased fonts, compared with Mandrake's non-antialiased ones? (old version of Mandrake, remember!). Have others noticed much of a performance hit when switching from non-antialiased to anti-aliased fonts?
(3) is it in fact a system-wide problem (like the DMA problem was), which is simply more noticeable in X? If that's the case, where (apart from DMA) should I be looking?

Any other ideas? Are there any objective benchmarks for X (or the overall system) that I could try, to help isolate the problem?

I'm happy to post my XFree86.0.log, XF86Config, kernel config or whatever people may think is relevant.

As you can imagine, this is quite frustrating. At the moment I'm dual-booting with Mandrake, because I really don't want to take an obvious performance hit; but I'd really like to change over completely to Gentoo.

Thanks for any help that people can offer,
bukharin
Back to top
View user's profile Send private message
Little Nemo
l33t
l33t


Joined: 29 Mar 2004
Posts: 623
Location: Berlin, Germany

PostPosted: Sun May 02, 2004 11:23 am    Post subject: Reply with quote

I suspect it has something to do with font handling, too. I understand you're not using a font server (xfs?) with Gentoo, but you do with Mandraka?

I have FontPath
Code:
"unix/:7100"
in my configuration, and
Code:
XFS_PORT="7100"
in /etc/conf.d/xfs. It's also possible that you have some fonts in your path which take a long time to scan. Try changing the order of entries. Usually it's a good idea to have a the fontserver as a first entry and the other entries as a safety net in case the server should fail.
Back to top
View user's profile Send private message
bukharin
n00b
n00b


Joined: 02 May 2004
Posts: 11
Location: Canberra, Australia

PostPosted: Sun May 02, 2004 12:22 pm    Post subject: Reply with quote

Thanks Nemo.

I didn't actually realise that my Gentoo install had xfs until I read your post! I've just tried using xfs instead of the hardcoded font locations in XF86Config, and it made no difference. I also tried commenting out every font location that I could - again, no difference. Finally, I tried xfs using both -1 and 7100 as its listening ports - again, no difference... :?

So it looks as though that's not the problem.

Seeing as X needs to talk to apps via TCP, I also checked that support for Unix domain sockets was enabled in my kernel (it is), and that my routing table and /etc/hosts file were correctly set up for localhost. I'm pretty sure they are; these are the relevant sections:

/etc/hosts:
Code:
127.0.0.1       localhost

routing table:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo
0.0.0.0         192.168.0.1     0.0.0.0         UG    1      0        0 eth0


The other trick that Mandrake does is to run X at a -10 nice level; I've tried to renice X on Gentoo to cheat in the same way - and once more, there's no difference!!

The way it's running reminds me of a slow VNC connection. You know what I mean? For example, when a dialog box is closed, you can see the underlying window redraw the section that was hidden by the dialog box, block by block. My X is of course much faster than a bad VNC connection, but it's still relatively easy to see the screen being redrawn, which is definitely not quite right.

Hmmm.....
Back to top
View user's profile Send private message
nempo
Guru
Guru


Joined: 16 Apr 2002
Posts: 360
Location: Linkoping, Sweden

PostPosted: Sun May 02, 2004 1:04 pm    Post subject: Reply with quote

Try using the mozilla-bin ebuild instead of the 'standard' ebuild, ie. 'emerge mozilla-bin' instead of 'emerge mozilla'.

The self-compiled version has been known to come with a few slowdowns due to some special cflags.
_________________
homeobocks wrote:
superjaded wrote:

would Big Brother become a reality?

Yeah . . . it would be just like the tv show. Except somebody would be watching.
Back to top
View user's profile Send private message
Little Nemo
l33t
l33t


Joined: 29 Mar 2004
Posts: 623
Location: Berlin, Germany

PostPosted: Sun May 02, 2004 1:06 pm    Post subject: Reply with quote

bukharin wrote:
The way it's running reminds me of a slow VNC connection. You know what I mean? For example, when a dialog box is closed, you can see the underlying window redraw the section that was hidden by the dialog box, block by block. My X is of course much faster than a bad VNC connection, but it's still relatively easy to see the screen being redrawn, which is definitely not quite right.


Definitely not. The only thing I can assure you is that it's not Gentoo - I've never seen this kind of problem (and I have a far less impressive glxgears score than you do). Sorry, I have no other ideas.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54308
Location: 56N 3W

PostPosted: Sun May 02, 2004 1:12 pm    Post subject: Reply with quote

bukharin,

Some distros run X with a nice of -10, RedHat was one.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bukharin
n00b
n00b


Joined: 02 May 2004
Posts: 11
Location: Canberra, Australia

PostPosted: Sun May 02, 2004 1:22 pm    Post subject: Reply with quote

nempo - your post reminded me that in Mandrake, I was using the precompiled 1.6 binary from mozilla.org. Tried installing that same binary in Gentoo - same problem.

Anyway, I'm pretty sure it's not just a Mozilla problem - it's just that Mozilla is a little slower than my other apps, so it's easier to notice the problem with Mozilla. Another app that displays the slowness is kmail - I have over a thousand messages in my main inbox, and scrolling through them is noticeably slower in Gentoo than Mandrake. And it's not just fonts; eg juk displays a popup message over kicker at each track change, and when that popup message disappears, the rest of kicker reappears in sections rather than being instantly replaced (I only notice this when I click on the message to make it disappear, so that I can access kmix).

The reappearing in sections, in particular, is what made me think of VNC and slow network connections. But I can't see any reason that this should apply to my system. I've tried "ifconfig down eth0" to make sure that packets weren't going further than this computer, to no avail.

I'm quite sure you're right, Nemo, that it's not a Gentoo problem. I rather suspect that something's not quite configured correctly. I wouldn't be surprised to find a kernel misconfiguration (a la DMA), since that's what I'm probably least expert at - OTOH I can't think of anything I've missed.

I guess what I really need is some kind of X benchmarking tool - and probably a general system benchmarking tool/tools as well - to actually isolate where the problem lies. Any suggestions, people? Because really, anything that slows down the system as a whole could cause this kind of problem... :(
Back to top
View user's profile Send private message
- NEO -
n00b
n00b


Joined: 16 Aug 2003
Posts: 32
Location: Denmark

PostPosted: Fri Jun 04, 2004 9:45 pm    Post subject: Reply with quote

After a total reinstall of Gentoo from scratch I see exact the same problem here.

My kernel config is exact the same as before the problem occured.

Though my nvidia card is changed from DDR to FX5200.

I'm using the latest nvidia--kernel 5336-r3.
_________________
/Neo
...because I believe in something...
Back to top
View user's profile Send private message
gatiba
Guru
Guru


Joined: 01 Sep 2002
Posts: 434

PostPosted: Fri Jun 04, 2004 10:14 pm    Post subject: Reply with quote

I noticed the same graphics slowdown on gentoo...

For example: if i resize right and left with the mouse the mozilla's sidebar, i can notice it redraw slower than Suse or Mandrake...

Sorry for my english...
Back to top
View user's profile Send private message
bukharin
n00b
n00b


Joined: 02 May 2004
Posts: 11
Location: Canberra, Australia

PostPosted: Fri Jun 04, 2004 11:15 pm    Post subject: Reply with quote

Thanks for your comments, NEO and gatiba. Over the weekend I also did a stage 1 reinstall of gentoo and still have exactly the same problem.

I tried booting into Mandrake using my gentoo kernel, and it was fast. So I'm pretty sure it's not the kernel.

NEO - were you using gentoo before, but after reinstalling it's slower? That's very strange isn't it? Either the newer packages are slower in some way, or do you think it could be something to do with our USE flags? I was thinking of recompiling X, and/or KDE, with much tighter USE flags...

I'm using basically the latest version of every package (obviously), and this is my make.conf:

Code:

phil phil/ $ cat /etc/make.conf
# These settings were set by the catalyst build script that automatically built this stage
CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
USE="mmx 3dnow qt kde dvd dvdr alsa cdr ssl acpi aim arts avi crypt cups curl divx4linux doc encode flac foomaticdb gif gnome gphoto2 gtk gtk2 gtkhtml icq imap imagemagick imlib jabber java jpeg ladcca mad maildir mbox mozilla mpeg msn mysql nas nls offensive oggvorbis opengl oscar oss pam pda ppds pdflib perl png postgres python quicktime readline samba scanner sdl speex spell sse sqlite svg svga tcltk tcpd theora tiff truetype unicode usb videos wmf X xosd xml xml2 xmms xv xvid yahoo zlib"
CXXFLAGS="${CFLAGS}"
#SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
GENTOO_MIRRORS="http://mirror.pacific.net.au/linux/Gentoo/ http://planetmirror.com/pub/gentoo/ ftp://planetmirror.com/pub/gentoo/ rsync://planetmirror.com/gentoo/"
ALSA_CARDS="emu10k1"


As a side note, the system also developed a very weird bug on reinstallation. The /etc/profile script won't give me a proper bash prompt because the following line returns FALSE:

Code:

       if [ "$TERM" != 'dumb'  ] && [ -n "$BASH" ]


I had to hack that line to become:
Code:

if [ -n "$BASH"  ]


Pretty weird eh? Especially since "echo $TERM" yields "xterm"...
Back to top
View user's profile Send private message
headache
Apprentice
Apprentice


Joined: 26 May 2004
Posts: 226

PostPosted: Sat Jun 05, 2004 3:03 am    Post subject: Reply with quote

Try to aff the correct hostname and ip address to your /etc/host file.

I see that you only have:
Code:

127.0.0.1 localhost


This make any operation do a dns lookup which can take considerable amount of time.
_________________
"I'd rather have a President who does it to a woman than one who does it to his country" -- Shirley Maclaine
Liberal (adj.): Free from bigotry; open to progress; tolerant of others.
Back to top
View user's profile Send private message
- NEO -
n00b
n00b


Joined: 16 Aug 2003
Posts: 32
Location: Denmark

PostPosted: Sat Jun 05, 2004 9:59 pm    Post subject: Reply with quote

bukharin wrote:
NEO - were you using gentoo before, but after reinstalling it's slower? That's very strange isn't it?

Either the newer packages are slower in some way, or do you think it could be something to do with our USE flags? I was thinking of recompiling X, and/or KDE, with much tighter USE flags...


3 months ago i dropped the world of (Gentoo) Linux for Xp. What a stupid idea it was!

The only configurationdata from the old Gentoo days was my kernel config (for 2.6.1 gentoo-dev-sources)
So I've a different setup now.

I know that glxgears (tool for the nVidia-driver) is not a benchmark tool but it gives me only around 1200-1300.

My use-flags:
Code:
USE="-alsa cdr dvd gnome gtk -ldap -mbox X"


My Cflags:
Code:
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"


headache:
I've already included my hostname in /etc/host.
_________________
/Neo
...because I believe in something...
Back to top
View user's profile Send private message
bukharin
n00b
n00b


Joined: 02 May 2004
Posts: 11
Location: Canberra, Australia

PostPosted: Sun Jun 06, 2004 5:06 am    Post subject: Reply with quote

headache: unfortunately, I don't think it's as simple as that, because (1) I think my /etc/hosts is correct, (2) I copied /etc/hosts from the Mandrake installation, which works fine, and (3) it's slow even if I disable the network... :?

Code:

$ cat /etc/hosts
127.0.0.1       localhost.localdomain   localhost
192.168.0.2     phil.bukharin.net phil
<snip other, irrelevant entries>
$ cat /etc/hostname
phil
$ cat /etc/dnsdomainname
bukharin.net
Back to top
View user's profile Send private message
bukharin
n00b
n00b


Joined: 02 May 2004
Posts: 11
Location: Canberra, Australia

PostPosted: Thu Jun 10, 2004 10:26 am    Post subject: Reply with quote

gatiba: are you also using an nvidia card?
Back to top
View user's profile Send private message
gatiba
Guru
Guru


Joined: 01 Sep 2002
Posts: 434

PostPosted: Sun Jul 04, 2004 8:19 pm    Post subject: Reply with quote

bukharin wrote:
gatiba: are you also using an nvidia card?


Yes!
GeForce 4 Ti 4200
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum