This text describes my successful attempt to eventually get the TV-Out feature of 3DFX Voodoo 3 3000 (PAL) (NTSC mostly covered too) working in a Linux environment using XFree 4.x X Window System. I've successfully configured the 800x600 mode -- And currently I am not interested in 640x480 -- hardware scaling rules in all cases I need the tv-out. All the information is based on my best knowledge but there might be some mistakes. In any case, THE ENTIRE RISK OF USING THIS INFORMATION IS WITH YOU, AND NO ONE ELSE IS LIABLE OF ANY PROBLEMS ENCOUNTERED. Please fix any mistakes, inaccuracies, writing errors, etc. you notice in this document. I was about to write briefly, but sorry due to limited resources I did not have time to write briefly (too much thinking ;). Well, browse through the text and skip all irrelevant parts to proceed... Tomi Ollila The first time I got the the tv-out working I was working w/ Linux kernel 2.4.3. Now I am redoing the work w/ Linux 2.4.4 and recording the steps in this document. Description of my system and software used is as follows: *** Update: latest try w/ kernel 2.4.7 using RedHat 7.2 RedHat 7.0 linux distribution (probably any distribution will do, since all of the needed software is compiled from packages that are not RH-packaged) (maybe if anything is important, are modutils-2.3.14-3 and kernel-headers-2.4.0-0.26) XFree-4.0.3. I don't see any reason anyone uses any older. HW acceleration of Voodoo3 3000 works out of the box with this. Also Windowed!!! lm_sensors-2.5.5: Get this or newer. I have not used any older. i2c-2.5.5: Probably 2.4.x -kernel distributions has recent enough version of i2c. Since I also have IOmega BUZ and it's (working) versions require i2c-old, I cannot use the one's kernel provided. Since I cannot say anything about not using this i2c as separate package I suggest you do the same and compile this also. *** Update: Some recent Linux distribution comes with all needed software *** already compiled (RedHat 7.2 is one of them). If using any of those, *** you can jump directly to step 3. I have used kgcc that comes in RedHat 7.0 -distribution to compile all stuff. Probably all other recent gcc -compilers will produce good results also: kgcc -v outputs: Reading specs from /usr/lib/gcc-lib/i386-glibc21-linux/egcs-2.91.66/specs gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) -- 1) The work starts w/ kernel compilation (or skip to step 2, I quess it will work w/ any recent 2.2 and 2.4 -kernels) # run make config, make menuconfig or make xconfig (I suggest 'xconfig') For sure you need kernel module support and /proc -filesystem support (XXX add more absolute requirements) Now I cannot say for sure, if following things needs to be compiled at kernel compilation time or does i2c-2.5.5 bring all these: character devices->i2c support->i2c support character devices->i2c support->i2c bit-banging interfaces (*) character devices->i2c support->i2c devices (**) character devices->/dev/agpart support character devices->Direct Rendering Manager (XFree86 DRI support) (+) character devices->3dfx banshee/Voodoo3+ make above as modules. (*) I already forgot why I wanted some special attention for this (**) It seems I never need this (+) Hmm, It seems I have compiled this as part of the kernel binary There is of course lot of other options you need to choose but these are probably the ones needed... # run make dep # run make bzImage # run make modules # run make modules_install (as root) # copy arch/i386/boot/bzImage to /boot/vmlinuz-2.4.4 (as root) # edit /etc/lilo.conf and run lilo (as root) 2) In order to (the most easiest way) compile separate i2c and lm_sensors -package, symlink your linux source tree to /usr/src/linux (unless it is there already) and do the following # tar zxvf i2c-2.5.5.tar.gz # cd i2c-2.5.5 # make # make install (as root) # cd .. # tar zxvf lm_sensors-2.5.5.tar.gz # cd lm_sensors-2.5.5 # make # make install (as root) # cd .. Now you have all necessary modules installed on the system (and /usr/local/bin/sensors and /usr/local/sbin/sensors-detect). But there is some configuration missing in order to activate the needed functionality of the modules... 3) Now, before going any further, let's take a look the modifications that is required in XFree86 -configuration so that X is ready for the tv-out functionality next time it is started. XFree86-4.x uses the configuration file /etc/X11/XF86Config-4. Older configuration files needed "ModeLine"s for all display resolutions that are needed, but XFree86 version 4 can figure out those by itself. But what it cannot figure out, are some special ModeLines that may be reguired in various cases... and this is one of these. For Voodoo 3 3000 TV out feature, special modelines are needed for the supported resolutions, 640x480 and 800x600 (there might be others but I don't know enough of the issue. In this document, I only activate the 800x600 mode. Make backup copy of your /etc/X11/XF86Config-4 in case you accidentally screw something up so you can then reuse the old file if this happens. Open /etc/X11/XF86Config-4 in your favourite editor and find line that contains `Section "Monitor"'. At the end of that section, just before line `EndSection', add the following lines: ModeLine "640x480PAL" 29.50 640 675 678 944 480 530 535 625 ModeLine "800x600PAL" 36.00 800 818 820 960 600 653 655 750 *** Update: for NTSC, add: ModeLine "640x480NTSC" 28.195793 640 656 658 784 480 520 525 600 ModeLine "800x600NTSC" 38.769241 800 812 814 880 600 646 649 735 (the lines above can be found in /usr/share/doc/lm_sensors-2.5.5/chips/bt869) Then, find lines that starts with something like: Section "Screen" Identifier "Screen0" Device "3Dfx Interactive, Inc.|Voodoo 3" Monitor "" DefaultDepth 16 ... Subsection "Display" Depth 16 # Modes "1024x768" "640x480" "800x600" "800x600PAL" #"400x300" Modes "1024x768" "800x600PAL" # "800x600NTSC" ... EndSubSection Make sure that `DefaultDepth' is set 16 (I don't know if any other works) Then you notice there my resolutions as `Modes' -lines. I have outcommented the first `Modes' -line so that testing is easier. You can do what you wish here, just make sure to add that `"800x600PAL"' -line there. Save the file and exit editor. 4) It's is time to reboot (with new kernel), that is the easiest way to continue. (Update: or restart X if you already have all support n kernel) 5) After rebooting, and X startup `lsmod' in my machine output following: Module Size Used by tdfx 54536 1 es1371 28500 0 ac97_codec 8808 0 [es1371] tdfx -module was loaded by X, and sound module by some RH -startup script. Now you could run /usr/local/sbin/sensors-detect (or /usr/sbin/sensors-detect) After that was run in my PII class -machine it suggested I add the following: to /etc/modules.conf alias char-major-89 i2c-dev to some startup script (I choose append to /etc/rc.local) # I2C adapter drivers /sbin/modprobe i2c-piix4 /sbin/modprobe i2c-voodoo3 # I2C chip drivers /sbin/modprobe w83781d /sbin/modprobe eeprom Let's now /sbin/modprobe -v i2c-voodoo3. Now I have: Module Size Used by i2c-voodoo3 3012 0 (unused) i2c-algo-bit 7796 2 [i2c-voodoo3] i2c-core 12844 0 [i2c-algo-bit] tdfx 54536 1 es1371 28500 0 ac97_codec 8808 0 [es1371] I think this is the only one of the above that is required for the task. (If that is not true, I'll revise this text and you never know I though such a thing) *** Update: i.e. If you don't want automatic module loading at startup *** (and perhaps write a script to make it go), only modprobing i2c-voodoo3 *** is needed upto now. Now, turn on your TV set (unless it is already open) and make sure it is getting (either s-video or composite... I personally have only tested composite) input from your voodoo3 card. Don't change any screen resolution just yet... You notice the tv set screen is still blank. Changing screen resolutions won't do any change on that, don't bother trying. So, how to continue from there. The answer was found looking through all the files that are found with zsh command line in lm_sensors dir: grep -i voodoo3 **/*(.) | less The file doc/chips/bt869 contains interesting information, with it and some other information I found somewhere else, don't remember either, I did: /sbin/modprobe -v bt869 (or insmod /lib/modules/2.x.x/misc/bt869) NOW! you should see some noise on your TV-Set screen. and `lsmod' returns (on my machine) Module Size Used by bt869 5392 0 (unused) i2c-voodoo3 3012 0 (unused) sensors 6140 0 [bt869] i2c-algo-bit 7796 2 [i2c-voodoo3] i2c-core 12844 0 [bt869 sensors i2c-algo-bit] tdfx 54536 1 es1371 28500 0 ac97_codec 8808 0 [es1371] If you now try to change mode to `800x600PAL' The noise pattern just changes. That's because there are various parameters for bt869 to make it operate in different systems. The configuration entries for bt869 live somewhere in `proc' filesystem and since it is so hard to remember, the following commands helps out: # find /proc -name "bt869*" -print In my system that output: /proc/sys/dev/sensors/bt869-i2c-0-44. Since the last few characters may be different on your system I'll use... # ls /proc/sys/dev/sensors/bt869* ... and this outputs: colorbars: Output colorbars instead of display data. Default `0'. depth: Display depth. Seems to be `16' on my system. half: No idea. Default `0'. ntsc: 1: use NTSC, 0: use PAL. Default: `1'. res; Screen resolution to use. Defaut: `640 480'. status: Outputs some status info I do not know what that is. For me, in order to get TV sync with incoming signal (or is it Voodoo3 that needs syncing), I first put colorbars on, and when I get colorbars visible I shut colorbars off -- and then I have part of my 1024x768 displayed on TV-screen. Normal WIMP screen doesn't look so nice, but games, pictures, etc. Looks just fine. And HW acceleration rules. Do the following to achieve this: # echo 1 > /proc/sys/dev/sensors/bt869*/colorbars # echo 0 > /proc/sys/dev/sensors/bt869*/ntsc # echo 800 600 > /proc/sys/dev/sensors/bt869*/res Press ctrl-alt-num_keypad_+ Now you should see vertical colorbars on your TV-Set # echo 0 > /proc/sys/dev/sensors/bt869*/colorbars Now (part of) your computer display should be visible on your TV-Set. ... Ok, I did just that... after ctrl-alt-num_keypad_+ I did not get synchronized colorbar output visible on my TV. So, at this time I re-did... # echo 1 > /proc/sys/dev/sensors/bt869*/colorbars ... and got colorbars, and ... # echo 0 > /proc/sys/dev/sensors/bt869*/colorbars ... got my computer display visible on my TV. *** Update: It seems, that just READING the colorbars -file when the *** TV-Output is not synchronised, is enough. i.e. executing... # cat /proc/sys/dev/sensors/bt869*/colorbars *** should do the trick. So, the summary of the commands required to make the TV Out working is below (and other required steps above are done): # /sbin/modprobe -v i2c-voodoo3 # /sbin/modprobe -v bt869 # echo 800 600 > /proc/sys/dev/sensors/bt869*/res # echo 0 > /proc/sys/dev/sensors/bt869*/ntsc # cat /proc/sys/dev/sensors/bt869*/colorbars (skip echo commands above to get NTSC 640x480 display): #EOF