PDA

View Full Version : Who can help me get 3d acceleration working?


HXC
03-11-07, 06:04 AM
I have tried everything I can think off but I don't get Nvidia 3d acceleration working in FreeBSD for my XFX 7800 GS. Who can help me? Here some useful information I gathered so far. Thanks in advance!

# sysctl hw.nvidia.agp.status
hw.nvidia.agp.status.status: disabled
hw.nvidia.agp.status.driver: n/a (unused)
hw.nvidia.agp.status.rate: n/a (disabled)
hw.nvidia.agp.status.fw: n/a (disabled)
hw.nvidia.agp.status.sba: n/a (disabled)


$ glxinfo | fgrep direct
direct rendering: Yes

# tail /boot/device.hints
hint.ie.0.maddr="0xd0000"
hint.fe.0.at="isa"
hint.fe.0.disabled="1"
hint.fe.0.port="0x300"
hint.lnc.0.at="isa"
hint.lnc.0.disabled="1"
hint.lnc.0.port="0x280"
hint.lnc.0.irq="10"
hint.lnc.0.drq="0"
hint.agp.0.disabled="1"

# cat /boot/loader.conf
nvidia_load="YES"
linux_load="YES"
snd_emu10k1_load="YES"

Motherboard:
Asus A8V deluxe
Chipset VIA K8T800 Pro
North bridge VIA K8T800 Pro
South bridge VIA VT8237

# cat /var/log/Xorg.0.log | grep nvidia
(II) LoadModule: "nvidia"
(II) Loading /usr/X11R6/lib/modules/drivers/nvidia_drv.so
(II) Module nvidia: vendor="NVIDIA Corporation"

# cat /var/log/Xorg.0.log | grep NVIDIA
(II) Module glx: vendor="NVIDIA Corporation"
(II) Module nvidia: vendor="NVIDIA Corporation"
(II) NVIDIA dlloader X Driver 1.0-9746 Tue Dec 19 13:23:45 PST 2006
(II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
(--) Chipset NVIDIA GPU found
(**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
(==) NVIDIA(0): RGB weight 888
(==) NVIDIA(0): Default visual is TrueColor
(==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
(**) NVIDIA(0): Option "NvAGP" "1"
(**) NVIDIA(0): Enabling RENDER acceleration
(**) NVIDIA(0): Use of NVIDIA internal AGP requested
(II) NVIDIA(0): NVIDIA GPU GeForce 7800 GS at PCI:1:0:0 (GPU-0)
(--) NVIDIA(0): Memory: 262144 kBytes
(--) NVIDIA(0): VideoBIOS: 05.71.22.21.0a
(--) NVIDIA(0): Interlaced video modes are supported on this GPU
(--) NVIDIA(0): Connected display device(s) on GeForce 7800 GS at PCI:1:0:0:
(--) NVIDIA(0): PHILIPS 109S4 (CRT-0)
(--) NVIDIA(0): NVIDIA TV Encoder (TV-0)
(--) NVIDIA(0): PHILIPS 109S4 (CRT-0): 400.0 MHz maximum pixel clock
(--) NVIDIA(0): NVIDIA TV Encoder (TV-0): 400.0 MHz maximum pixel clock
(--) NVIDIA(0): TV encoder: NVIDIA
(II) NVIDIA(0): Assigned Display Device: CRT-0
(II) NVIDIA(0): Validated modes:
(II) NVIDIA(0): "1280x1024"
(II) NVIDIA(0): Virtual screen size determined to be 1280 x 1024
(--) NVIDIA(0): DPI set to (90, 96); computed from "UseEdidDpi" X config
(--) NVIDIA(0): option
(II) NVIDIA(0): Setting mode "1280x1024"
(II) NVIDIA(0): NVIDIA 3D Acceleration Architecture Initialized
(II) NVIDIA(0): Using the NVIDIA 2D acceleration architecture
(==) NVIDIA(0): Backing store disabled
(==) NVIDIA(0): Silken mouse enabled
(**) NVIDIA(0): DPMS enabled


# dmesg | grep nvidia
nvidia0: <GeForce 7800 GS> mem 0xfb000000-0xfbffffff,0xe0000000-0xefffffff,0xfa000000-0xfaffffff irq 16 at device 0.0 on pci1
nvidia0: [GIANT-LOCKED]

xorg.conf
# cat /etc/X11/xorg.conf
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/TTF/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/CID/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection

Section "Module"
Load "dbe"
# Load "dri"
Load "extmod"
Load "glx"
Load "record"
Load "xtrap"
Load "freetype"
Load "type1"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
Option "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
#DisplaySize 360 270 # mm
Identifier "Monitor0"
VendorName "PHL"
ModelName "PHILIPS 109S4"
### Comment all HorizSync and VertSync values to use DDC:
HorizSync 30.0 - 92.0
VertRefresh 50.0 - 160.0
Option "DPMS"
EndSection

Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "SWcursor" # [<bool>]
#Option "HWcursor" # [<bool>]
#Option "NoAccel" # [<bool>]
#Option "ShadowFB" # [<bool>]
#Option "UseFBDev" # [<bool>]
#Option "Rotate" # [<str>]
#Option "VideoKey" # <i>
#Option "FlatPanel" # [<bool>]
#Option "FPDither" # [<bool>]
#Option "CrtcNumber" # <i>
#Option "FPScale" # [<bool>]
#Option "FPTweak" # <i>
Option "NvAGP" "1"
Identifier "Card0"
Driver "nvidia"
VendorName "nVidia Corporation"
BoardName "Unknown Board"
BusID "AGP:01:00:0"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024"
EndSubSection
EndSection

Edit:
Updated $ glxinfo | fgrep direct

SirDice
03-12-07, 07:42 AM
What isn't working? Everything looks ok..

HXC
03-12-07, 10:16 AM
According to sysctl my nvidia agp is disabled. Moreover glxgears gives me only 5000 fps where normally I get around 13000 (glxgears Linux)

# sysctl hw.nvidia.agp.status

hw.nvidia.agp.status.status: disabled
hw.nvidia.agp.status.driver: n/a (unused)
hw.nvidia.agp.status.rate: n/a (disabled)
hw.nvidia.agp.status.fw: n/a (disabled)
hw.nvidia.agp.status.sba: n/a (disabled)

Edit:
It looks to me only 2d acceleration is enabled:

From Xorg.0.log:
(II) NVIDIA(0): NVIDIA 3D Acceleration Architecture Initialized
(II) NVIDIA(0): Using the NVIDIA 2D acceleration architecture

adamk75
03-12-07, 02:42 PM
glxgears is not, and has never been, a benchmark.

Run an actual heavy duty 3D application before you decide if 3D acceleration is working or not.

As for AGP... Perhaps your chipset just isn't well supported. You seem to be using NvAGP, but have you tried the FreeBSD AGP support?

Adam

HXC
03-12-07, 04:29 PM
glxgears is not, and has never been, a benchmark.

Run an actual heavy duty 3D application before you decide if 3D acceleration is working or not.

As for AGP... Perhaps your chipset just isn't well supported. You seem to be using NvAGP, but have you tried the FreeBSD AGP support?

Adam

Just to be certain I ran ppracer. From the results it's obvious that 3d acceleration isn't working:

FreeBSD
110 fps

Gentoo Linux
240 fps

Edit:
And my chipset is on the Supported NVIDIA Graphics Chips list:
http://us.download.nvidia.com/freebsd/1.0-9755/README/appendix-a.html

HXC
03-12-07, 04:36 PM
Is hardware 3d acceleration supported under FreeBSD for nvidia cards? From the readme

The NVIDIA Accelerated FreeBSD Driver Set brings accelerated 2D functionality
and high-performance OpenGL support to FreeBSD x86 with the use of NVIDIA
graphics processing units (GPUs).

These drivers provide optimized hardware acceleration for OpenGL and X
applications and support nearly all recent NVIDIA graphics chips (please see
Appendix A for a complete list of supported chips). TwinView, TV-Out and flat
panel displays are also supported.

adamk75
03-13-07, 07:38 AM
Yes, 3D acceleration is supported on nVidia cards with the nVidia FreeBSD drivers. What you quoted even says "These drivers provide optimized hardware acceleration for OpenGL and X applications ".


110 FPS under PPracer sure sounds accelerated to me. If it was reverting to software rendering, you'd probably be getting in the range of 0-5 fps.

Did you try the FreeBSD agp support like I suggested?

HXC
03-13-07, 12:24 PM
Yes, 3D acceleration is supported on nVidia cards with the nVidia FreeBSD drivers. What you quoted even says "These drivers provide optimized hardware acceleration for OpenGL and X applications ".


110 FPS under PPracer sure sounds accelerated to me. If it was reverting to software rendering, you'd probably be getting in the range of 0-5 fps.

Did you try the FreeBSD agp support like I suggested?

Your right I do have 3d acceleration support. The performance issues are due to problems with my AGP. I get this message at boot:

login: NVRM: AGP cannot be enabled on this combination of the AMD CPU and OS kernel
NVRM: kernel upgrade recommended.

adamk75
03-13-07, 12:44 PM
So you have two options. You can either upgrade your kernel, as the message suggested, or you can try the FreeBSD agp support (assuming that the FreeBSD agp driver even supports your chipset).

Adam

HXC
03-13-07, 05:00 PM
So you have two options. You can either upgrade your kernel, as the message suggested, or you can try the FreeBSD agp support (assuming that the FreeBSD agp driver even supports your chipset).

Adam

Do you happen where I can find a newbie friendly link with info how I can upgrade my kernel? I will test the FreeBSD AGP now.

Edit:
The FreeBSD agp driver yields the same results. meaning the same error message* and the same fps.

*login: NVRM: AGP cannot be enabled on this combination of the AMD CPU and OS kernel
NVRM: kernel upgrade recommended.

HXC
03-15-07, 03:35 AM
Ok I give up. No matter what I try I can't get it working. Thanks for trying to help :).