From owner-freebsd-questions@FreeBSD.ORG Sun Jan 9 18:31:53 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4099616A4ED for ; Sun, 9 Jan 2005 18:31:53 +0000 (GMT) Received: from out003.verizon.net (out003pub.verizon.net [206.46.170.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DB7143D49 for ; Sun, 9 Jan 2005 18:31:52 +0000 (GMT) (envelope-from FreeBSD@keyslapper.org) Received: from keyslapper.org ([68.163.251.221]) by out003.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20050109183151.PXVS1106.out003.verizon.net@keyslapper.org> for ; Sun, 9 Jan 2005 12:31:51 -0600 Received: from localhost (localhost [127.0.0.1]) by keyslapper.org (Postfix) with ESMTP id C223C11CD2 for ; Sun, 9 Jan 2005 13:31:50 -0500 (EST) Received: from keyslapper.org ([127.0.0.1]) by localhost (keyslapper.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 81479-07 for ; Sun, 9 Jan 2005 13:31:50 -0500 (EST) Received: by keyslapper.org (Postfix, from userid 1001) id 84FF511CD0; Sun, 9 Jan 2005 13:31:50 -0500 (EST) Date: Sun, 9 Jan 2005 13:31:50 -0500 From: Louis LeBlanc To: freebsd-questions@freebsd.org Message-ID: <20050109183150.GE20686@keyslapper.org> Mail-Followup-To: freebsd-questions@freebsd.org References: <41E16DAA.8000807@dd.chalmers.se> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <41E16DAA.8000807@dd.chalmers.se> User-Agent: Mutt/1.5.6i X-Virus-Scanned: amavisd-new at keyslapper.org X-Authentication-Info: Submitted using SMTP AUTH at out003.verizon.net from [68.163.251.221] at Sun, 9 Jan 2005 12:31:51 -0600 Subject: Re: AGP not working on nForce3 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-questions@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2005 18:31:53 -0000 On 01/09/05 06:45 PM, Mats Kristoffersen sat at the `puter and typed: > I have trouble with AGP using the nVidia drivers from ports. > > I have a MSI K8N neo2 motherboard (nForce3 Ultra), an Athlon64 3000+ CPU > and a GeForce FX 5200. I'm running FreeBSD 5.3-STABLE in i386 mode. Exactly the card I'm using, but I'm not using an Athlon. > When I load the nvidia drivers, it says: > > agp0: mem 0xe8000000-0xefffffff at > device 0.0 on pci0 > agp0: Unable to find NVIDIA Memory Controller 1. That's the kernel agp. You might want to pull it out of the kernel and use the Nvidia agp. > device_attach: agp0 attach returned 19 > nvidia0: mem > 0xf0000000-0xf3ffffff,0xf4000000-0xf4ffffff irq 16 at device 0.0 on pci1 > nvidia0: [GIANT-LOCKED] Looks like a 64M card? Mines 128M, but that shouldn't matter here. > When I startx, it says > > NVRM: AGP cannot be enabled on this combination of the AMD CPU and OS kernel > NVRM: kernel upgrade recommended. You need to pick an AGP driver. This is done in /etc/X11/xorg.conf with the NvAGP setting. I use Option "NvAGP" "1" # Use Nvidia agp Of course, I had to remove the agp device from my kernel. It may also be necessary for you to build a custom kernel that makes use of some Athlon specific features - I'm using a Pentium myself, but there are plenty of folks on the list that can recommend options and devices to look at. > There is no /dev/agp or similar. Having agp enabled or disabled in the > kernel or loading agp.ko dynamically makes no difference. The absence of a /dev/agp is not important. agp.ko is the FreeBSD agp driver, you might be better with the nvidia agp. > Nvidia-related sysctl variables: > 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:0x00000000 > hw.nvidia.version: NVIDIA FreeBSD x86 NVIDIA Kernel Module 1.0-6113 Mon Aug 2 16:08:32 PDT 2004 > hw.nvidia.registry.EnableVia4x: 0 > hw.nvidia.registry.EnableALiAGP: 0 > hw.nvidia.registry.NvAGP: 3 ^ Setting this to 3 tells the driver to try the native AGP first. I had trouble with this, and had to compile the agp device out of my kernel to get it to work right. Notice below that I set NvAGP to 1. > 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.cards.0.model: GeForce FX 5200 > hw.nvidia.cards.0.irq: 16 > hw.nvidia.cards.0.vbios: 04.34.20.56.00 > hw.nvidia.cards.0.type: AGP > dev.nvidia.0.%desc: GeForce FX 5200 > dev.nvidia.0.%driver: nvidia > dev.nvidia.0.%location: slot=0 function=0 handle=\_SB_.PCI0.AGPB.VGAG > dev.nvidia.0.%pnpinfo: vendor=0x10de device=0x0322 subvendor=0x0000 > subdevice=0x0000 class=0x030000 > dev.nvidia.0.%parent: pci1 I'm not seeing your hw.nvidia.agp.status.rate sysctl there, which suggests the NVidia AGP isn't being loaded. It may be having trouble with the native AGP driver, but the failover isn't working because there's a conflict - I had the same problem until I removed the native agp device. How did you compile the drivers? My pkgtools.conf uses the following: 'WITHOUT_LINUX=yes', 'WITH_ACPI=yes', This makes upgrades a little smoother. My kernel config has the agp device removed, so the hw.nvidia sysctls show the nvidia agp status: # sysctl hw.nvidia.agp hw.nvidia.agp.host-bridge.rates: 8x 4x hw.nvidia.agp.host-bridge.fw: supported hw.nvidia.agp.host-bridge.sba: supported hw.nvidia.agp.host-bridge.registers: 0x1f004a1b:0x00000b02 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: nvidia hw.nvidia.agp.status.rate: 8x hw.nvidia.agp.status.fw: disabled hw.nvidia.agp.status.sba: enabled I don't know the exact nature of the fw (fast writes) sysctl, but it doesn't seem to be supported in the FX5200. The key you'll be looking for is the hw.nvidia.agp.status.status sysctl, and it should say enabled. The hw.nvidia.agp.card.rates var should give you the acceleration rates you are getting. You might give that a try. Just comment out the agp in your kernel, don't delete it yet - just in case the nvidia agp doesn't like the athlon for some reason. Also, you'll want to make sure your xorg.conf has a good config. I'm using the TwinView feature, so my graphics device section won't necessarily apply fully. Just in case it will help, this is what I use: Section "Device" Identifier "NV AGP TwinView" VendorName "nVidia Corporation" Driver "nvidia" # update this with the PCI id of your card. Consult the output # of the 'lspci' command. The BusID is usually optional when # only using one graphics card. BusID "PCI:1:0:0" BoardName "NV34 [GeForce FX 5200]" # These are extras that may need removal Option "NoLogo" "True" Option "RenderAccel" "True" Option "NvAGP" "1" # Use NVIDIAs agp Option "HWCursor" "True" # Option "CursorShadow" "True" # Option "EnableAGPFW" "1" # Use Fast Writes # twinview setup Option "TwinView" Option "SecondMonitorHorizSync" "31-80" Option "SecondMonitorVertRefresh" "56-75" Option "TwinViewOrientation" "RightOf" Option "MetaModes" "1280x1024,1280x1024; 1024x768,1024x768" Option "ConnectedMonitor" "crt,crt" EndSection The last block, the twinview setup won't apply unless you're using two monitors, and even then it will likely need modification to work with your monitors. The rest of it may need tweakig to apply for you as well. Also, you should check out the readmes in /usr/X11R6/share/doc/NVIDIA_GLX-1.0/ They explain the agp issue a little better - particularly README.Linux. HTH Lou -- Louis LeBlanc FreeBSD@keyslapper.org Fully Funded Hobbyist, KeySlapper Extrordinaire :) http://www.keyslapper.org ԿԬ Griffin's Thought: When you starve with a tiger, the tiger starves last.