LinuxPPC & 3dfx (Last updated 04/01/2000-see red text)

NOTE : I wiil do an update of this page in the 2nd week of january. With latest XFree 4.02 and the corresponding patch given by Ani it looks like tdfx is finally working with acceleration and no glitch ! Stay tuned !
I finally got my 3dfx Voodoo3 2000 card working (with acceleration) under Linux on my macintosh, using XFree 4. Since it does not seem to easy to achieve that, I've put this little page for anyone who would had a 3dfx card and who would like to get it working.

If you have any remark about this page, if something said here does not work, please let me know by sending an email (mailto:Vincent.Favre-Nicolin@cryst.unige.ch) , and I'll modify the page accordingly. If you have a better working configuration (notably getting rid of the display glitch) please let me know !


Warning: You try everything written here on your own. It may initiate a nuclear reaction in your computer, who knows. All that I can say is that it did work on my computer. Playing with video drivers/configuration is reportedly among the most dangerous things with linux.

Notes

3D support: I'm only interested in 2D, so there is nothing about 3D (glide) here.

Questions: I'm definitly not a developper of 3dfx modules / kernel. So don't bother asking me technical questions. All I can do is say how I managed to get things working. For more tecnical points, see the linuxppc.org mailing lists.

My config (if that matters) : a macintosh 7300 with a G3/365 + a 3dfx Voodoo3 2000 card + a Formac ProRaid I UW SCSI card (used to boot linux).

Glitch with current 3dfx drivers : there are lines (black with green spots) which are slowly drawn, beginning at the top of the screen. Looks like some pointer is not behaving (?). This is not too much a problem, though, but you may find it irritating when you move windows around. The recent upgrade to XFree 4.02, and some fixes provided by Stefan Rottger should

Status of Xfree 4 port to ppc : the XFree pmac tree is maintained by Ani Joshi. The 4.02 tree has been posted in the last week of 2000, and you can get it by rsync on linuxppc.org. Tests will be reported on this page shortly.

Basics : You need three things to get your 3dfx card working : (1) a tdfx driver (only available from XFree 4), (2) kernel support for this driver, and (3) a working XF86Config file. So there are several ways to do it...
 

First option (old): XFree 3.3.6 + tdfx driver from XFree 3.9.16 + kernel

Use the (now old-more than one year ago) XFree 3.3.6 hack (a XFree driver 3.9.16 in fact) by Kostas Gewrgiou (the guy who did a large part of the 3dfx port to linuxppc), with a supplied kernel. You can find it all in his original message. The only problem that I had with the supplied kernel is that it did not have (unless I'm mistaken) ppp support. But it did work.

Second option: XFree 4 (with tdfx driver) + kernel 2.2

You can get XFree 4 by several ways (note: you need XFree 4 witha tdfx driver. Many XFree 4 packages do not include the development drivers):     Do not forget to link 'X' (in /etc/X11/) with /usr/X11R6/bin/XFree86. (Contrary to XFree 3.3, v4 only has one X server, and uses the appropriate modules -in our case tdfx_drv.o- from /usr/X11R6/lib/modules/drivers/).

You need also support for the kernel (without this you will have ghost effects, maybe weird colors, and uniform color areas in windows will not be drawn, resulting in transparent windows-only recommended for eye abuse %-).
    To achieve this, you can either:

Last option: XFree 4 (with tdfx driver) + kernel 2.4 (not working, but the future...)

    This should be the best way, with the newest tdfx driver in the kernel. Of course, 2.4 is still in the works so it is harder. To summarize, I haven't managed to get a working kernel. It does no mean that nobody has, though... (the XFree 4 part is the same as with 2.2)

 [Either I cannot compile, or I cannot boot : the program hangs after the 'early BootX console' ('arch:exit' being the last line). Since it does work using 'no video driver', I guess that something is screwed up in the tdfxfb (tdfx framebuffer) initialization for the console. It may be related to my using BootX, so yaboot users may have a better chance of getting it working.] See 'NEW' below.

    If you want to give it a try, get a 2.4 kernel source, and you can add the newest, official, 3dfx frambuffer driver which can be found here. The page says it works for ppc, so it should work. Well... it does not :
    NEW: I finally managed to boot in 2.4. Adding video settings 'video=tdfx:1024x780-8@60' as kernel options did the trick. Looks like the new kernel does not know how to choose a correct resolution for the console.... The bad point is that there is an obvious bug there : all characters are mirrored, ie the top of the character is at the bottom and vice-versa (Tux looks very weird, too)... Endianness has stricked again... So the 'new' tdfx framebuffer is not yet ready for ppc (the colors are right, though).

XF86Config

    The /etc/X11/XF86Config (or XF86Config-4, that one is loaded first if present by XFree 4)
    You can use either:     Once these automatically generated files work, you can change the modelines at your convenience (or re-use old modelines generated when you were not using the tdfx driver, but the 'no video driver' option). Again, be careful when doing that ! You can also change the default color depth. Note that 32 bit does not work for 3dfx (24 bit is fine, though).

    Note1: if you experience X server crashes, you can try changing the modelines, and you may also want to comment out some of the modules. In my case, the "v4l" (video for linux) module, activated by Xautoconfig, made my X server crash with 'signal 11'.

    Note2: if you experience the annoying 'respawn' of the X Server with Linuxppc (the server indefinetly tries to restart), then reboot (with ctrl-option-delete or sthg like that), and start by giving 'single' as kernel options. Then vi /etc/inittab and change the last lines to start in runlevel 3 instead of 5. Reboot and the X server will not be automatically started, so use Xautoconfig and 'startx' to test your XF86Config-4 file.

Last Word

None of the code used to make this work has any contribution from me. I guess we all have to thank, or send pepperoni pizza to all the people working on the tdfx kernel and XFree ppc port. If you have technical questions, the best choice to get answers is probably to go to the LinuxPPC.org mailing lists. Try a search first. But let me hear about your good or bad experience from this page.
 

    Voila. Hope that helps someone out there, in deep cyberspace...
 

This page created 12/12/2000.
Changes :
    * Added pre-compiled kernel for Linuxppc 2000 (old input layer).
    * Changed some info about linuxppc RPMs, and about the 'weird colors' if you do not have tdfx support in the kernel.
    * Added XFree 4 status note, kernel option for changing console resolution, info about Xautoconfig for SuSE users, finally booting in 2.4
    * Put information about 3dfx driver glitch more clearly.
    * Updated Xautoconfig usage. Added XF86Config configuration part.