Setup Internet/multimedia keyboard on Linux XFree86 4.3

Modify XkbModel option in /etc/X11/XF86Config-4
Check /etc/X11/xkb/rules/xfree86.lst for other models

Section "InputDevice"

    Identifier "Keyboard1"
    Driver      "Keyboard"
    Option "AutoRepeat"  "450 30"

    Option "XkbKeyCodes" "xfree86"
    Option "XkbRules" "xfree86"
#    Option "XkbModel" "logicordless"
#    Option "XkbModel" "logiinternet"
#    Option "XkbModel" "logiinetnav"        ---> XFree 4.2.x
    Option "XkbModel" "logiink"             ---> XFree 4.3
#    Option "XkbModel" "itouch"
    Option "XkbLayout" "us"

EndSection



Config of v4l (tv/radio) & lirc devices

Modify /etc/modules, my tv card is Winfast TV-2000 NTSC. You must modify card=?? tuner=?
according to
/usr/src/linux/Documentation/video4linux/bttv/CARDLIST
The bttv module is for bt-848/878  chip. Consult http://bytesex.org for info about other chips.
/etc/modules
bttv
lirc_gpio 
/etc/modules.conf
options bttv radio=1 card=34 tuner=2 gbuffers=4


Make sure /dev/radio is linked to /dev/v4l/radio0


Note that the lirc in Mandrake 9.1 doesn't work for me.  You have to compile your own and remove the /usr/lib/lirc*

$ ldd `which fftv` | grep lirc
        liblirc_client.so.0 => /usr/local/lib/liblirc_client.so.0 (0x4056f000)

Run lircd only if your LIRC works correctly.  If your lirc doesn't work and you start lircd, lircd will continously send garbage data to fftv and cause the GUI display of fttv to work incorrectly.

Kernel 2.6  and LIRC
  A kernel source built-in patch is here. Thanks to Flameeyes <dgp85 users.sf.net>. Run 'make menuconfig' and you will find the LIRC options in Drivers->Character device->Linux InfraRed Controller. If you have a Winfast-TV2000 XP and lirc doesn't  work for you, you probably need to replace drivers/char/lirc/lirc_gpio.c with this lirc_gpio.c  I bought my winfast-tv2000 in July 2002 and I need this modification for lirc 0.6.6. If you use devfs, the devfile is changed from 0 to lirc0. Here is what I added to /etc/rc.local:

if [ `uname -r | grep 2.6` ]; then
  modprobe bttv                     # Mandrake 9.2 refuses to load bbtv in /etc/modules
  modprobe lirc_gpio
  lircdev=/dev/lirc/lirc0
else
  lircdev=/dev/lirc/0
fi

if [ -c $lircdev ]; then
  /usr/local/sbin/lircd -d $lircdev
fi



Setup nVidia  TV-output (TwinView)

You have to install nVidia's own driver first. It is installed by default on Mandrake 9.x  powerpack.

Modify /etc/X11/XF86Config-4,  you must substitute 1024x768 with 1280x1024 if your resolution is 1280x1024.

Section "Device"
    Identifier "device1"
    VendorName "nVidia Corporation"
    BoardName "NVIDIA GeForce2 DDR (generic)"
    Driver "nvidia"
    Option "DPMS"
    Option "TwinView" "True"
    Option "TwinViewOrientation" "Clone"
    Option "TVStandard" "NTSC-M"
    Option "MetaModes" "1024x768,640x480; 640x480,640x480"
EndSection


Note that if you use (Mandrake 9.1 XFree4.3).  You cannot switch to 640x480 by pressing control-alt-+.
It's a bug in XFree86 4.3. Here is a patch

--- xc/programs/Xserver/hw/xfree86/common/xf86Cursor.c  2003-02-13 18:49:38.0000
00000 +0800
+++ xc/programs/Xserver/hw/xfree86/common/xf86Cursor.c.new      2003-07-28 22:30
:03.000000000 +0800
@@ -263,7 +263,7 @@
       mode = mode->next;
     else
       mode = mode->prev;
-  } while (mode != pScr->currentMode && !(mode->type & M_T_USERDEF));
+  } while (mode == pScr->currentMode && !(mode->type & M_T_USERDEF));

   (void)xf86SwitchMode(pScreen, mode);
 }



Setup nVidia TV-out (Two screens)

With two screens, you can watch the move and use the desktop at the same time, like theater-mode on the Windows.  It is also possible to use
"TwinViewOrientation" "RightOf" to do this, but it is not very convenient and has some side-effects.

Here is my XFree86Config-4 file

To display your movie player on TV. use

    export DISPLAY=:0.1
   It also has some side-effects. Xine playing & fftv in grab-mode doesn't work correctly. Logout-button of Gnome 2.4(Mandrake 9.2) desktop doesn't work.


Adjust the size/position of screen at 640x480 mode (fullscreen)

  1. Invoke  fftv  and switch to fullscreen (press 'f' key).  Or you can press control-alt-+ one or several times. Invoke 'xvidtune'.  Make sure your resolution is 640x480. 
  2. You can use 'Narrow' and others buttons to adjust the screen.You may test the result by click the 'Test' button; but for some LCD monitors,  this doesn't work; it only takes effect only after you  restart XFree86. 
  3. Press the 'Show' button and xvidtune will print the modline on the terminal you invoke it. Add the modeline to /etc/XF86Config-4.     Press Control-Alt-Backspace to restart.
Section "Monitor"
    Identifier "monitor1"
    VendorName "Generic"
    ModelName "1280x1024 @ 60 Hz"
    HorizSync 31.5-64.3
    VertRefresh 50-70

#    ModeLine "1280x1024"   108.00   1280 1328 1440 1688   1024 1025 1028 1066
     ModeLine "640x480"      25.20    640  656  752  808    480  490  492  525
EndSection