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):
-
Compile it yourself (this is the best,
most secure, and recommended way):see this page
on linuxppc.org to see how to do it. You can get the most recent port of
XFree (4.01) by using Ani Joshi's XFree development tree (also explained
on that page). That's what I did.
-
Get it from SuSe 7.0 distribution. It's all in this
directory (well, use a mirror if you can). The most interesting part
should be in x1-3 and xsrv1. (not tried-but other people reports that SuSE
7.0 made 3dfx working out of the box)
-
Get it from linuxppc. The standard RPMs do not have the tdfx driver,
so maybe you can try these
ones (in the XF directory) Although I've not tried these, for linuxppc
users these may be the safer (and easier) choice, since SuSE has a quite
different directory layout. You can also find it there
using rpmfind. NOTE: I have not tried these
yet. I do not know if the XFree 4.02 rpms include all ppc fixes. So using
the 4.01 RPMS (also with rpmfind) may be safer. It may be hard to do this
an a old (linuxppc 2000) distribution, due to various package dependencies.
I suggest upgrading to halloween before... I'll test that soon...
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:
-
Compile your own kernel (aka the 'linux way'). I did that using these
instructions. and the corresponding files (you will need to apply part
of the patches by hand-some lines have been modified). If you are using
a 2.2.18-pre23 kernel, you may use these pre-patched
files, which should replace those in /usr/src/linux/drivers/video.
And don't forget to check '3dfx Voodoo3/Banshee' support when configuring
your kernel (that's in the console drivers section).
-
Use my 2.2.18-prev23 kernel.
(only tested with SuSE 7.0 so far- For LinuxPPC 2000
(february version) you can use that
kernel with the old input layer ) The tar.gz archive includes
the vmlinux, System.map and all modules. Not that uncompressing will directly
put modules in /lib/modules/2.2.18-pre23-4epmac. and System.map in /boot/System.map-2.2.18-pre23-4epmac.
I compiled it with default options,
plus 3dfx. The
only difference between the two kernels is the input layer.
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:
-
SaX (if you are using SuSe). See SuSe manual to see how to do this.
Hint: 3dfx cards are listed under the 'STB' manufacturer. Thus you can
select your Voodoo3 200 or 3000 card. Here are my
settings generated by SaX2.
-
Tom Rini's Xautoconfig(use
'Xautoconfig4'). This package reads the modelines from the console settings
and writes them to the /etc/XF86Config-4 file. If you want to use something
else than the default 640x480@60Hz in which the console boots, you can
use : fbset "1024x768-75" A list of default resolution &
frequencies is available in /etc/fb.modes. You can
also try passing to the kernel the option: "video=tdfx:1024x768-8@60" to
force a higher resolution. Once the console is in a satisfying mode,
run Xautoconfig and voila, you have a working XF86Config-4 file. Here are
my
settings generated by Xautoconfig4.(NOTE: for
SuSE PPC 7.0 users. Xautoconfig relies on packages kbdconfig and mouseconfig,
so you need to install these and run them before running Xautoconfig)
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.