Talking
3D support on an ATI IGP 340m!!!

This is my first how-to, so feel free to critizize it, make additions, or just tell me I'm full of crap. Have fun....
First let me start by saying this worked for me, however your mileage may vary. Also BACK UP YOUR SYSTEM BEFORE YOU TRY THIS, this is the result of about the thousandth time I have tried this, yet only the first successful attempt. My previous attempts have resulted in failures varying from destroying gnome to not being able to boot X, so you've been warned... this is not for the faint of heart.
Okay, if your still reading this I'll assume your extremely brave and made backups... (no if you haven't backed up your files, GO AND DO IT, or you could find yourself having to learn to burn CDs from the command line very quickly... this is the voice of experience speaking).
Here is the hardware (and software) that I'm using:
A HP Pavilion ze4220 Laptop
1.7ghz (iirc) Celeron
ATI IGP 340M 64mb onboard video
512mb of RAM
Fedora Core 2 Test 3
2.6.5-1.351 kernel
fully up2date (as of 5/6/04)
This should work with Fedora Core 1 with a 2.4 kernel also, but I'm not quite sure (if someone wants to try it out and let me know that would be great)
And now ladies and gentlemen the feature presentation:
I'll put all the commands to type in brackets ({}) with each command in in its own set of brackets
1.In your home folder make a directory called 3d:
{mkdir ~/3d}
2.Change to the directory you just made:
{cd ~/3d}
3.Get DRI, DRM, and Mesa from CVS (when asked for a password hit enter):
{cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri login}
{cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri co xc}
{cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/mesa login}
{cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/mesa co Mesa}
{cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri login}
{cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri co drm}
This will create 3 new directories: dri, drm, and Mesa.
If you cannot access the CVS (i.e. firewalls, etc.) I have been told that you can download the CVS from these links:
for the Mesa source:
http://freedesktop.org/cgi-bin/viewcvs.cgi/mesa/
and for xc and drm:
http://freedesktop.org/cgi-bin/viewcvs.cgi/dri/
NOTE: If you download from the above links you will get two tarballs. Download them into your 3d folder and extract them
{tar xzvf mesa.tar.gz}
{tar xzvf dri.tar.gz}
Change to the dri directory to compensate for the different directory structure in the tarball (so the rest of the howto should work).
{cd dri}
4.Configure DRI so that it knows where the DRI and Mesa directories are:
Edit xc/xc/config/cf/host.def with your favorite text editor mine is gedit so I ran
{gedit xc/xc/config/cf/host.def}
Now edit the lines that say “#define MesaSrcDir” and “#define DRMSrcDir” to point to the directories just created in the previous step. i.e. my lines were edited to:
#define MesaSrcDir /home/john/3d/Mesa
#define DRMSrcDir /home/john/3d/drm
NOTE: If you are using the tarballs of the cvs the line that I list above as:
#define DRMSrcDir /home/john/3d/drm
would change to:
#define DRMSrcDir /home/john/3d/dri/drm
and the line I list above as:
#define MesaSrcDir /home/john/3d/Mesa
would change to:
#define MesaSrcDir /home/john/3d/mesa
This should be the last change to compensate for the difference in getting the cvs from the cvs command and getting it from the tarballs.
5.Now we compile mesa, drm and dri:
{cd xc/xc/}
{make World >& world.log &}
This will save the output of th compile to a file called world.log in the current directory. If you want to watch the compile (I found this the easiest way to know that the compile finished) type:
{tail -f world.log}
When the compile is done hit CTRL+D to exit tail.
6.Check the compile for errors by typing:
{grep '\*\*\*' world.log}
If anything is displayed, you will have to go through world.log and try and trouble shoot your errors (I have no idea what errors you will run into, because this worked on the first try for me)
7.Now we install the files that we just built:
IF YOU ARE USING XFREE86 (this would be people with Fedora Core 1 installed (I haven't tested this so it may or may not work... thats why we made backups remember) simply type as root (i.e. use the su command to become root first):
{make install}
IF YOU ARE USING X.ORG (this is the Fedora Core 2 people) things are a little more complicated so here we go:
First we back up our old X server modules (as root... use su to become root):
{tar cfP /tmp/old-modules.tar /usr/X11R6/lib/modules}
Now we install our new 3d and 2d modules we just built (still as root):
{cp exports/lib/modules/dri/*.so /usr/X11R6/lib/modules/dri}
{cp exports/lib/modules/extensions/lib{glx,GLcore,dri}.a /usr/X11R6/lib/modules/extensions}
{cp exports/lib/modules/linux/libdrm.a /usr/X11R6/lib/modules/linux}
{cp exports/lib/modules/drivers/*_drv.o /usr/X11R6/lib/modules/drivers}
Now we back up Mesa and install the new files (still as root):
{tar cfP /tmp/old-mesa.tar /usr/X11R6/lib/*{GL,Mesa}*}
{cp exports/lib/*{GL,Mesa}* /usr/X11R6/lib}
{ldconfig}
This can be undone (if it doesn't work and only for the x.org method) by typing as root:
{tar xfP /tmp/old-modules.tar}
{tar xfP /tmp/old-mesa.tar}
{ldconfig}
8.Now we need to download the latest DRI kernel module snapshot from: http://www.freedesktop.org/~dri/snapshots/
At the time of writing the file we need is radeon-20040506-linux.i386.tar.bz2, but a new file is released everyday, so its probably best to get the latest file. Download the file to the 3d directory that you created.
9.Change to your 3d directory
{cd ~/3d/}
UnTar the file
{tar xjvf radeon-*-linux.i386.tar.bz2}
Change to the new directory
{cd ./dripkg}
as root run the installer
{./install.sh}
Now it will give you a warning about running the install while X is running, thats okay, just hit enter. The installer found all of my directories just fine so I just had to hit enter every time it told me to (you should to, unless you've done something funky to your system in which case you should now which folders to use).
10.Now its time to edit Xfree86Config or xorg.config (which ever one is in your /etc/X11/ directory) NOTE: You will need to be root to do this. So its su time again.
{cd /etc/X11/}
now open the appropriate file (Xfree86 for Fedora Core 1 and xorg.conf for Fedora Core 2) with your favorite text editor. For me this was:
{gedit /etc/X11/xorg.config}
First make sure that you are loading all the required modules in the “modules” section of the file. If they are not all there (as some of them probably aren't) you'll need to add the ones you are missing from the list below:
Load “GLcore”
Load “glx”
Load “dri”
Now change the video card section to optimize the card. Mine changed from:
Section "Device"
Identifier "Videocard0"
Driver "radeon"
VendorName "Videocard vendor"
BoardName "ATI Radeon (generic)"
EndSection
To:
Section "Device"
Identifier "Videocard0"
Driver "radeon”
VendorName "ATI"
BoardName "Radeon Mobility U2"
VideoRam 65536
BusID "PCI:1:5:0"
Option "AGPMode" "4"
Option "DPMS"
Option "AGPFastWrite" "On"
Option "EnablePageFlip" "On"
EndSection
Now all that should be left is to reboot your computer and enjoy your 3d acceleration.
Thanks to the people working on the DRI modules for one their work to support my chipset, and two the installation how to that I used as the basis for the DRI, DRM, Mesa install section. Also, I would like to thank the author of: http://users.telenet.be/ze5500 whose name I do not know, but his or her site pointed me in the right direction with this how to.
Also I would like to thank everyone on fedoraforum.org for pointing out the shortcoming of my how-to and helping me correct them.
NOTE: I only experienced a 300 fps jump in glxgears, but I can play tuxracer just fine.
NOTE: To play tuxracer your ~/.tuxracer/config file needs to be edited things that you need to change in it are
a. set the fullscreen resolution to 1024x768 (or the resolution you are running X at). (you may not have to do this, but I did)
b. there is a setting to remove the fog... the file says that this is for a RAGE 128, i needed to set this to true so the screen didn't look washed out.
CHANGE LOG:
May 25, 2004 -
Added change log.
Corrected typo (GLcore instead of Glcore).
Added notes to mitigate the differences between CVS and the CVS tarballs.

/ icon and title

message

2004-07-09T07:16:47