Nvidia Driver AGP FastWrite and Side Band Addressing

From MythTV Official Wiki
Jump to: navigation, search

This is reproduction of http://gentoo-wiki.com/HARDWARE_Nvidia_Driver_AGP_FastWrite_and_Side_Band_Addressing. Review required.

Intro

By default the nvidia drivers do not enable AGP FastWrites or Side Band Addressing. This tip is a quick and easy way to turn it on. To enable fastwrite you must have a motherboard that supports it, and have it turned on in the BIOS. Most AMD boards have fastwrite capability. I am not sure about Pentium based boards.

  • Remember to compile agpgart (you can find it under the section Character Devices) as module
  • This tip requires a reboot. Unloading and reloading the driver just gets you an unstable system

Warning from a third party: Many of the steps in this guide are not strictly necessary to enable FastWrite and SBA and may only serve to confuse you further as they did me. I eventually found that as long as you have supported hardware, and have AGPGART working properly (whether the in-kernel or nVidia version), you should simply be able to uncomment the specified line in /etc/modules.d/nvidia and have FastWrite and SBA working after a reboot. The in-kernel AGPGART driver does not have to be a module, and you needn't muck about with the other /etc except the one I mentioned.

Workflow

Check to see if the FastWrites and SBA is enabled or disabled (my system has it enabled because I turned it on; you may see that it says disabled):


Script.png cat /proc/driver/nvidia/agp/status

Status:          Enabled
Driver:          AGPGART 
AGP Rate:        4x 
Fast Writes:     Enabled 
SBA:             Enabled

Warning.png Warning: If the above path does not exist, check the alternate method below.

If it says its disabled, check that NVAGP is being loaded. If you see something like the following you have to remove AGPGART from your kernel config.

Script.png dmesg | grep NVAGP

NVRM: not using NVAGP, AGPGART is loaded!!
NVRM: not using NVAGP, AGPGART is loaded!!

Edit /etc/hotplug/blacklist and add these two lines:

Script.png /etc/hotplug/blacklist

agpgart
via-agp

Use intel-agp if you have an intel board. Next, edit /etc/modules.d/aliases:

Script.png /etc/modules.d/aliases
Change the line that says:

alias char-major-10-175 agpgart

with:

#alias char-major-10-175 agpgart
install nvidia-agp /bin/true
install agpgart /bin/true

Now before enabling fastwrites and sba make sure that your video card and AGP host bridge support it. The Geforce 2 GTS cards and Geforce Ti cards support it. I am not sure if the MX cards do.

  • Geforce4 MX cards support fastwrites, but not sba
  • Geforce4 MX 440 on nVidia nforce2 chipset supports both fastwrites and sba
  • GeForce FX 5200 on VIA 8237 chipset supports both fastwrites and sba


Script.png cat /proc/driver/nvidia/agp/card

$ cat /proc/driver/nvidia/agp/card
Fast Writes:     Supported 
SBA:             Supported 
AGP Rates:       4x 2x 1x 
Registers:       0x1f000217:0x1f000314


Script.png cat /proc/driver/nvidia/agp/host-bridge

$ cat /proc/driver/nvidia/agp/host-bridge
Host Bridge:     <your motherboard host bridge shown here>
Fast Writes:     Supported
SBA:             Supported
AGP Rates:       4x 2x 1x
Registers:       0x1f000217:0x1f000314

If your card and bridge support FW and SBA then just edit /etc/modules.d/nvidia:

Script.png /etc/modules.d/nvidia

alias char-major-195 nvidia 
options nvidia NVreg_EnableAGPSBA=1 NVreg_EnableAGPFW=1

Now regenerate /etc/modules.conf so that these changes take effect:

Script.png modules-update

# update-modules

Reboot. To make sure that the Fastwrite and SBA are enabled just:

Script.png cat /proc/driver/nvidia/agp/status

$ cat /proc/driver/nvidia/agp/status 
Status:          Enabled 
Driver:          AGPGART 
AGP Rate:        4x 
Fast Writes:     Enabled 
SBA:             Enabled

This helped to up my frames per second in UT2k3, Quake3, RTCW and generally all of my first person games.

Alternate Method

Alternatively, it seems some (or newer, confirmation on this?) nvidia drivers merged via 'emerge nvidia-drivers' do not contain the /proc/driver/nvidia/agp/status path. Alternatively, the information can be found at /proc/driver/nvidia/registry.


Script.png nVidia Registry Options

$ cat /proc/driver/nvidia/registry 
VideoMemoryTypeOverride: 1
EnableVia4x: 0
EnableALiAGP: 0
NvAGP: 3
ReqAGPRate: 15
EnableAGPSBA: 0
EnableAGPFW: 0
SoftEDIDs: 1
Mobile: 4294967295
ResmanDebugLevel: 4294967295
FlatPanelMode: 0
DevicesConnected: 0
RmLogonRC: 1
VbiosFromROM: 0
ModifyDeviceFiles: 1
DeviceFileUID: 0
DeviceFileGID: 27
DeviceFileMode: 432
RemapLimit: 0
UseCPA: 4294967295
DetectPrimaryVga: 1
SaveVBios: 0
EnableBrightnessControl: 0
PanelPWMFrequency: 1018
PanelBrightnessLimits: 65280
UseVBios: 1
RMEdgeIntrCheck: 1

As in the other method, the two settings we are concerned with is setting EnableAGPSBA and/or EnableAGPFW to 1. The only steps required are setting the appropriate flags in /etc/modules.d/nvidia. The flags which need to be added are as follows:


Script.png /etc/modules.d/nvidia

options nvidia NVreg_EnableAGPFW=1 NVreg_EnableAGPSBA=1

Restart your system, and FastWrite and SBA should both be enabled. Cat /proc/driver/nvidia/registry to double check and enjoy.

These steps didn't quite match my knoppmyth R5.5 version. these did http://forum.compiz-fusion.org/showthread.php?t=561

Links

From Gentoo Forums: