DRI on ATi Radeon 9600 Mobility M10 - Toshiba SP30-110 - Gentoo Linux

After messing about with Gentoo Linux for over three months I finally managed to get my graphics card to operate under DRI enabled conditions.

DRI or Direct Rendering Infrastructure is a framework that allows direct access to the hardware (of the graphics card) in the X window system. For the ‘children of Microsoft’, X window system is the GUI system the all too often heard but seldom used *nix (Linux/Unix) operating system.

Now ordinarilly this would not be too much of a problem as that is what the drivers of the graphics card is made for right ? To allow access to the hardware components of the graphics card …. including DRI ?? But unfortunately we never live in a perfect world and nothing comes easy.

For the Linux operating system ATi releases its own proprietary drivers in a pre-compiled binary format. These are closed source and updates are usually hardmasked (might be stable but not fully tested). These drivers also taint the kernel which prevents developers from being able to perform debugging operations normally.

The main problem with making use of the Linux ATi proprietary drivers - fglrx is that if composite is enabled then the drivers will not be loaded properly with the OpenGL implementation Mesa. In order to have the drivers working properly with DRI the Composite option in /etc/xorg.conf must not be enabled. This is not what you want to do if you want to make use of the absolutely amazing Beryl.

Alternatively the Open Source Xorg xf86 ATi video drivers can be made use of. These drivers allow you to have DRI enabled and make use of Composite at the same time (by using the preffered method AIGLX, at the time of writing this).

Prior to doing this the Kernel will require recompilation.

Compile AGP Driver

Linux Kernel Configuration: Kernel 2.6
Device Drivers  --->
Character devices  --->
< M > /dev/agpgart (AGP Support)
< M > ATI chipset support
<   > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)

Add the kernel modules you just compiled into your modules.autoload.d file using nano or whatever you prefer.

File: /etc/modules.autoload.d/kernel-2.6
agpgart
ati-agp
drm
radeon

Now save the kernel configuration file and recompile the kernel. Make sure you save it and boot from it using your boot loader GRUB or LILO.

Compiling the kernel modules from DRM source

Since libdrm is a Mesa dependancy it is a good idea to update it to the unstable branch (atleast I had to). The latest version in portage can be obtained by adding the library to the package.keywords file and re-emerging it.

File: /etc/portage/package.keywords
x11-libs/libdrm ~x86

The use flag for the DRM package will also need to be modified (Optional),

File: /etc/portage/package.use
x11-base/x11-drm video_cards_radeon

Make sure you emerge x11-base/x11-drm now.

The aiglx USE flag above can be ignored if you do not use AIGLX. Reinstall Xorg to be on the safe side. Please note a xorg.conf file can be found at the end of this post. Alternatively when Xorg has finished compilation xorgcfg can be executed to generate a simple configuration. Then the key components can be added to it. To enable 3D acceleration,

File: /etc/X11/xorg.conf

Section "dri"
Mode    0666
EndSection

Make sure that the following lines are present in the config file under the section Modules,

File: /etc/X11/xorg.conf

Section "Module"
Load "dri"
Load "drm"
Load "glx"
...
EndSection

The video driver radeon is specified next,

File: /etc/X11/xorg.conf
Section "Device"
Identifier  "ATI Radeon"
VendorName  "ATI Technologies Inc"
Driver      "radeon"
Option      "DRI"     "true"
...
EndSection

Now all that needs to be done is set the OpenGL implementation to the correct one.

eselect opengl set xorg-x11

Once X is all set (feel free to use the configuration files found below), open an Xterm or Konsole (oh yea KDE) and run glxinfo. DRI should be enabled and can be confirmed by,

# glxinfo | grep -i “direct rendering”
direct rendering: Yes

Good luck !!

My configuration files for reference,

/etc/portage/package.keywords/xorg-x11

/etc/portage/package.keywords/core

/etc/X11/xorg.conf


About this entry