View Full Version : DRI, FreeBSD and Wolfenstein

24th February 2002, 14:55

Could anyone help me to make RTCW run under FreeBSD (XF86 4.1.0)?
I have no hw 3D under X. :(

My specs:
FreeBSD 4.4 (Linux libs 6) , XFree86 4.1.0, Matrox G400 32DH.

25th February 2002, 03:04
I don't think it will ever work without hardware acceleration, as RTCW uses heavily Quake III's engine and Q3 doesn't run software only.

25th February 2002, 20:26
I mean I couldnt make hw 3d acc. to work properly. Glxgears shows pretty weak performance only ~140 fps. Under Suse 7.3 Linux it shows about 740 fps and rtcw works very well.
Anyone here using FreeBSD with XF 4.1.0 hw 3d enabled?

27th February 2002, 16:10
I have a G450 with DRI enabled under FreeBSD 4.4. It runs RTCW reasonably well. You need to get the drm-kmod port and install it. Then you should be good to go.

28th February 2002, 09:36
Thx cRock.
I've installed the kmod but on reboot I got this error message:
"/kernel: link_elf: symbol agp_get_info undefined"
There is only tdfx loaded.
I use XFree86 4.1.0_6 and linux_base-6.1 .
I will reinstall the whole system from the cd.

Did u recompile anything?
Do u use utah-glx or linux_mesa or anything else?

28th February 2002, 11:38
Sounds like you have an AGP problem.

Make sure you have the following in /boot/loader.conf


Then recompile your kernel without AGP. This will force the system to load AGP as a module.

28th February 2002, 18:16
thx, I've made it.

the modules load nicely, mga module reports the G400 with AGP shared memory.
The fps numbers of glxgears is grew to 180 which is better than before but still too low.
glxinfo reports no dri is in use.

how did u enable it?
I have the Section "DRI" in my xconfig file.

28th February 2002, 22:35
Well, I dunno. Sounds like you've got the hard part done. I get 435 FPS in gears (2 x 1gig durons).

Here is my XF86Config for reference:

Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"

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/Speedo/"
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/"
FontPath "${PREFIX}/share/AbiSuite/fonts"

Section "Module"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "pex5"
Load "record"
Load "xie"
Load "type1"

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"

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

Section "Monitor"
Identifier "Monitor0"
VendorName "NEC"
ModelName "NEC FE700+"
HorizSync 31.0 - 70.0
VertRefresh 55.0 - 120.0

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 "PciRetry" # [<bool>]
#Option "SyncOnGreen" # [<bool>]
#Option "NoAccel" # [<bool>]
#Option "ShowCache" # [<bool>]
#Option "Overlay" # [<str>]
#Option "MGASDRAM" # [<bool>]
#Option "ShadowFB" # [<bool>]
#Option "UseFBDev" # [<bool>]
#Option "ColorKey" # <i>
#Option "SetMclk" # <freq>
#Option "OverclockMem" # [<bool>]
#Option "VideoKey" # <i>
#Option "Rotate" # [<str>]
#Option "TexturedVideo" # [<bool>]
#Option "Crtc2Half" # [<bool>]
#Option "Crtc2Ram" # <i>
#Option "Int10" # [<bool>]
Option "AGPMode" "2"
#Option "DigitalScreen" # [<bool>]
#Option "TV" # [<bool>]
#Option "TVStandard" # [<str>]
#Option "CableType" # [<str>]
#Option "NoHal" # [<bool>]
#Option "SwappedHead" # [<bool>]
#Option "DRI" # [<bool>]
Identifier "Card0"
Driver "mga"
VendorName "Matrox"
BoardName "MGA G450 AGP"
BusID "PCI:1:5:0"

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 1
SubSection "Display"
Depth 4
SubSection "Display"
Depth 8
SubSection "Display"
Depth 15
SubSection "Display"
Depth 16
Modes "1024x768"
SubSection "Display"
Depth 24
Modes "1024x768"
Option "DPMS"

5th March 2002, 16:04

does DRI work for ya with the GENERIC kernel? How did u install Xfree86 (eg. sources or packages - if packages which ones)?

what does glxinfo write (eg. DRI status and renderer device)

I made a link in wolf's directory libGL.so -> X11/modules/libGL.so.1
When I try to run wolf it fails with the error 'libGL.so failed, ABI unknown' (this isn't the exact msg)

Another question: does FBSD utilize ur dual Durons? What mobo do u have?

5th March 2002, 16:26
You need the Linux DRI libs to run wolf (do not link linux binaries to freebsd libs!). Look under /usr/ports/graphics/linux-dri. You might need to update your ports as this one is fairly recent.

My X is 4.1.0 from ports.

name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
client glx vendor string: SGI
client glx version string: 1.2
client glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
GLX extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
OpenGL vendor string: VA Linux Systems Inc.
OpenGL renderer string: Mesa DRI G400 20010321 AGP 2x x86/MMX
OpenGL version string: 1.2 Mesa 3.4.2
OpenGL extensions:
GL_ARB_multitexture, GL_ARB_transpose_matrix, GL_EXT_abgr,
GL_EXT_blend_func_separate, GL_EXT_clip_volume_hint,
GL_EXT_compiled_vertex_array, GL_EXT_histogram, GL_EXT_packed_pixels,
GL_EXT_polygon_offset, GL_EXT_rescale_normal, GL_EXT_stencil_wrap,
GL_EXT_texture3D, GL_EXT_texture_env_add, GL_EXT_texture_object,
GL_EXT_vertex_array, GL_MESA_window_pos, GL_MESA_resize_buffers,
GL_NV_texgen_reflection, GL_PGI_misc_hints, GL_SGIS_pixel_texture,
glu version: 1.3
glu extensions:
GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

FreeBSD loves my dual durons! All I need was a basic kernel recompile. I did have patch in AGP support for the AMD 762 chipset before I could run DRI, but that was fairly painless. I'm running a Tyan Tiger MP S2640, great board.

5th March 2002, 20:34
cRock, thanx for all,

finally I made it!
I downloaded the linux-dri port 'leaf' manually, made a dir into /usr/ports/graphics and then fired up make , make install, and voila, it works!

Glxinfo showed DRI disabled - I found out that my X was in 8 bit mode (lame!). Switched to 16bit and dri became enabled.
I have about 1060 fps in glxgears, which is not bad for my G400 and Duron 800 (a single one).

Again, thank you cRock!

(anyway, how to update the whole ports tree?)

5th March 2002, 21:38
Glad to hear you got it running!!!! Sounds fast too!

There is a good section on updating the ports tree in the handbook. Basically, you use cvsup.

If you need an in-depth explanation (for just about anything), head over to http://www.freebsdforums.org or http://www.freebsddiary.org for all kinds of great info.

7th March 2002, 16:25
Another conflict I discovered I have no sound. I've recompiled the kernel with PCM (I have via686a ac97 codec and Gravis Ultrasound PnP - both of them work perfect under suse/bsd).
Sound works on desktop, I can listen to CD, mp3/ogg, wav, midi but not in Wolf.
I've installed the vsound from ports but it doesn't help.
Is there any package I have to install? (I think vsound is not that kind)

Another question, related to hw 3d:
Tuxkart is sluggish. IMHO it runs in sw render but dunno how to make it to use dri. Any idea?

BTW wolf under freebsd looks better than under linux. I like it. :)

8th March 2002, 07:57
All of the games from Id use mmaped sound. Unfortunately, mmapped sound is broken in 4.3 and 4.4. An upgrade to 4.5 should give you sound.

I dunno about tuxcart. It runs okay for me so I never had to mess with it.

13th March 2002, 16:08

can I upgrade via sources?

13th March 2002, 17:01

I suspect you would be well served to follow the -stable branch as described in the handbook. You'll also find instructions on building the full system in that chapter of the handbook.

I'm amazed all over again whenever I compile the entire system from source and everything works :-)

31st March 2002, 05:56
Well, well...

I've made it! Everything seems to work fine, there's system sound, can play cd/mp3/midi/wav etc. but in Wolf still no sound at all.
Is there any source patch I should apply?

1st April 2002, 13:06
No patch needed, it was a hw sharing prob.
The sound server of KDE2 was guilty. :) I switched it off, and voila sound works great. Installed q3 and it also works great!

5th April 2002, 18:51
Can anyone help me get my games running? I have DRI, Linux-DRI, Linux-GLX, GLX, all that jazz. But when I attempt to start the game, the X server crashes. I used the rtcw-1.1b port by the way.

5th April 2002, 19:21
What version of everything are you running? Make sure you're using XFree 4.2.0 and drm-kmod 0.9.5.

5th April 2002, 19:55
Latest version of everything but XFree86. I am on 4.1.0. I guess I should upgrade that. Did you ever have X crash when you ran wolf?

7th April 2002, 14:03
No. X server never crashed only the comp was frozen :)
Sometimes my comp freezes because of 3d apps. When I use only desktop/cl apps it works great.
I'm running X with "option AGP 1".