2006-05-16

Installing dri drivers on FreeBSD

Installing dri drivers on FreeBSD


*BSDI am getting quite a few questions with regards to installing dri enabled graphics drivers on FreeBSD. In this article I'll discuss the general setup, and it shoudl enable you to get this to work for every card that is supported.

Supported hardware:

  • Older Matrox hardware (g200 - g550), everything before the P series
  • Older ATI hardware (8xxx and 9000 upto 9400, basicly everything with a rv2xx chipset)
  • Some S3 hardware

What is inmediately clear from this is that it almost exclusively concerns older hardware. WHat is also clear is the complete lack of NVIDIA in the list.

Why do you need dri?

Accelerated 3d graphics, ie: OpenGL support.

OpenGL support is usefull for more then a bit of gaming. Makign previews in renderign software is just one of the more serious uses for it.

What do you need?

Of course you need a supported video card. Beyond that, you will need the sources for the kernel and you need XFree86 v4.x or Xorg 6.7 or later.

Installation

After installing the kernel sources, do the following:

cd /usr/src/sys/modules/drm
make
make install
Now you have the direct rendering modules installed, and you can load the one appropriate for your video card. The best way to do this is by adding it to the boot loader configuration, to do so, you have to add a line to /boot/loader.conf similar to:
radeon_load="YES"
Replace radeon with the proper module name for your card (mga for Matrox, s3 for.. s3) Known issues

It is worth noting that you really should load the module at boot time or at least make absolutely sure that you have either agp enabled in your kernel, or load the agp module at boot.

The issue here is that the agp module can not be loaded after the kernel booted, and the dri modules depend on agp. So if you don't have agp support when your kernel boots, dri is NOT going to work ever.

Installing X

Once the module works, you will get a message during startup that will tell you that drm is enabled and has found soem graphics hardware.

Now it is time for configuring the X server. This should be pretty straightforward, just make sure you have the dri and glx modules loaded, and select a driver appropriate for your card, and things should be fine.

You can verify if your setup indeed uses direct rendering with the glxinfo command.

Not getting X to start?

If you do not get a working X at all but the dri modules are loaded by the kernel and give the expected output on boot, it might well eb that you have a problem with your AGP setup.

The first thing to do in such a case is goto your bios and DISABLE fast write and any other advanced AGP features. Try again and see if it works now. If it does, enable the features one by oen and try each time if the X server still starts and works.

Especially ATI Radeon cards on boards with a VIA chipset are extremely picky about AGP setup, and will fail in mysterious ways when you enable fast write, so unless you like such mysteries, you better just disable this.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.