PDA

View Full Version : Very poor Performance


walkingshadow
02-15-06, 07:16 AM
Hi!
I'm experiencing very poor graphics performance. glxgears reports framerates of 60-75fps.
I'm under FreeBSD 6.1-PRERELEASE and use the latest 1.0.8178 nvidia driver.
My system specs are as follows:
graphics card: nvidia 5200 FX
processor: 3GHz pentium 4
RAM: 512MB DDR DRAM

glxinfo reports nvidia corporation as vendor string so the driver should be recognized. I tried switching off twin view and the X composite extension but that didn't improve on the performance.

You can find my configuration files here:
http://webplaza.pt.lu/mpjjjjsj/files/xorg.conf
http://webplaza.pt.lu/mpjjjjsj/files/.nvidia-settings-rc

zander
02-15-06, 08:21 AM
Judging from your `nvidia-settings` configuration file, you've requested that OpenGL applications sync to the vertical refresh, which limits the number of frames rendered per second to the refresh rate.

walkingshadow
02-15-06, 09:07 AM
Thanks a lot, that helped!
I now get about 345 fps

costra
02-16-06, 11:49 AM
This is still very low, you should get more than 1000fps in glxgears. You should check out these:
dmesg - for NVIDIA kernel module presence
/var/log/Xorg.0.log for GLX module problems.

It might be good to provide this info to us to better identify your problem.

walkingshadow
02-16-06, 02:20 PM
That's what I also thought. I installed the flight simulator FlightGear and it's not playable at all, the framerate drops below 1 fps.

the nvidia kernel module seems to load fine.
dmesg says:
nvidia0: <GeForce FX 5200> mem 0xfd000000-0xfdffffff,0xe8000000-0xefffffff irq 16 at device 0.0 on pci1
nvidia0: [GIANT-LOCKED]

and kldstat says:
5 1 0xc07c5000 42b314 nvidia.ko

I couldn't see anything special in Xorg.0.log, it says the glx module gets loaded without reporting any error. You can find it here:
http://webplaza.pt.lu/mpjjjjsj/files/Xorg.0.log

Harvey Pooka
02-16-06, 07:18 PM
Which AGP are you trying to use? The FreeBSD AGP or Nvidia? xorg.conf is setup to use FreeBSD's AGP. Is it loaded?

walkingshadow
02-17-06, 05:47 AM
I compiled agp statically into the kernel

dmesg says:
agp0: <Intel 82865 host to AGP bridge> mem 0xf8000000-0xfbffffff at device 0.0 on pci0
(...)
NVRM: detected agp.ko, aborting NVIDIA AGP setup!

kldstat -v says:
173 pci/agp_ali
174 pci/agp_amd
175 pci/agp_amd64
176 pci/agp_ati
177 pci/agp_i810
178 pci/agp_intel
179 pci/agp_nvidia
180 pci/agp_sis
181 pci/agp_via

I tried to load the nvidia agp module but didn't succeed. I tried to disable freebsd agp in device.hints, set agp_load="yes" in loader.conf and set NvAGP to 1 in xorg.conf but it always said "detected agp.ko, aborting NVIDIA AGP setup!"
Anyway, my chipset is not listed as supported by the nvidia agp in the documentation.
When I compiled the driver I told it to use the FreeBSD AGP GART driver.

You can find the output of dmesg and kldstat -v here:
http://webplaza.pt.lu/mpjjjjsj/files/dmesg.txt
http://webplaza.pt.lu/mpjjjjsj/files/kldstat.txt

Thanks for your interest in my problem!

Harvey Pooka
02-17-06, 01:28 PM
Did you build the Nvidia driver with WITH_FREEBSD_AGP=yes? Without it I do not believe the driver will fully (or at all) use the FreeBSD AGP driver.

walkingshadow
02-17-06, 03:43 PM
Yes, I did. That was what I meant when I said
"When I compiled the driver I told it to use the FreeBSD AGP GART driver."

walkingshadow
02-17-06, 08:01 PM
Here is the output of sysctl hw.nvidia:
hw.nvidia.agp.card.rates: 8x 4x
hw.nvidia.agp.card.fw: supported
hw.nvidia.agp.card.sba: supported
hw.nvidia.agp.card.registers: 0x1f000e1b:0x1f004302
hw.nvidia.agp.status.status: enabled
hw.nvidia.agp.status.driver: freebsd (agp.ko)
hw.nvidia.agp.status.rate: 8x
hw.nvidia.agp.status.fw: disabled
hw.nvidia.agp.status.sba: enabled
hw.nvidia.version: NVIDIA FreeBSD x86 NVIDIA Kernel Module 1.0-8178 Wed Dec 14 17:04:30 PST 2005
hw.nvidia.registry.EnableVia4x: 0
hw.nvidia.registry.EnableALiAGP: 0
hw.nvidia.registry.NvAGP: 3
hw.nvidia.registry.EnableAGPSBA: 0
hw.nvidia.registry.EnableAGPFW: 0
hw.nvidia.registry.SoftEDIDs: 1
hw.nvidia.registry.Mobile: 4294967295
hw.nvidia.registry.ResmanDebugLevel: 4294967295
hw.nvidia.registry.FlatPanelMode: 0
hw.nvidia.registry.DevicesConnected: 0
hw.nvidia.registry.VideoEnhancement: 0
hw.nvidia.registry.RmLogonRC: 1
hw.nvidia.registry.DetectPrimaryVga: 0
hw.nvidia.cards.0.model: GeForce FX 5200
hw.nvidia.cards.0.irq: 16
hw.nvidia.cards.0.vbios: 04.34.20.23.00
hw.nvidia.cards.0.type: AGP

nvidia agp gets loaded and uses FreeBSD agp. glxgears still performs at around 300 fps. I really don't know anymore what more I should check. In flight gear I get a framerate of 20fps max. when the plane stands still whereas on the same machine under windows 98 (which is aged and slow and not designed for 3D gaming) I get around 50fps.

Harvey Pooka
02-17-06, 09:09 PM
I am at a loss. Here are a few more ideas to examine:

Check which libGL you are actually using with ldd.
Check for interrupt storms with vmstat -i
Disable SBA (I doubt this would cause it
Compile without VM86_INT10CALL. I am guessing that is why Xorg.log is loading the int10 module?
Maybe TwinView is slowing you down? I do not have it enabled, so I do not know.

walkingshadow
02-18-06, 05:48 AM
I think I solved it.
I just disabled anti-aliasing in nvidia-settings and now I get a framerate of 800-1000 fps :)
This is not "more than 1000fps" like costra wrote but it's already not bad.
Thanks for all your help, you were great!
P.S. I actually compiled without VM86_INT10CALL so I don't know why X is loading the int10 module.

zander
02-18-06, 09:27 AM
@walkingshadow: the int10 code in the NVIDIA kernel module and the X server's int10 module are parts of different mechanisms; loading of the X server's module can be controlled via X configuration file options.