MultiMon - Multiple monitor Patches

Copyright (c) 1996 by Zach R. Amsden under the GNU public license.
Updated for kernel version 2.0.27 by Tom Lear <schizo@netcom.com>


NOTES:

This is a BETA release - there may be bugs or unimplemented features, and
I can take no responsibility for any damages to your computer.  This may
sound spooky, but it is just another part of legal hocus-pocus.  I am
solidly confident in the code, as it is working on my machine, and am just
as confident that it will work on other machine with standard VGA/mono
combinations.  However, I don't have the hardware to test other monitor
configurations, so there may be bugs with particular hardware.

The patches are against the 1.3.68 kernel console driver, and should work on
the latest kernels in the 66-70 series.

Ok, first of all, these patches do not work with a DEC PCI TGA card.
Hopefully soon they will. (as I said last time.  Now I have discovered that
this card is used only on Alpha chip platforms.  If anyone has any
information on how plug and play works on Alphas, or how this card works, I
would be greatly obliged).

There are no longer two distributed patches - you cannot ifdef this anymore.
My reasoning behind this is that it is pretty easy to back out of the patch
with .orig files.  So if you patch the code, you don't need to reconfigure
anymore (this makes CONFIG_MULTIMON kind of useless, but...)

FEATURES:

1) Multiple (not just dual) monitor support

2) Support for non-standard hardware

3) Fix for some non-compatible monochrome cards that can't hide cursor
properly (NEW)

4) Screen blanking working on all monitors (NEW)

5) Multiple, changeable (but not moveable) virtual consoles on each monitor

6) Cursor tracking - cursor appears only on current console (NEW)

7) Mouse support on all monitors

8) All terminal emulation types supported, gettys adjustable to provide
different numbers of consoles without recompiling.

9) Other monitors update while in X

10) Different monitors may have different console sizes


QUIRKS:

Known problems (these are very BAD, possibly not fixable from the kernel):

1) switching to another monitor from X blanks the monitor X was running on
(not kernel's fault - X does this, same problem with SVGAlib, so I am told)

2) DOS EMU blanks the monochrome screen unrecoverably

Known problems (not so BAD, probably fixable from the kernel):
1) Broken DEC TGA card support.  (Alpha systems)

Not problems (but would be nice if):
1) Need a method to move a console back and forth between monitors.  My
first attempt at this was somewhat succesful, even at different screen
sizes!!  I would like to generalize this to allow movement of any tty
device.  This could be used to recover lost incoming telnet sessions, or
lost x-terms, etc, as well as moving consoles between monitors.

Trouble:
If for any reason, the screen appears to be dead, but you can blindly log
in, please let me know the exact sequence of operations you did to achieve
this.  This happened to me a couple of times during developement of
MultiMon, but in all cases it could be corrected by switching to a different
VC on the monitor with problems, and then switching back to the problem VC.
I am pretty sure I have eradicated this bug, but if not please e-mail me.
Keep in mind, to fix it I will need to duplicate the problem on my system.
(It was a coding bug and had nothing to do with hardware or kernel version)


USING:
Untar the gzip'd tar file in a directory of its own

First, you have to patch the kernel code:

cp multimon.patch /usr/src/linux/drivers/char
patch < multimon.patch

If the patch fails, there are source files included in the tar file - you
can compare these to your kernel source, or use the .patch file to find the
differences.  If there are any .rej files in the directory, you know the
patch failed.  If the patch fails on 1.3.66 or higher, please contact me.

to use these patches, edit multimon.h for your configuration:
  1)  Set NUMBER_OF_MONITORS to the number of monitors you have
  2)  For each monitor, create the following set of defines:
  	(X is monitor number)
       #define monitor_X_type VIDEO_TYPE_VVVV
       #define monitor_X_base_port WWWW
       #define monitor_X_base_mem  XXXX
       #define monitor_X_first     Y
       #define monitor_X_last      Z
        VIDEO_TYPE_VVVV is a constant defined in include/linux/tty.h, which
	specifies the type of display you have. Common ones are:
	 VIDEO_TYPE_VGAC     vga, color
	 VIDEO_TYPE_VGAM     vga, mono
	 VIDEO_TYPE_EGAC     ega, color
	 VIDEO_TYPE_EGAM     ega, mono
	 VIDEO_TYPE_CGA      cga
	 VIDEO_TYPE_MDA      mono
	 if this is set to 0, the type will be autodetected by the kernel,
	 and will be equal to the type of the monitor your system boots on.
	 only one monitor can be autodetected - so far
	WWWW is the base i/o port for the video card - set to 0 for autodetect,
	 if you have a nonstandard card, set to the first i/o port it uses
	 this can be autodetected for any monitor
        XXXX is the base of video memory for the video card - set to 0 for
	 autodetect.  This can be autodetected for any monitor
        Y is the first virtual console for the monitor - for the primary
	 monitor, this must be 1
	Z is the last virtual console for the monitor - for the primary
         monitor, set this to 1
   3) set PRIMARY MONITOR to the number of the monitor you boot on -1
   4) If you have a standard VGA color monitor, and a standard monochrome
      card, you don't need to change any of these.
   5) The following video types do not work together:
      VGA and any VGA/EGA
      CGA and and CGA/mono
      EGA and any VGA
      but, one VGA/EGA will work with one CGA/mono
   6) Then, add getty's for the monitor /dev/tty devices
   7) Recompile, with make config, and answer yes to multiple monitor support
      (or under Character Devices in make menuconfig)
   8) Make zlilo (or whatever you use)
   9) Reboot
   
Problems or questions: for now e-mail me, but I will write up some good docs
on this soon to avoid having my mailbox overflow.

Bug reports: if you discover any insects lurking around in my code, please
e-mail me with the following: which kernel you are running, the contents of
your multimon.h, which version of multimon you are using, the kernel OOPS,
and any information present in your kernel log. (Especially the lines:
console: VGA+ or whatever, and the error).  If there is a bug somewhere that
doesn't crash the system, please describe the bug.  Thank you to all people
who used the first version of this code and provided input towards making
this a better project.

If you have trouble compiling the patches on your system, kernel 1.3.6x
series, please let me know.  Also, make sure you have a working kernel
before you try these - especially on kernels other than 1.3.68.


Zachary Amsden

E-mail:  amsden@andrew.cmu.edu
         root@deathstar.res.cmu.edu
