I was scratching my head trying to enable side-banding and fast writes when I was compiling the Nvidia kernel module. I finally came across some interesting stuff in os-registry.c.
Take note that you may or may not see a speed increase when doing this so you might need to save the existing NVdriver kernel module found in /lib/modules/kernel version/kernel/drivers/video/.
If you have sidebanding and fast writes enabled, then you obviously don't to read any further :)
shell $ cat /proc/nv/card0
----- Driver Info -----
NVRM Version: NVIDIA NVdriver Kernel Module 1.0.2314 Fri Nov 30 19:33:20 PST 2001
Compiled with: gcc version 2.95.3 20010315 (release)
------ Card Info ------
Model: GeForce2 GTS/GeForce2 Pro
IRQ: 10
Video BIOS: 03.15.00.11
------ AGP Info -------
AGP status: Enabled
AGP Driver: AGPGART
Bridge: Via Apollo Pro KT133
SBA: Supported [enabled]
FW: Supported [enabled]
Rates: 4x 2x 1x [4x]
Registers: 0x1f000217:0x00000314
The SBA and FW lines are the ones to look at. does it say enabled or disabled? If they [either one or both] say disabled, keep reading. Here is how to enable both sidebanding and fast-writes.
I'm assuming that you are using the tarballs (.tar.gz) and not rpms!
Change into your NVIdia_kernel-version directory: cd NVIdia_kernel-1.0-2314/
look for os-registry.c Back up the origional first!
cp os-registry.c os-registry.c.bak
Now, open os-registry.c with your favorite text editor, whether its vi, pico, etc.
I pasted in the revelent information:
/* enable/disable Side Band Addressing
* NVreq_EnableAGPSBA = 0 (disable)
*/
/* enable/disable Fast Writes
* NVreg_EnableAGPFW = 0 (disable)
*/
U032 NVreg_EnableAGPFW = 1;
MODULE_PARM(NVreg_EnableAGPFW, "i");
the comments are between the /* */ areas and may span several lines. You will be changing the lines beginning with U032.
Old: U032 NVreg_EnableAGPFW= 0
New: U032 NVreg_EnableAGPFW= 1
For VIA chipset users, there is a line above these 2 lines that allows you to run at AGP 4X in case you're not.
Change U032 NVreg_EnableVia4x = 0 to 1.
Save your file and exit your editor.
Then run make. You may have to explicitly tell it your path to the current running kernel's include directory in case you have multiple kernel sources laying around.
make install SYSINCLUDE=/path/to/current kernel/include.
If you run into stability problems, you might want to tone down these settings but so far, my system is about as stable as it normally is in X11 mode. OpenGL apps seem to run faster on my system than before.
Output from GLX gears:
7970 frames in 5.0 seconds = 1594.000 FPS
9465 frames in 5.0 seconds = 1893.000 FPS
9478 frames in 5.0 seconds = 1895.600 FPS
9450 frames in 5.0 seconds = 1890.000 FPS
9478 frames in 5.0 seconds = 1895.600 FPS
9465 frames in 5.0 seconds = 1893.000 FPS
9462 frames in 5.0 seconds = 1892.400 FPS
9419 frames in 5.0 seconds = 1883.800 FPS
My sys is a 1 Ghz Athlon. YMMV.
Any questions? :)
bwkaz
12-19-2001, 07:04 PM
What if fast writes say "unsupported" (sidebanding is supported)? Will enabling fast writes work?
Both are disabled now, so I'll try sidebanding at least.
GF2 GTS, 32MB, kernel 2.4.16 (soon to be 2.4.17-rc2, assuming Richard Gooch fixed devfs so the cdrom driver works with it now :rolleyes: ), Intel 815 motherboard, P3-800.
r0nster
12-19-2001, 10:29 PM
Originally posted by bwkaz:
<STRONG>What if fast writes say "unsupported" (sidebanding is supported)? Will enabling fast writes work?
Both are disabled now, so I'll try sidebanding at least.
GF2 GTS, 32MB, kernel 2.4.16 (soon to be 2.4.17-rc2, assuming Richard Gooch fixed devfs so the cdrom driver works with it now :rolleyes: ), Intel 815 motherboard, P3-800.</STRONG>
Edit the os-registry.c file if you haven't already done so and change the values from 0 to 1 per my how-to above. You may have to rmmod the "old" driver, do the make and modprobe the "tweaked" driver. The i815 chipset should support your card to its fullest. Both tweaks should work for you.
anton
12-19-2001, 10:46 PM
sorry , I'm not really into this video stuff ... what improvements can I get ? :)
r0nster
12-19-2001, 10:56 PM
Originally posted by anton:
<STRONG>sorry , I'm not really into this video stuff ... what improvements can I get ? :)</STRONG>
This is mainly just to squeeze some extra fps out of GL games like Quake III, RTCW, Rune, etc. That, and make GL screensavers run faster. I thought it was rather interesting to post so I did :)
bwkaz
12-19-2001, 10:58 PM
Originally posted by r0nster:
<STRONG>Edit the os-registry.c file if you haven't already done so and change the values from 0 to 1 per my how-to above. You may have to rmmod the "old" driver, do the make and modprobe the "tweaked" driver. The i815 chipset should support your card to its fullest. Both tweaks should work for you.</STRONG>
Did it. The only one that comes back enabled is sidebanding. Fast writes are still disabled, and supposedly unsupported. Maybe I should hack on the code that checks these values? Do you know where it is?
Do you know of any dependencies, like stuff that needs to be in the kernel? This is a custom kernel, so that might have something to do with it.
I am using agpgart.o, also, does that have anything to do with it?
Thank you so much, I really want fast writes.
kuber
12-20-2001, 11:25 AM
Nice.
That is pretty cool!
Thanks!
r0nster
12-20-2001, 06:18 PM
Originally posted by bwkaz:
<STRONG>Did it. The only one that comes back enabled is sidebanding. Fast writes are still disabled, and supposedly unsupported. Maybe I should hack on the code that checks these values? Do you know where it is?
Do you know of any dependencies, like stuff that needs to be in the kernel? This is a custom kernel, so that might have something to do with it.
I am using agpgart.o, also, does that have anything to do with it?
Thank you so much, I really want fast writes.</STRONG>
I'm also running a customized kernel and I haven't done anything special except tell it to compile in VIA chipset support since I use the VIA KT133 chipset. I figured that your chipset should be well supported in Linux. Sidebanding by itself should get your speed up. Is there a setting in your computer's BIOS that lets you enable sidebanding / fast writes? Check that and be sure that you have support enabled in your computer's BIOS for both.
Linux largely ignores the BIOS but with video cards, you just can't tell.
bwkaz
12-20-2001, 07:23 PM
Originally posted by r0nster:
<STRONG>I figured that your chipset should be well supported in Linux.</STRONG>
It is. There's specific i815 support in the kernel AGPGART setup stuff. Plus, though, there's a choice for the 810 integrated video, maybe that has something to do with it? Dunno, I'll try it and see.
<STRONG>Is there a setting in your computer's BIOS that lets you enable sidebanding / fast writes? Check that and be sure that you have support enabled in your computer's BIOS for both.</STRONG>
:rolleyes: Dell POSes :rolleyes:
There should be, there is in the standard 815, but Dell "patched" (read: neutered) the BIOS so it doesn't let me see any of that. I can't flash a standard Intel BIOS into it either, because they ALSO patched the revision string, and Intel's flash program no likey the different ID string.
:rolleyes: Stupid Dell, morons don't realize that people might want to optimize things -- it's not like there are risks in enabling fast writes :rolleyes:
<STRONG>Linux largely ignores the BIOS but with video cards, you just can't tell.</STRONG>
Right. Actually, I did look a little at nv.c, in the place where it responds to a "cat /proc/nv/cardX", and all it's doing is reading the PCI status and control words. If a certain bit is set in the control word, then that feature (SBA or FW) is supported, and if it's set in the status word, it's enabled. Obviously the problem is that the FW bit in the control word is clear.... now just how to set it...
<pokes around in the Linux PCI programs...>
Again, thanks.
r0nster
12-20-2001, 10:36 PM
No problem :)
Sorry to hear that Dell is "protecting" you from tweaking your system to the max. They make great PC's for the average joe and the up and coming power user, but for extreme power users and tweakers, they leave a bit to be desired. I happen to have an ABIT board (known for its extreme performance but not necessarily stability) and the option to enable support for AGP 4x, and fast writes is under "advanced chipset features menu".
Too bad Dell neutered your bios :(
I feel for you, man.
I don't know if the pciutils program will help you or not but give it a look over.
nathaniel
12-21-2001, 02:19 PM
Originally posted by bwkaz:
<STRONG>Right. Actually, I did look a little at nv.c, in the place where it responds to a "cat /proc/nv/cardX", and all it's doing is reading the PCI status and control words. If a certain bit is set in the control word, then that feature (SBA or FW) is supported, and if it's set in the status word, it's enabled. Obviously the problem is that the FW bit in the control word is clear.... now just how to set it...
<pokes around in the Linux PCI programs...>
Again, thanks.</STRONG>
check your bios it might need to be enabled in there first.
r0nster
12-21-2001, 10:28 PM
Originally posted by nathaniel:
<STRONG>check your bios it might need to be enabled in there first.</STRONG>
His BIOS, a Dell BIOS won't let him either view or change the "fast writes" entry. Normal (recent) BIOS's have this feature but apparently Dell in their infinite wisdom decided decided that would probably confuse people so they hid it from prying eyes. I dunno :)
thor4linux
12-29-2001, 12:53 PM
On a side note, could you contact Dell and tell them that you want to change your bios and that you need them to provide a way to get a standard bios on your board. they might tell "tough", but they might give you what you need.
B
bwkaz
01-03-2002, 01:48 PM
Originally posted by thor4linux:
<STRONG>On a side note, could you contact Dell and tell them that you want to change your bios and that you need them to provide a way to get a standard bios on your board. they might tell "tough", but they might give you what you need.
B</STRONG>
Tried it. No luck. They basically said "if you can find a standard BIOS that will flash into the chip, you're welcome to try it, but DON'T expect any kind of support later."
I figured I'd just not tell them I had a different BIOS if something else went wrong, but nothing would flash into the chip. When they patched the BIOS, they also changed the ID number, so the Intel BIOSes choke on it, saying something about the motherbard being unrecognized or something (never mind that their drivers work fine for Win98... :rolleyes: ).
I do wish they wouldn't do stupid things like that though.
r0nster
01-03-2002, 06:16 PM
~punish Dell for making their BIOS's proprietary!
The only other options would be to swap in another BIOS chip from an i815 mobo. That probably won't work but who knows. Since your Dell uses an Intel mobo, maybe that can be plausable.
Option 2: Buy an i815 mobo (preferebly the i815EP) and swap that into your Dell box. I'm sure glad I went the DIY route. Pogo Linux makes excellent Linux based boxes as well.
~punish Dell again for not allowing "fast writes" AGP option.
bwkaz
01-04-2002, 01:44 PM
I can't swap the BIOS chip either. Morons soldered it onto the motherboard... :rolleyes: ... though that may have been Intel's stupidity, I'm not sure.
I wish I would have gone DIY. I've been kicking myself for the past year or so for not doing that. Oh well, nothing I can do about it now.
If I bought another motherboard I'd need a new power supply too. Then I might as well get another case, and then it just becomes pointless to even go with Intel, just grab an AMD 1800 or something. Unless I could find a microATX 815 board.
~lart Dell for using mATX and non-standard power supply connectors.
r0nster
01-05-2002, 03:48 PM
Originally posted by bwkaz:
I can't swap the BIOS chip either. Morons soldered it onto the motherboard... :rolleyes: ... though that may have been Intel's stupidity, I'm not sure.
Boy that sucks! What would happen if by rare chance the BIOS ever were to get corrupted? Replace the entire motherboard? That was Dell's stupidity, not Intel's.
I wish I would have gone DIY. I've been kicking myself for the past year or so for not doing that. Oh well, nothing I can do about it now.
If I bought another motherboard I'd need a new power supply too. Then I might as well get another case, and then it just becomes pointless to even go with Intel, just grab an AMD 1800 or something. Unless I could find a microATX 815 board. Intel makes mATX boards that should fit your machine. You will need a standard ATX power supply but that's only $30 to $50. If that doesn't bolt into your Dell box, shoot them :mad:.
~lart Dell for using mATX and non-standard power supply connectors.[/QB]
Again and again!
I think I'll start a rant about proprietary computers in the rants section. Watch for it!
Gaccm
01-17-2002, 12:57 AM
i just can't get it to work. I've tried changing the Via4x option, the SBa option and the FA option, NONE of them work.
------ Card Info ------
Model: GeForce2 GTS/GeForce2 Pro
IRQ: 11
Video BIOS: 03.15.00.12
------ AGP Info -------
AGP status: Disabled
AGP Driver:
Bridge: Generic Via
SBA: Supported [disabled]
FW: Supported [disabled]
Rates: 4x 2x 1x [-]
Registers: 0x1f000217:0x00000000
I have a G2 Pro, so i don't see why it will work. My BIOS has everything enabled. I've tried rm -f the original NVdriver, install the new one, tried rebooting inbetween. I can't get it to ever enable.
Can i get a little help here?
bwkaz
01-17-2002, 08:53 AM
What is /usr/src/linux pointing to? I've had problems if it isn't pointing at the running kernel's source tree.
Although looking at the kernel module Makefile seems to indicate that it uses uname -r to get the directory to put the module in...
Hmmmmm.....
Are you doing a "make clean" before you try to install the modified driver? That MIGHT be a problem (though it wasn't here...).
Gaccm
01-17-2002, 09:44 PM
the only difference is that i'm using the 2313 kernel instead of 2314. As for make clean, i physically rm- rf * the folders, so i doubt that will help.
bwkaz
01-17-2002, 10:26 PM
2313? Do you mean 2.3.13? Are you using a development kernel then?
Or, wait, do you mean nVidia's 2313 driver?
I was talking about the Linux kernel.
Do a ls -l /usr/src, and also a uname -r, and post the results of both, that'll help.
Gaccm
01-18-2002, 02:32 AM
i'm definitly using the 2.4.17 kernel. the NVdriver clearly uses that and installs correctly into /lib/modules/2.4.17. Its just not the driver i want :(
bwkaz
01-18-2002, 09:48 AM
I think I found the problem:
------ Card Info ------
Model: GeForce2 GTS/GeForce2 Pro
IRQ: 11
Video BIOS: 03.15.00.12
------ AGP Info -------
AGP status: Disabled
AGP Driver:
Bridge: Generic Via
SBA: Supported [disabled]
FW: Supported [disabled]
Rates: 4x 2x 1x [-]
Registers: 0x1f000217:0x00000000
AGP shouldn't be disabled. Do you modprobe the driver manually, or do you use something like devfs' autoload feature? I'm thinking you need to also either modprobe agpgart (or something), or use nVidia's AGP driver.
r0nster
01-18-2002, 07:25 PM
Originally posted by Gaccm:
<STRONG>i just can't get it to work. I've tried changing the Via4x option, the SBa option and the FA option, NONE of them work.
------ Card Info ------
Model: GeForce2 GTS/GeForce2 Pro
IRQ: 11
Video BIOS: 03.15.00.12
------ AGP Info -------
AGP status: Disabled
AGP Driver:
Bridge: Generic Via
SBA: Supported [disabled]
FW: Supported [disabled]
Rates: 4x 2x 1x [-]
Registers: 0x1f000217:0x00000000
I have a G2 Pro, so i don't see why it will work. My BIOS has everything enabled. I've tried rm -f the original NVdriver, install the new one, tried rebooting inbetween. I can't get it to ever enable.
Can i get a little help here?</STRONG>
Sure. Like bwkaz, I spotted something that you don't have but need. AGP support. Since you're running a VIA chipset, when compiling a kernel, be sure to enable the via chipset support for agp. I also don't see the nvagp driver used either.
You have the source tree for 2.4.17 right? if you have the 2.4.17/ tree in /usr/src, be sure your linux symlink, if you have one, points to linux-2.4.17. Ok, if you are currently running a 2.4.17 kernel, go ahead and do a make install, rmmod the NVdriver and re-modprobe it. Here is my nvinfo for reference: ----- Driver Info -----
NVRM Version: NVIDIA NVdriver Kernel Module 1.0.2314 Fri Nov 30 19:33:20 PST 2001
Compiled with: gcc version 2.95.3 20010315 (release)
------ Card Info ------
Model: GeForce2 GTS/GeForce2 Pro
IRQ: 10
Video BIOS: 03.15.00.11
------ AGP Info -------
AGP status: Enabled
AGP Driver: AGPGART
Bridge: Via Apollo Pro KT133
SBA: Supported [enabled]
FW: Supported [enabled]
Rates: 4x 2x 1x [4x]
Registers: 0x1f000217:0x00000314
Be sure that you have proper AGP support enabled for your VIA chipset, even if you elect to use the NVagp driver, it always helps.
What motherboard are you using, if that makes any difference? :)
I suggest that you use the 2314 Nvidia kernel module and *not* 2313
bwkaz
01-18-2002, 09:24 PM
I'm still at 2313 -- where can I get 2314? I can't get at nVidia's site, apparently their Web server isn't responding. Overloaded maybe? I don't know, but anyway, does anybody know of a mirror for the files? Or if they're on a different server at nVidia, can I get a URL? Thanks.
Gaccm
01-19-2002, 01:25 AM
2314 is for people that couldn't get 2313 to work. Thats the only change.
K, i'm recompiling 2.4.17. Before, i had agp support on yes, but no to Via chipset support (i thought it wasn't for me since i use nvidia drivers). So i changed that to yes and i hope it works.
Gaccm
01-19-2002, 01:39 AM
nope D: I recompiled, but it still said disabled. Here is a snippet of my .config file
# CONFIG_FTAPE is not set
CONFIG_AGP=y
# CONFIG_AGP_INTEL is not set
# CONFIG_AGP_I810 is not set
CONFIG_AGP_VIA=y
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_SWORKS is not set
# CONFIG_DRM is not set
# CONFIG_MWAVE is not set
I guess, i could email someone (or someone email me) the entire .config, and then diff them.
r0nster
01-20-2002, 10:54 PM
Originally posted by Gaccm:
<STRONG>nope D: I recompiled, but it still said disabled. Here is a snippet of my .config file
# CONFIG_FTAPE is not set
CONFIG_AGP=y
# CONFIG_AGP_INTEL is not set
# CONFIG_AGP_I810 is not set
CONFIG_AGP_VIA=y
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_SWORKS is not set
# CONFIG_DRM is not set
# CONFIG_MWAVE is not set
I guess, i could email someone (or someone email me) the entire .config, and then diff them.</STRONG>
here is mine for diff purposes: ONFIG_AGP=m
# CONFIG_AGP_INTEL is not set
# CONFIG_AGP_I810 is not set
CONFIG_AGP_VIA=y
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_SWORKS is not set
CONFIG_DRM=y
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_GAMMA is not set
# CONFIG_DRM_R128 is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_I810 is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_MWAVE is not set
The only thing that I'm doing is configuring my agp support as a module which autoloads when I startx. You're compiling yours in. I don't see that making any difference but anyways, I wanted to point that out. Don't ask me why I enabled DRM support :eek:
Anyways, the lowdown on my system:
Slackware 7.1 (greatly modified since first installing it)
2.4.17 kernel tree sources are in my /home dir:
/home/me/linux
glibc 2.2.3 runtime libraries
xfree86 4.1.0 including headers (*.h)
gcc 2.95.3
kernel 2.4.17
AMD Athlon 1.0 Ghz
ABIT KT7 motherboard (Via Apollo KT133 chipset)
Gaccm, what make and model is your motherboard and does it support AGP 4x?
r0nster
01-20-2002, 10:57 PM
Originally posted by bwkaz:
<STRONG>I'm still at 2313 -- where can I get 2314? I can't get at nVidia's site, apparently their Web server isn't responding. Overloaded maybe? I don't know, but anyway, does anybody know of a mirror for the files? Or if they're on a different server at nVidia, can I get a URL? Thanks.</STRONG>
At Nvidia's site, their NV kernel tarball is at 2314 but their GLX libs are still at 2313. Scroll down to nearly the bottom of the page and you'll see the tarball :) I just check the page the other day and it's there.
Gaccm
01-21-2002, 01:39 AM
well, i mess messing around with my kernel, and guess what!
----- Driver Info -----
NVRM Version: NVIDIA NVdriver Kernel Module 1.0.2313 Tue Nov 27 12:01:24 PST 2001
Compiled with: gcc version 2.95.4 20011006 (Debian prerelease)
------ Card Info ------
Model: GeForce2 GTS/GeForce2 Pro
IRQ: 11
Video BIOS: 03.15.00.12
------ AGP Info -------
AGP status: Enabled
AGP Driver: AGPGART
Bridge: Generic Via
SBA: Supported [enabled]
FW: Supported [enabled]
Rates: 4x 2x 1x [4x]
Registers: 0x1f000217:0x00000314
:D :D :D
r0nster
01-21-2002, 08:25 PM
:cool:
way 2 go!
hamking
04-22-2002, 04:29 AM
How would I set these variables? what files to I put them in, or what commands do I use to enable them?
FULL SCENE ANTI-ALIASING Anti-aliasing is a technique used to smooth the edges of objects in a
scene to reduce the jagged "stairstep" effect that sometimes appears.
Full scene anti-aliasing is supported on GeForce or newer hardware.
By setting the appropriate environment variable, you can enable full
scene anti-aliasing in any OpenGL application on these GPUs. Several anti-aliasing methods are available and you can select between
them by setting the __GL_FSAA_MODE environment variable appropriately.
Note that increasing the number of samples taken during FSAA rendering
may decrease performance. The following tables describe the possible values for __GL_FSAA_MODE
and their effect on various NVIDIA GPUs. __GL_FSAA_MODE GeForce/GeForce2/Quadro Description
-----------------------------------------------------------------------
0 FSAA disabled
1 FSAA disabled
2 FSAA disabled
3 1.5 x 1.5 oversampling
4 2 x 2 oversampling with no texture LOD bias
5 FSAA disabled
I have a geforce2 GTS
[ 22 April 2002: Message edited by: hamking ]
Sastraxi
08-16-2002, 01:19 PM
Is there any way to change the kernel's name? I'd like to benchmark the performance difference. I'd like to compile it [normally] as NVdriver, and the tweaked one as NVtweak.
However, if what I've learned about linux tells me anything, it's that they'll depend on the same libraries... :D
Cheers for bringing this up, ron!
r0nster
08-19-2002, 06:25 PM
Originally posted by hamking
How would I set these variables? what files to I put them in, or what commands do I use to enable them?
I have a geforce2 GTS
[ 22 April 2002: Message edited by: hamking ]
that would be at a terminal prompt:
bash_shell $ export GL_FSAA_MODE=n
where the n is the number that you want to try. I did that on mine and while the anti-aliasing looked nice on the GL screensavers (xscreensaver), performance took a good hit. Geforce 3 and 4 do better with FSAA than my Geforce2 card.
Give it a try. :)
r0nster
08-19-2002, 06:29 PM
Originally posted by Sastraxi
Is there any way to change the kernel's name? I'd like to benchmark the performance difference. I'd like to compile it [normally] as NVdriver, and the tweaked one as NVtweak.
However, if what I've learned about linux tells me anything, it's that they'll depend on the same libraries... :D
Cheers for bringing this up, ron!
You can but you would probably have to name the existing nvdriver.o file to something else. Then install the newnvdriver module and then rename it to nvtweak. Rename the old one back to nvdriver. I don't see why that wouldn't work.
r0nster
08-19-2002, 06:34 PM
Anybody agree with me, raise yer hand!
Of course if anyone finds an error in my how-to, by all means speak up!:D
justlinux.com
Copyright Internet.com Inc. All Rights Reserved.