This commit is contained in:
gferg 2003-05-23 15:08:33 +00:00
parent e7cfa804da
commit 0a84e3f780
6 changed files with 538 additions and 157 deletions

View File

@ -23,9 +23,18 @@ when this was a sgml document.
</affiliation> </affiliation>
</author> </author>
</authorgroup> </authorgroup>
<pubdate>2002-11-20</pubdate> <pubdate>2003-05-04</pubdate>
<revhistory> <revhistory>
<revision>
<revnumber>2.0</revnumber>
<date>2003-05-04</date>
<authorinitials>dpg</authorinitials>
<revremark>
lk2.4.20, linuxdoc->tldp, sATA and SAS, last sector on raw devs,
blockdev
</revremark>
</revision>
<revision> <revision>
<revnumber>1.9</revnumber> <revnumber>1.9</revnumber>
<date>2002-11-20</date> <date>2002-11-20</date>
@ -102,9 +111,9 @@ when this was a sgml document.
</revhistory> </revhistory>
<copyright> <copyright>
<year>2000</year>
<year>2001</year> <year>2001</year>
<year>2002</year> <year>2002</year>
<year>2003</year>
<holder>Douglas Gilbert</holder> <holder>Douglas Gilbert</holder>
</copyright> </copyright>
@ -173,20 +182,20 @@ document has a lot of information on the adapter drivers.
</para> </para>
<para> <para>
This document can be found in electronic form at This document can be found in electronic form at
<ulink url="http://www.linuxdoc.org/HOWTO/SCSI-2.4-HOWTO"> <ulink url="http://www.tldp.org/HOWTO/SCSI-2.4-HOWTO">
<literal>www.linuxdoc.org/HOWTO/SCSI-2.4-HOWTO</literal></ulink>. <literal>www.tldp.org/HOWTO/SCSI-2.4-HOWTO</literal></ulink>.
The home site and perhaps the most up to date version of this The home site and perhaps the most up to date version of this
document can be found at document can be found at
<ulink url="http://www.torque.net/scsi/SCSI-2.4-HOWTO"> <ulink url="http://www.torque.net/scsi/SCSI-2.4-HOWTO">
<literal>www.torque.net/scsi/SCSI-2.4-HOWTO</literal></ulink> (this is <literal>www.torque.net/scsi/SCSI-2.4-HOWTO</literal></ulink> (this is
the multi-page html version). the multi-page html version).
At that location this document is rendered in rtf, ps, pdf, a single At that location this document is rendered in txt, ps, pdf, a single
(long) page of html as well as multi-page html (e.g. the postscript (long) page of html as well as multi-page html (e.g. the postscript
version is at <ulink url="http://www.torque.net/scsi/SCSI-2.4-HOWTO.ps"> version is at <ulink url="http://www.torque.net/scsi/SCSI-2.4-HOWTO.ps">
<literal>www.torque.net/scsi/SCSI-2.4-HOWTO.ps</literal></ulink>). <literal>www.torque.net/scsi/SCSI-2.4-HOWTO.ps</literal></ulink>).
</para> </para>
<para> <para>
This document was last altered on 20th November 2002. This document was last altered on 4th May 2003.
</para> </para>
</chapter> </chapter>
@ -204,10 +213,10 @@ braces in the following diagram.
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="scsi-arch.eps" FORMAT="EPS"/> <imagedata fileref="scsi-arch.eps" format="EPS"/>
</imageobject> </imageobject>
<imageobject> <imageobject>
<imagedata fileref="scsi-arch.jpeg" FORMAT="JPG"/> <imagedata fileref="scsi-arch.jpg" format="JPG"/>
</imageobject> </imageobject>
<caption><para> <caption><para>
The 3 level driver architecture of the SCSI subsystem. The 3 level driver architecture of the SCSI subsystem.
@ -1030,7 +1039,7 @@ Either comma or colon can be delimiters for "scsihosts". This means that
<footnote> <footnote>
<para> <para>
Using "scsihosts" can lead to a situation in which the computer's BIOS finds Using "scsihosts" can lead to a situation in which the computer's BIOS finds
the boot track (and hence boot time parmeters set in lilo or grub) on one the boot track (and hence boot time parameters set in lilo or grub) on one
disk while the kernel finds the root partition on another disk. This can disk while the kernel finds the root partition on another disk. This can
be quite confusing when it is unplanned. Hence after changing (or adding) be quite confusing when it is unplanned. Hence after changing (or adding)
"scsihosts" in lilo or grub's configuration, it may be wise to boot the "scsihosts" in lilo or grub's configuration, it may be wise to boot the
@ -1238,10 +1247,10 @@ part:
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="cdrom.eps" FORMAT="EPS"/> <imagedata fileref="cdrom.eps" format="EPS"/>
</imageobject> </imageobject>
<imageobject> <imageobject>
<imagedata fileref="cdrom.jpeg" FORMAT="JPG"/> <imagedata fileref="cdrom.jpg" format="JPG"/>
</imageobject> </imageobject>
<caption><para> <caption><para>
The architecture of the CD-ROM subsystem. The architecture of the CD-ROM subsystem.
@ -1432,10 +1441,11 @@ Can write DVD-RAM: 0 0
</para> </para>
<para> <para>
Once an ATAPI cd writer at /dev/hdd has been registered by the SCSI Once an ATAPI cd writer at /dev/hdd has been registered by the SCSI
subsystem, then cdroms should be mounted via the "sr" device name subsystem, then cdroms should be mounted via the "scd" device name
and cd players should also use the "sr" device. Strangely the and cd players should also use the "scd" device. Strangely the
<command>hdparm</command> command should still use the <filename> <command>hdparm</command> command should still use the <filename>
/dev/hdd</filename> device file. /dev/hdd</filename> device file (or the "echo ... > /proc/ide/hdd/settings"
method).
<footnote><para> <footnote><para>
In the linux 2.4 kernel series there has been an increase in problems when In the linux 2.4 kernel series there has been an increase in problems when
the ide-scsi driver is used so that <command>cdrecord</command> can control the ide-scsi driver is used so that <command>cdrecord</command> can control
@ -1591,8 +1601,8 @@ The sg driver in lk 2.4 is "version 3" which adds an additional interface
structure and some new ioctl()s. The most interesting new ioctl() structure and some new ioctl()s. The most interesting new ioctl()
is SG_IO which sends a SCSI command and waits for its response. is SG_IO which sends a SCSI command and waits for its response.
See the Linux Documentation Project site: See the Linux Documentation Project site:
<ulink url="http://www.linuxdoc.org/HOWTO/SCSI-Generic-HOWTO/"> <ulink url="http://www.tldp.org/HOWTO/SCSI-Generic-HOWTO/">
<literal>www.linuxdoc.org/HOWTO/SCSI-Generic-HOWTO/</literal></ulink> <literal>www.tldp.org/HOWTO/SCSI-Generic-HOWTO/</literal></ulink>
for a full description of the sg driver. for a full description of the sg driver.
A (possibly later) version of this document can be found at A (possibly later) version of this document can be found at
<ulink url="http://www.torque.net/sg/p/sg_v3_ho.html"> <ulink url="http://www.torque.net/sg/p/sg_v3_ho.html">
@ -1859,7 +1869,7 @@ hdx=ide-cdrom
hdx=ide-floppy hdx=ide-floppy
</para></listitem> </para></listitem>
</itemizedlist> </itemizedlist>
[The term "hdx" is used [The term <emphasis>hdx</emphasis> is used
to refer to one of the IDE/ATA devices in {hda, hdb, hdc ...}.] to refer to one of the IDE/ATA devices in {hda, hdb, hdc ...}.]
In the 2.4 series "hdx=scsi" was added but it is not very useful, see In the 2.4 series "hdx=scsi" was added but it is not very useful, see
see <xref linkend="sratapi"/>. see <xref linkend="sratapi"/>.
@ -1878,6 +1888,11 @@ I/O, unmasking irq's, etc) are available by using the <filename>
<programlisting> <programlisting>
hdparm -d1 /dev/hdx hdparm -d1 /dev/hdx
</programlisting> </programlisting>
<footnote><para>
It has been reported that in some distributions the attempt
to use the hdparm command fails. In this case use the "echo ... >
/proc/ide/hdx/settings" form.
</para></footnote>
Using <command>cat /proc/ide/hdx/settings</command> will show the Using <command>cat /proc/ide/hdx/settings</command> will show the
available settings. available settings.
All the generic IDE driver settings will be available there, as well All the generic IDE driver settings will be available there, as well
@ -1907,6 +1922,10 @@ To enable/disable a specific settings, use something like:
<programlisting> <programlisting>
echo "log:1" > /proc/ide/hdx/settings echo "log:1" > /proc/ide/hdx/settings
</programlisting> </programlisting>
To turn off the "using_dma" flag use:
<programlisting>
echo "using_dma:0" > /proc/ide/hdx/settings
</programlisting>
</para> </para>
<formalpara><title>PPA + IMM</title> <formalpara><title>PPA + IMM</title>
@ -1943,10 +1962,10 @@ common to all protocol drivers.
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="ppscsi.eps" FORMAT="EPS"/> <imagedata fileref="ppscsi.eps" format="EPS"/>
</imageobject> </imageobject>
<imageobject> <imageobject>
<imagedata fileref="ppscsi.jpeg" FORMAT="JPG"/> <imagedata fileref="ppscsi.jpg" format="JPG"/>
</imageobject> </imageobject>
<caption><para> <caption><para>
The structure of the PPSCSI drivers. The structure of the PPSCSI drivers.
@ -2071,6 +2090,11 @@ to move data to and from "raw" devices as they meet the above-mentioned
block alignment requirements. Recent versions of the <command>sg_dd</command> block alignment requirements. Recent versions of the <command>sg_dd</command>
command in the sg_utils package can access both raw and sg devices. command in the sg_utils package can access both raw and sg devices.
</para> </para>
<para>
Also note that if the physical device has an odd number of sectors (as
shown by <command>blockdev --getsize /dev/raw/raw*</command>), the last
sector will not be accessible using raw IO.
</para>
<warning> <warning>
<para> <para>
If a block device is being accessed via a bound raw device and also via If a block device is being accessed via a bound raw device and also via
@ -2316,21 +2340,35 @@ are already on the market). This is also a 16 bit wide LVD bus that can
fall back to slower speeds for compatibility with older devices. It extends fall back to slower speeds for compatibility with older devices. It extends
the features of Ultra 160 by doubling the clock speed. Packetized SCSI the features of Ultra 160 by doubling the clock speed. Packetized SCSI
which sends commands and status at full bus speed (rather than 5 MB/sec) which sends commands and status at full bus speed (rather than 5 MB/sec)
is included. Other improvements include "quick arbitration and selection" is included. Other improvements include "quick arbitration and selection",
and "read and write data streaming". Note that adapter cards using 64 bit "read and write data streaming" and CRC protection for command blocks as well
PCI (or better: PCI-X) are required to stop the PCI bus being a bottleneck as data (Ultra 160 had CRC protection for data only). Note that adapter
at these speeds. More information can be found at cards using 64 bit PCI (or better: PCI-X) are required to stop the PCI bus
being a bottleneck at these speeds. More information can be found at
<ulink url="http://www.scsita.org"><literal>www.scsita.org</literal></ulink>. <ulink url="http://www.scsita.org"><literal>www.scsita.org</literal></ulink>.
One recent Ultra 320 HBA is claiming up to 50,000 IO operations per second Recently an Ultra 320 HBA vendor claimed up to 105,000 IO operations
which implies per command SCSI bus overhead is less than 20 microseconds. per second which implies per command SCSI bus overhead is less than 10
Evidently ULTRA 640 is coming as well. microseconds. There is a draft ULTRA 640 standard but that may be overtaken
by Serial Attached SCSI.
</para>
</formalpara>
<formalpara><title>Serial Attached SCSI (SAS)</title>
<para>
Serial Attached SCSI (SAS) uses the same transport technology as Serial
ATA (sATA) and extends it. [sATA is described below.] SAS can use external
expanders to control up to 4096 (?) devices from a single HBA circuit. The
data transfer is full duplex and 1.5 Gbps "phys"s can be aggregated to
increase bandwidth. Cable lengths can be up to 6 meters. SAS disks are
dual ported. sATA disks can be connected to a SAS HBA (but SAS disks can't
be connected to a sATA HBA). SAS was demonstrated at CeBit recently but
won't reach the market until 2004.
</para> </para>
</formalpara> </formalpara>
<formalpara><title>FC-AL</title> <formalpara><title>FC-AL</title>
<para> <para>
This stands for Fibre Channel - Arbitrated Loop and may involve dual This stands for Fibre Channel - Arbitrated Loop and may involve dual
2 Gigabit per second single mode fibre optic links spanning 10 2 Gigabit per second single mode fibre optic links spanning 10
kilometres with throughputs of up to 400 MegaBytes per second. kilometres with throughput of up to 400 MegaBytes per second.
Often associated with storage area networks (SANs). Up to 126 Often associated with storage area networks (SANs). Up to 126
devices can be attached to a loop which in turn can be extended devices can be attached to a loop which in turn can be extended
to 16 million devices in public loop mode. The transmission medium to 16 million devices in public loop mode. The transmission medium
@ -2346,7 +2384,7 @@ by Apple] and "iLink" [trademarked by Sony]. It is a serial bus that can run
at up to 400 Megabits/sec. It has a similar but more general architecture than at up to 400 Megabits/sec. It has a similar but more general architecture than
USB. The IEEE 1394 standard allows for the SCSI command set to be USB. The IEEE 1394 standard allows for the SCSI command set to be
carried over a 1394 bus. There is a "sbp2_1394" driver now available for carried over a 1394 bus. There is a "sbp2_1394" driver now available for
the Linux IEEE 1392 stack. This sbp2_1394 driver is also a SCSI subsystem the Linux IEEE 1394 stack. This sbp2_1394 driver is also a SCSI subsystem
lower level driver (so it is functionally similar to the ide-scsi driver). lower level driver (so it is functionally similar to the ide-scsi driver).
So IEEE 1394 devices that use the SBP-2 protocol (e.g. disks, cd-rw/dvd So IEEE 1394 devices that use the SBP-2 protocol (e.g. disks, cd-rw/dvd
drives, MO drives and scanners) can be accessed via the SCSI subsystem. drives, MO drives and scanners) can be accessed via the SCSI subsystem.
@ -2406,6 +2444,21 @@ relatively rare.
</para> </para>
</formalpara> </formalpara>
<formalpara><title>Serial ATA (sATA)</title>
<para>
Serial ATA uses 2 differential pairs to exchange data with a sATA
disk less than 1 metre away at 1.5 Gigabits per second. One pair takes data
to the disk and the other returns data from the disk. Data rates up to
150 Megabytes per second are possible (data transfer is half duplex).
sATA is a point to point connection, not a bus, so ATA's master and slave
strapping disappears. sATA cabling is less bulky and the form factor of
its plugs and sockets are smaller than parallel ATA (and the SCSI Parallel
interface). sATA devices are beginning to appear on the market. sATA-2
is a draft standard that doubles the serial data rate to 3 Gigabits per
second.
</para>
</formalpara>
<formalpara><title>USB</title> <formalpara><title>USB</title>
<para> <para>
Universal Serial Bus (USB) has a bandwidth of between 1.5 and 12 Universal Serial Bus (USB) has a bandwidth of between 1.5 and 12
@ -2552,6 +2605,17 @@ have been a significant number of changes as well as bug fixes. The
following list does not include changes to the lower level (adapter) following list does not include changes to the lower level (adapter)
drivers. Each item of the list is prefixed by the kernel version that drivers. Each item of the list is prefixed by the kernel version that
it was introduced. it was introduced.
<footnote><para>
This list has been compiled from the official 2.4 series kernels released
at <ulink url="http://www.kernel.org"> www.kernel.org</ulink>. Distributions
are free to tailor the official kernels and this may impact what is
supported (or changed) in the SCSI subsystem. For example this machine
reports this kernel: "2.4.18-27.8.0". So that is roughly based on the
official 2.4.18 kernel which the vendor has "modded" 27 times for the
"8.0" level of their distribution. As an example of the type of changes,
the aic7xxx driver in the official 2.4.18 does not support Adaptec's
Ultra 320 series of PCI adapters; however that vendor's version does.
</para></footnote>
<itemizedlist> <itemizedlist>
<listitem><para> <listitem><para>
[2.4.4] added the SCSI_IOCTL_GET_PCI ioctl(), [2.4.4] added the SCSI_IOCTL_GET_PCI ioctl(),
@ -2686,6 +2750,13 @@ error. Send warning to log/console.
[2.4.19] Zero out sg's buffers before use. [Sg version upgraded from [2.4.19] Zero out sg's buffers before use. [Sg version upgraded from
3.1.22 to 3.1.24 but this is not reflected in sg.h (supeficial).] 3.1.22 to 3.1.24 but this is not reflected in sg.h (supeficial).]
</para></listitem> </para></listitem>
<listitem><para>
[2.4.20] Support for highmem I/O added. Used by aic7xxx,
3w-xxxx, esp, megaraid, qlogicfc and sym53c8xx_2 LLDs.
</para></listitem>
<listitem><para>
[2.4.20] "blocking_open" boot time, module load time parameter added to st.
</para></listitem>
</itemizedlist> </itemizedlist>
</para> </para>
</sect1> </sect1>
@ -2790,6 +2861,13 @@ and outputs timing and throughput numbers on completion. Hence the
<command>time</command> command and a calculator are not needed. <command>time</command> command and a calculator are not needed.
</para> </para>
</formalpara> </formalpara>
<formalpara><title>blockdev</title>
<para>
Fetches the sector size, the number of sectors and read ahead status
of a block device (typically a disk). Can also be used to flush buffers
and reread the partition table. See <command>man blockdev</command>.
</para>
</formalpara>
<formalpara><title>sg_dd</title> <formalpara><title>sg_dd</title>
<para> <para>
This command is part of the sg_utils package (see This command is part of the sg_utils package (see
@ -3353,18 +3431,13 @@ if any of these links become stale.
<literal>www.andante.org/scsi.html</literal></ulink> <literal>www.andante.org/scsi.html</literal></ulink>
</para> </para>
<para> <para>
<anchor id="W3"/>
[W3] Jens Axboe maintains the cdrom subsystem which includes sr:
<ulink url="http://www.kernel.dk"><literal>www.kernel.dk</literal></ulink>
</para>
<para>
<anchor id="W4"/> <anchor id="W4"/>
[W4] The author's scsi generic (sg) site is: [W4] The author's scsi generic (sg) site is:
<ulink url="http://www.torque.net/sg"> <ulink url="http://www.torque.net/sg">
<literal>www.torque.net/sg</literal></ulink>. <literal>www.torque.net/sg</literal></ulink>.
The Linux Documentation Project's site includes the The Linux Documentation Project's site includes the
<ulink url="http://www.linuxdoc.org/HOWTO/SCSI-Generic-HOWTO/"> <ulink url="http://www.tldp.org/HOWTO/SCSI-Generic-HOWTO/">
<literal>www.linuxdoc.org/HOWTO/SCSI-Generic-HOWTO/</literal></ulink> . <literal>www.tldp.org/HOWTO/SCSI-Generic-HOWTO/</literal></ulink> .
A (possibly later) version of that document can be found at A (possibly later) version of that document can be found at
<ulink url="http://www.torque.net/sg/p/sg_v3_ho"> <ulink url="http://www.torque.net/sg/p/sg_v3_ho">
<literal>www.torque.net/sg/p/sg_v3_ho</literal></ulink> . <literal>www.torque.net/sg/p/sg_v3_ho</literal></ulink> .
@ -3401,8 +3474,8 @@ the damaged media rescue program <command>dd_rescue</command> at this site:
<para> <para>
<anchor id="W8"/> <anchor id="W8"/>
[W8] Linux Documentation Project (LDP): [W8] Linux Documentation Project (LDP):
<ulink url="http://linuxdoc.org"> <ulink url="http://tldp.org">
<literal>linuxdoc.org</literal></ulink> <literal>tldp.org</literal></ulink>
</para> </para>
<para> <para>
<anchor id="W9"/> <anchor id="W9"/>
@ -3477,7 +3550,7 @@ of Linux (sg) and ASPI/ASPI32 as used by Windows.
<para> <para>
The author is grateful for the following contributions: The author is grateful for the following contributions:
<itemizedlist> <itemizedlist>
<listitem><para>Kai Makisara (st) <email>Kai.Makisara@metla.fi</email> <listitem><para>Kai M&auml;kisara (st) <email>Kai.Makisara@metla.fi</email>
</para></listitem> </para></listitem>
<listitem><para>Jens Axboe (sr) <email>axboe@suse.de</email> <listitem><para>Jens Axboe (sr) <email>axboe@suse.de</email>
</para></listitem> </para></listitem>

View File

@ -1,8 +1,8 @@
%!PS-Adobe-2.0 EPSF-2.0 %!PS-Adobe-2.0 EPSF-2.0
%%Title: cdrom.fig %%Title: cdrom.fig
%%Creator: fig2dev Version 3.2 Patchlevel 3d %%Creator: fig2dev Version 3.2 Patchlevel 3d
%%CreationDate: Wed Nov 20 10:01:39 2002 %%CreationDate: Fri May 2 10:16:56 2003
%%For: dougg@fred (Douglas Gilbert) %%For: dougg@frig.bingwo.com (Douglas Gilbert)
%%BoundingBox: 0 0 393 267 %%BoundingBox: 0 0 393 267
%%Magnification: 1.0000 %%Magnification: 1.0000
%%EndComments %%EndComments

View File

@ -1,8 +1,8 @@
%!PS-Adobe-2.0 EPSF-2.0 %!PS-Adobe-2.0 EPSF-2.0
%%Title: ppscsi.fig %%Title: ppscsi.fig
%%Creator: fig2dev Version 3.2 Patchlevel 3d %%Creator: fig2dev Version 3.2 Patchlevel 3d
%%CreationDate: Wed Nov 20 10:01:40 2002 %%CreationDate: Fri May 2 10:16:56 2003
%%For: dougg@fred (Douglas Gilbert) %%For: dougg@frig.bingwo.com (Douglas Gilbert)
%%BoundingBox: 0 0 202 177 %%BoundingBox: 0 0 202 177
%%Magnification: 1.0000 %%Magnification: 1.0000
%%EndComments %%EndComments

View File

@ -1,9 +1,9 @@
%!PS-Adobe-2.0 EPSF-2.0 %!PS-Adobe-2.0 EPSF-2.0
%%Title: scsi-arch.fig %%Title: scsi-arch.fig
%%Creator: fig2dev Version 3.2 Patchlevel 3d %%Creator: fig2dev Version 3.2 Patchlevel 3d
%%CreationDate: Wed Nov 20 10:01:38 2002 %%CreationDate: Fri May 2 10:16:55 2003
%%For: dougg@fred (Douglas Gilbert) %%For: dougg@frig.bingwo.com (Douglas Gilbert)
%%BoundingBox: 0 0 439 353 %%BoundingBox: 0 0 439 355
%%Magnification: 1.0000 %%Magnification: 1.0000
%%EndComments %%EndComments
/$F2psDict 200 dict def /$F2psDict 200 dict def
@ -45,7 +45,7 @@ $F2psDict /mtrx matrix put
end end
save save
newpath 0 353 moveto 0 0 lineto 439 0 lineto 439 353 lineto closepath clip newpath newpath 0 355 moveto 0 0 lineto 439 0 lineto 439 355 lineto closepath clip newpath
-71.3 384.1 translate -71.3 384.1 translate
1 -1 scale 1 -1 scale
@ -132,9 +132,6 @@ $F2psBegin
n 2175 1370 m 3604 1370 l 3604 2410 l 2175 2410 l n 2175 1370 m 3604 1370 l 3604 2410 l 2175 2410 l
cp gs col0 s gr cp gs col0 s gr
/Times-Roman-iso ff 210.00 scf sf /Times-Roman-iso ff 210.00 scf sf
2400 2325 m
gs 1 -1 sc ({sr_mod.o}) col0 sh gr
/Times-Roman-iso ff 210.00 scf sf
2400 2100 m 2400 2100 m
gs 1 -1 sc (block device) col0 sh gr gs 1 -1 sc (block device) col0 sh gr
/Times-Roman-iso ff 210.00 scf sf /Times-Roman-iso ff 210.00 scf sf
@ -143,6 +140,9 @@ gs 1 -1 sc (disks) col0 sh gr
/Times-Roman-iso ff 225.00 scf sf /Times-Roman-iso ff 225.00 scf sf
2700 1650 m 2700 1650 m
gs 1 -1 sc (SD) col0 sh gr gs 1 -1 sc (SD) col0 sh gr
/Times-Roman-iso ff 210.00 scf sf
2400 2325 m
gs 1 -1 sc ({sd_mod.o}) col0 sh gr
% Polyline % Polyline
n 3799 1370 m 5229 1370 l 5229 2410 l 3799 2410 l n 3799 1370 m 5229 1370 l 5229 2410 l 3799 2410 l
cp gs col0 s gr cp gs col0 s gr

View File

@ -7,14 +7,14 @@ Letter
Single Single
-2 -2
1200 2 1200 2
6 1200 525 8550 6450 6 1200 450 8550 6450
6 2175 1350 3675 2475 6 2175 1350 3675 2475
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
2175 1370 3604 1370 3604 2410 2175 2410 2175 1370 2175 1370 3604 1370 3604 2410 2175 2410 2175 1370
4 0 0 50 0 0 14 0.0000 4 195 1005 2400 2325 {sr_mod.o}\001
4 0 0 50 0 0 14 0.0000 4 150 1080 2400 2100 block device\001 4 0 0 50 0 0 14 0.0000 4 150 1080 2400 2100 block device\001
4 0 0 50 0 0 14 0.0000 4 150 435 2625 1875 disks\001 4 0 0 50 0 0 14 0.0000 4 150 435 2625 1875 disks\001
4 0 0 50 0 0 15 0.0000 4 150 270 2700 1650 SD\001 4 0 0 50 0 0 15 0.0000 4 165 315 2700 1650 SD\001
4 0 0 50 0 0 14 0.0000 4 195 1035 2400 2325 {sd_mod.o}\001
-6 -6
6 3750 1350 5250 2475 6 3750 1350 5250 2475
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
@ -22,12 +22,12 @@ Single
4 0 0 50 0 0 14 0.0000 4 195 1005 4050 2325 {sr_mod.o}\001 4 0 0 50 0 0 14 0.0000 4 195 1005 4050 2325 {sr_mod.o}\001
4 0 0 50 0 0 14 0.0000 4 150 1080 4050 2100 block device\001 4 0 0 50 0 0 14 0.0000 4 150 1080 4050 2100 block device\001
4 0 0 50 0 0 14 0.0000 4 180 1110 3975 1875 cdroms/dvds\001 4 0 0 50 0 0 14 0.0000 4 180 1110 3975 1875 cdroms/dvds\001
4 0 0 50 0 0 15 0.0000 4 150 255 4350 1650 SR\001 4 0 0 50 0 0 15 0.0000 4 165 300 4350 1650 SR\001
-6 -6
6 5400 1350 6900 2475 6 5400 1350 6900 2475
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
5424 1370 6855 1370 6855 2410 5424 2410 5424 1370 5424 1370 6855 1370 6855 2410 5424 2410 5424 1370
4 0 0 50 0 0 15 0.0000 4 150 255 6000 1650 ST\001 4 0 0 50 0 0 15 0.0000 4 165 285 6000 1650 ST\001
4 0 0 50 0 0 14 0.0000 4 180 465 5925 1875 tapes\001 4 0 0 50 0 0 14 0.0000 4 180 465 5925 1875 tapes\001
4 0 0 50 0 0 14 0.0000 4 150 1005 5700 2100 char device\001 4 0 0 50 0 0 14 0.0000 4 150 1005 5700 2100 char device\001
4 0 0 50 0 0 14 0.0000 4 195 510 5925 2325 {st.o}\001 4 0 0 50 0 0 14 0.0000 4 195 510 5925 2325 {st.o}\001
@ -38,7 +38,7 @@ Single
4 0 0 50 0 0 14 0.0000 4 195 555 7500 2475 {sg.o}\001 4 0 0 50 0 0 14 0.0000 4 195 555 7500 2475 {sg.o}\001
4 0 0 50 0 0 14 0.0000 4 150 1005 7350 2250 char device\001 4 0 0 50 0 0 14 0.0000 4 150 1005 7350 2250 char device\001
4 0 0 50 0 0 14 0.0000 4 195 1095 7275 2025 pass through\001 4 0 0 50 0 0 14 0.0000 4 195 1095 7275 2025 pass through\001
4 0 0 50 0 0 15 0.0000 4 150 285 7650 1800 SG\001 4 0 0 50 0 0 15 0.0000 4 165 315 7650 1800 SG\001
-6 -6
6 1275 1725 1875 2175 6 1275 1725 1875 2175
4 0 0 50 0 0 14 0.0000 4 195 540 1275 1875 Upper\001 4 0 0 50 0 0 14 0.0000 4 195 540 1275 1875 Upper\001
@ -54,10 +54,10 @@ Single
4 0 0 50 0 0 14 0.0000 4 195 1155 4575 3825 unifying layer\001 4 0 0 50 0 0 14 0.0000 4 195 1155 4575 3825 unifying layer\001
4 0 0 50 0 0 14 0.0000 4 195 1170 4575 4050 {scsi_mod.o}\001 4 0 0 50 0 0 14 0.0000 4 195 1170 4575 4050 {scsi_mod.o}\001
4 0 0 50 0 0 14 0.0000 4 195 2745 3900 4275 scsi.[hc], hosts.[hc], constants.c\001 4 0 0 50 0 0 14 0.0000 4 195 2745 3900 4275 scsi.[hc], hosts.[hc], constants.c\001
4 0 0 50 0 0 15 0.0000 4 150 465 4950 3600 SCSI\001 4 0 0 50 0 0 15 0.0000 4 165 510 4950 3600 SCSI\001
-6 -6
6 5775 5025 7575 6450 6 5775 5025 7575 6450
6 5775 5025 7530 6390 6 5775 5025 7575 6450
2 2 0 1 0 7 50 0 20 0.000 0 0 -1 0 0 5 2 2 0 1 0 7 50 0 20 0.000 0 0 -1 0 0 5
6165 5415 7530 5415 7530 6390 6165 6390 6165 5415 6165 5415 7530 5415 7530 6390 6165 6390 6165 5415
2 2 0 1 0 7 50 0 20 0.000 0 0 -1 0 0 5 2 2 0 1 0 7 50 0 20 0.000 0 0 -1 0 0 5
@ -69,11 +69,11 @@ Single
4 0 0 50 0 0 14 0.0000 4 150 1275 5850 5325 Pseudo drivers\001 4 0 0 50 0 0 14 0.0000 4 150 1275 5850 5325 Pseudo drivers\001
4 0 0 50 0 0 14 0.0000 4 150 1110 5850 5550 for non SCSI\001 4 0 0 50 0 0 14 0.0000 4 150 1110 5850 5550 for non SCSI\001
4 0 0 50 0 0 14 0.0000 4 150 495 6000 5775 buses\001 4 0 0 50 0 0 14 0.0000 4 150 495 6000 5775 buses\001
4 0 0 50 0 0 14 0.0000 4 195 1170 5850 5925 (eg ide-scsi)\001 4 0 0 50 0 0 14 0.0000 4 195 1110 5850 5925 (eg ide-scsi)\001
-6 -6
-6 -6
6 2475 5025 4275 6450 6 2475 5025 4275 6450
6 2475 5025 4229 6390 6 2475 5025 4275 6450
2 2 0 1 0 7 50 0 20 0.000 0 0 -1 0 0 5 2 2 0 1 0 7 50 0 20 0.000 0 0 -1 0 0 5
2865 5415 4229 5415 4229 6390 2865 6390 2865 5415 2865 5415 4229 5415 4229 6390 2865 6390 2865 5415
2 2 0 1 0 7 50 0 20 0.000 0 0 -1 0 0 5 2 2 0 1 0 7 50 0 20 0.000 0 0 -1 0 0 5
@ -81,17 +81,17 @@ Single
2 2 0 1 0 7 50 0 20 0.000 0 0 -1 0 0 5 2 2 0 1 0 7 50 0 20 0.000 0 0 -1 0 0 5
2475 5025 3839 5025 3839 6000 2475 6000 2475 5025 2475 5025 3839 5025 3839 6000 2475 6000 2475 5025
-6 -6
6 2700 5100 3750 6000 6 2700 5100 3825 6000
4 0 0 50 0 0 14 0.0000 4 150 780 2700 5250 Host Bus\001 4 0 0 50 0 0 14 0.0000 4 150 780 2700 5250 Host Bus\001
4 0 0 50 0 0 14 0.0000 4 195 720 2700 5475 Adapter\001 4 0 0 50 0 0 14 0.0000 4 195 720 2700 5475 Adapter\001
4 0 0 50 0 0 14 0.0000 4 150 600 2775 5700 drivers\001 4 0 0 50 0 0 14 0.0000 4 150 600 2775 5700 drivers\001
4 0 0 50 0 0 13 0.0000 4 180 1005 2700 5925 (eg aic7xxx)\001 4 0 0 50 0 0 13 0.0000 4 195 1125 2700 5925 (eg aic7xxx)\001
-6 -6
-6 -6
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
1200 785 8479 785 1200 785 8479 785
4 0 0 50 0 0 15 0.0000 4 195 975 3900 675 User space\001 4 0 0 50 0 0 15 0.0000 4 225 1050 3900 675 User space\001
4 0 0 50 0 0 15 0.0000 4 195 1140 3900 1050 Kernel space\001 4 0 0 50 0 0 15 0.0000 4 225 1260 3900 1050 Kernel space\001
4 0 0 50 0 0 14 0.0000 4 150 585 1350 5400 Lower\001 4 0 0 50 0 0 14 0.0000 4 150 585 1350 5400 Lower\001
4 0 0 50 0 0 14 0.0000 4 150 405 1350 5700 level\001 4 0 0 50 0 0 14 0.0000 4 150 405 1350 5700 level\001
-6 -6

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://docbook.org/xml/4.2/docbookx.dtd" []>
"http://docbook.org/xml/4.1.2/docbookx.dtd" []>
<book id="index"> <book id="index">
<bookinfo> <bookinfo>
@ -18,6 +17,12 @@
<pubdate>May 2003</pubdate> <pubdate>May 2003</pubdate>
<!-- Most recent revision goes at the top; list in descending order --> <!-- Most recent revision goes at the top; list in descending order -->
<revhistory> <revhistory>
<revision>
<revnumber>1.0.2</revnumber>
<date>2003-05-23</date>
<authorinitials>SS</authorinitials>
<revremark> sync with bruby, new input agent, ... </revremark>
</revision>
<revision> <revision>
<revnumber>1.0.1</revnumber> <revnumber>1.0.1</revnumber>
<date>2003-05-14</date> <date>2003-05-14</date>
@ -202,7 +207,7 @@ information in case of problems.
</listitem> </listitem>
<listitem> <listitem>
<para>Andreas Schuldei <email>andreas (at) schuldei.org</email></para> <para>Andreas Schuldei <email>andreas (at) schuldei.org</email></para>
<para>for providing Debian packages, comments about Debian, &lt;grin&gt; giving me the idea of using XFree with the event patches &lt;/grin&gt; </para> <para>for providing Debian packages, comments about Debian</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</sect1> </sect1>
@ -215,12 +220,10 @@ information in case of problems.
email address : <email>galia (at) st-peter.stw.uni-erlangen.de</email>. email address : <email>galia (at) st-peter.stw.uni-erlangen.de</email>.
</para> </para>
</sect1> </sect1>
<!-- Translations -->
</chapter> </chapter>
<chapter id="before_begining"> <chapter id="before_begining">
<title>Before we begin</title> <title>Before we begin</title>
<para></para> <para></para>
<!-- -->
<sect1 id="xf_confs"> <sect1 id="xf_confs">
<title>XFree configuration files</title> <title>XFree configuration files</title>
<para>You should configure each of your video cards to work properly with a single X server, which is actually beyond the scope of this document. You should refer to the documentation that came with your distribution, but some general hints couldn't hurt.</para> <para>You should configure each of your video cards to work properly with a single X server, which is actually beyond the scope of this document. You should refer to the documentation that came with your distribution, but some general hints couldn't hurt.</para>
@ -264,7 +267,6 @@ Currently the binary rpm packages are not mirrored and are only available from <
</para> </para>
<para>Debian packages are also available thanks to Andreas Schuldei at <ulink url="http://www.schuldei.org/debian/bruby">http://www.schuldei.org/debian/bruby</ulink>, or as apt repository "deb http://www.schuldei.org/debian/bruby ./ ".</para> <para>Debian packages are also available thanks to Andreas Schuldei at <ulink url="http://www.schuldei.org/debian/bruby">http://www.schuldei.org/debian/bruby</ulink>, or as apt repository "deb http://www.schuldei.org/debian/bruby ./ ".</para>
</sect1> </sect1>
<!-- Translations -->
</chapter> </chapter>
<chapter id="kernel"> <chapter id="kernel">
<title>Installing the kernel</title> <title>Installing the kernel</title>
@ -274,7 +276,7 @@ Currently the binary rpm packages are not mirrored and are only available from <
<para>Now it's time to install the kernel.</para> <para>Now it's time to install the kernel.</para>
<para>The easiest way would be to pull an already prepared binary kernel; there are packages for some distributions (currently only Mandrake and Debian) or a source package, and rebuild it on your system.</para> <para>The easiest way would be to pull an already prepared binary kernel; there are packages for some distributions (currently only Mandrake and Debian) or a source package, and rebuild it on your system.</para>
<para>If for some reason you cannot use them or have problems using them you can also build your own kernel with the bruby patch, for more information how to do this visit the Backstreet Ruby page on building and installing the kernel: <ulink url="http://startx.times.lv">http://startx.times.lv</ulink> (or some of the mirrors) -&gt; Documentation -&gt; Quick Kernel.</para> <para>If for some reason you cannot use them or have problems using them you can also build your own kernel with the bruby patch, for more information how to do this visit the Backstreet Ruby page on building and installing the kernel: <ulink url="http://startx.times.lv">http://startx.times.lv</ulink> (or some of the mirrors) -&gt; Documentation -&gt; Quick Kernel.</para>
<para>(If you are new to Linux, reading <quote>The Linux Kernel HOWTO</quote>, <ulink url="http://tldp.org/HOWTO/Kernel-HOWTO.html">http://tldp.org/HOWTO/Kernel-HOWTO.html</ulink>, could be very heplful.)</para> <para>(If you are new to Linux, reading <quote>The Linux Kernel HOWTO</quote>, <ulink url="http://tldp.org/HOWTO/Kernel-HOWTO.html">http://tldp.org/HOWTO/Kernel-HOWTO.html</ulink>, could be very helpful.)</para>
<para>You can find binary kernel package for Mandrake-9.1 at <ulink url="http://varna.demon.co.uk/~svetlio/ruby-contrib/kernel.html">http://varna.demon.co.uk/~svetlio/ruby-contrib/kernel.html</ulink>.</para> <para>You can find binary kernel package for Mandrake-9.1 at <ulink url="http://varna.demon.co.uk/~svetlio/ruby-contrib/kernel.html">http://varna.demon.co.uk/~svetlio/ruby-contrib/kernel.html</ulink>.</para>
<para>Debian binary kernel packages are available at <ulink url="http://www.schuldei.org/debian/bruby">http://www.schuldei.org/debian/bruby</ulink>, or as apt repository "deb http://www.schuldei.org/debian/bruby ./ "</para> <para>Debian binary kernel packages are available at <ulink url="http://www.schuldei.org/debian/bruby">http://www.schuldei.org/debian/bruby</ulink>, or as apt repository "deb http://www.schuldei.org/debian/bruby ./ "</para>
</sect1> </sect1>
@ -323,6 +325,7 @@ USB support --&gt; HID input layer support
</orderedlist></para> </orderedlist></para>
<para></para> <para></para>
<para>Support for frame buffer devices is not back-ported, and is disabled.</para> <para>Support for frame buffer devices is not back-ported, and is disabled.</para>
<note><para>As Backstreet Ruby lacks framebuffer support, you will most certainly need separate graphic card for each display. You won't be able to use dual-headed card with single BusID for 2 independent displays, but it might be possible in case the card has different BusId's for the different heads.</para></note>
</sect1> </sect1>
<sect1 id="dev_files"> <sect1 id="dev_files">
<title>Creating needed device files</title> <title>Creating needed device files</title>
@ -352,7 +355,7 @@ ln -s input/js1 js1
ln -s input/mice mouse ln -s input/mice mouse
</programlisting> </programlisting>
<para>If you use devfs, all required devices will be created automatically by devfs.</para> <para>If you use devfs, all required devices will be created automatically by devfs.</para>
<para>Mandrake is an example of one distribution that uses devfs. Debian does not use devfs by default, but the kernel supports devfs; in order to activate devfs you have to add <quote>devfs=mount</quote> to the <quote>append</quote> line of your boot loader and install devfsd (the devfs demon). Distributions that do not use devfs are Red Hat and SuSE. Feedback on this is appreciated.</para> <para>Mandrake is an example of one distribution that uses devfs. Debian does not use devfs by default, but the kernel supports devfs; in order to activate devfs you have to add <quote>devfs=mount</quote> to the <quote>append</quote> line of your boot loader and install devfsd (the devfs demon). Distributions that do not use devfs are Red Hat and SuSE.</para>
<para>You can check whether devfs is used by issuing the following commands:</para> <para>You can check whether devfs is used by issuing the following commands:</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
@ -415,6 +418,7 @@ isa0060/serio0/input0</screen>tells us that:
<sect1 id="mod_x_server"> <sect1 id="mod_x_server">
<title>Installing modified X server</title> <title>Installing modified X server</title>
<note><para>For some video cards you can skip this part. Before installing the modified X server check the Video Compatibility list to determine whether you need one. Currently there are reports for working configurations without using a modified X server for Voodoo Graphics as primary and Voodoo3 or Nvidia TNT2 as secondary.</para></note> <note><para>For some video cards you can skip this part. Before installing the modified X server check the Video Compatibility list to determine whether you need one. Currently there are reports for working configurations without using a modified X server for Voodoo Graphics as primary and Voodoo3 or Nvidia TNT2 as secondary.</para></note>
<para><quote>Why should a modified X server be used?</quote> - The reason is that XFree is designed to serve a single user and this design requires a single X server to drive all available graphic cards. So when an unmodified X server starts, it disables access to graphic cards for other X servers. Hence we have to modify XFree to make it possible more then one X server to run at the same time.</para>
<para>You probably only need already-built binaries. If there are packages for your distribution you can install them. If not, you have 3 more possibilities:</para> <para>You probably only need already-built binaries. If there are packages for your distribution you can install them. If not, you have 3 more possibilities:</para>
<orderedlist> <orderedlist>
<listitem> <listitem>
@ -437,6 +441,19 @@ isa0060/serio0/input0</screen>tells us that:
</listitem> </listitem>
</orderedlist> </orderedlist>
<para>The new patch solves major problems for a number of graphic cards. Check the Video Compatibility list for details.</para> <para>The new patch solves major problems for a number of graphic cards. Check the Video Compatibility list for details.</para>
<para>This can also be done in the kernel, so the user doesn't need a modified X server, but rather can use the XFree packages that shipped with his distribution. The latest bruby patch includes the needed changes to the linux kernel.</para>
<para>To enable this feature you have to add this to your XFree configuration file:</para>
<programlisting>
Section "ServerFlags"
...
Option "PciOsConfig" "1"
...
EndSection
</programlisting>
<para> and to inform the kernel to filter unnecessary PCI commands:</para>
<screen>[root@mc contrib]#echo "1"> /proc/bus/pci/hackvideo</screen>
<para> If you want to disable this functionality you have to:</para>
<screen>[root@mc contrib]# echo "0"> /proc/bus/pci/hackvideo</screen>
</sect1> </sect1>
<sect1 id="sym_links"> <sect1 id="sym_links">
<title>Creating symbolic links</title> <title>Creating symbolic links</title>
@ -975,49 +992,111 @@ N: Name="Logitech USB Keyboard"
P: Phys=usb-00:10.1-1.1/input0 P: Phys=usb-00:10.1-1.1/input0
H: Handlers=kbd H: Handlers=kbd
.....</programlisting> .....</programlisting>
<para>The <quote>P: Phys=</quote> field (the physical descriptor/address) consorts of:</para>
<orderedlist>
<listitem><para>Bus type: <quote>usb</quote></para></listitem>
<listitem><para>PCI function of the USB controller: <quote>00:10.1</quote></para></listitem>
<listitem><para>USB device id: <quote>1.1</quote></para></listitem>
<listitem><para>The string: <quote>/input</quote></para></listitem>
<listitem><para>Interface number: <quote>0</quote></para></listitem>
</orderedlist>
</sect1> </sect1>
<sect1 id="tweak_input_devs-inputAgent"> <sect1 id="tweak_input_devs-inputAgent1">
<title>Using hotplug with <filename>input.agent</filename></title> <title>Using hotplug with <filename>input.agent</filename></title>
<para>Using the input agent will allow you to specify the way a keyboard with a given PHYS ID is assigned to a given VT. </para> <para>Using the input agent will allow you to manage input devices based on their PHYS ID. </para>
<para>From <filename>/etc/hotplug/input.agent</filename> (see Appendix-&gt;Scripts):</para> <para>The input agent uses 3 configuration files:
<programlisting>......
# Edit here Your keyboard physicaly names
# Read about Your keyboard /proc/bus/input/devices
kbd_phys0="isa0060/serio0/input0"
kbd_phys1="isa0060/serio1/input0"
kbd_phys2="usb1:2/input0"
......</programlisting>
<itemizedlist> <itemizedlist>
<listitem> <listitem><para><filename>/etc/hotplug/kbd.conf</filename></para></listitem>
<para>kbd_phys0 is the address of the keyboard bound to VT0</para> <listitem><para><filename>/etc/hotplug/mouse.conf</filename></para></listitem>
<para>The keyboard plugged in the first PS2 port will be bound to VT0 (tty0-tty7)</para> <listitem><para><filename>/etc/hotplug/event.conf</filename></para></listitem>
</listitem>
<listitem>
<para>kbd_phys1 is the address of the keyboard bound to VT1</para>
<para>The keyboard plugged in the second PS2 port will be bound to VT1 (tty8-tty15)</para>
</listitem>
<listitem>
<para>kbd_phys2 is the address of the keyboard bound to VT2</para>
<para>The USB keyboard plugged in ??? will be bound to VT2 (tty16-tty23)</para>
<para>&lt; FIX-ME usb1:2 comes from older version of Backstreet Ruby, with the current version you'll have something like "usb-00:10.1-1.1/input0", which means [bus type]=usb "-" [PCI function of the USB controller]=00:10.1 "-" [usb device id]=1.1 "/input" [interface number]=0. &gt;</para>
</listitem>
</itemizedlist> </itemizedlist>
<para>So if I wanted to use the PS2 keyboard for the primary Display and for the VGA console, I would have:</para> </para>
<programlisting>...... <para>To configure the keyboards you have to adjust <filename>/etc/hotplug/kbd.conf</filename></para>
# Edit here Your keyboard physicaly names <para>If I wanted to use the PS2 keyboard for the primary Display and for the VGA console, I would have:</para>
# Read about Your keyboard /proc/bus/input/devices <programlisting>
kbd_phys0="isa0060/serio0/input0" #
kbd_phys1="usb-00:10.1-1.1/input0" # keyboard configuration
......</programlisting> #
# vt_name device_physicaly_location
VT0 isa0060/serio0/input0
VT1 usb-00:10.1-1.1/input0
</programlisting>
<para>Or, if I want to use the USB keyboard for the primary Display and for the VGA console: </para> <para>Or, if I want to use the USB keyboard for the primary Display and for the VGA console: </para>
<programlisting>...... <programlisting>
# Edit here Your keyboard physicaly names #
# Read about Your keyboard /proc/bus/input/devices # keyboard configuration
kbd_phys0="usb-00:10.1-1.1/input0" #
kbd_phys1="isa0060/serio0/input0" # vt_name device_physicaly_location
......</programlisting>
<para><filename></filename></para> VT0 usb-00:10.1-1.1/input0
<para></para> VT1 isa0060/serio0/input0
</programlisting>
<para>you could also use <quote>*.*</quote> instead of the pci function of the USB controller:</para>
<programlisting>
#
# keyboard configuration
#
# vt_name device_physicaly_location
VT0 usb-*.*-1.1/input0
VT1 isa0060/serio0/input0
</programlisting>
<para>For mouse devices you have to edit <filename>/etc/hotplug/mouse.conf</filename></para>
<programlisting>
#
# mouse device configuration
#
# sym_link device_physicaly_location
mouse0br usb-00:10.1-1.2/input0
mouse1br usb-*.*-2.7.*/input0
mouse2br isa0060/serio1/*
</programlisting>
<para>and adjust the XFree configuration file.</para>
<para>For the first mouse change</para>
<programlisting>
......
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse0"
Option "ZAxisMapping" "4 5"
......
</programlisting>
<para>to :</para>
<programlisting>
......
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse0br"
Option "ZAxisMapping" "4 5"
......
</programlisting>
<para>For the second mouse change</para>
<programlisting>
......
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse1"
Option "ZAxisMapping" "4 5"
......
</programlisting>
<para>to :</para>
<programlisting>
......
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse1br"
Option "ZAxisMapping" "4 5"
......
</programlisting>
<para> and so on.</para>
<para>For Event devices edit <filename>/etc/hotplug/event.conf</filename></para>
<programlisting>
#
# input event device config file
#
# symbolic_link device_physicaly_location
event0br isa0060/serio0/*
event1br isa0060/serio1/input0
event2br usb-*.*-3/input0
</programlisting>
<para>and configure the applications which use them to use the symbolic links instead of the real devices</para>
</sect1> </sect1>
<sect1 id="tweak_input_devs-Xev1"> <sect1 id="tweak_input_devs-Xev1">
<title>Using XFree with event interface support</title> <title>Using XFree with event interface support</title>
@ -1030,7 +1109,7 @@ kbd_phys1="isa0060/serio0/input0"
<para>if you have input devices with the same names, to use them with the same Xserver/screen according to the USB port where you plug or re-plug them. </para> <para>if you have input devices with the same names, to use them with the same Xserver/screen according to the USB port where you plug or re-plug them. </para>
</listitem> </listitem>
<listitem> <listitem>
<para>in comparison with the previous input.agent, the ability to also manage the mice devices, and to use wild cards such as <quote>*</quote> and <quote>?</quote>.</para> <para> the ability to use wild cards such as <quote>*</quote> and <quote>?</quote>.</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<caution> <caution>
@ -1078,9 +1157,9 @@ EndSection</programlisting>
<para>For Dev Name and Dev Phys, the wildcats <quote>?</quote> and <quote>*</quote> work, you MUST have at least one of the two, if you have both then the device must match on both, a non-existent entry is the same as one consisting of <quote>*</quote>.</para> <para>For Dev Name and Dev Phys, the wildcats <quote>?</quote> and <quote>*</quote> work, you MUST have at least one of the two, if you have both then the device must match on both, a non-existent entry is the same as one consisting of <quote>*</quote>.</para>
</sect1> </sect1>
<sect1 id="tweak_input_devs-Xev2"> <sect1 id="tweak_input_devs-phys">
<title>More about XFree with event interface support</title> <title>Using the <quote>Phys</quote> descriptor and USB devices</title>
<para>Using the <quote>Dev Phys</quote> option of XFree with event device support simplifies a lot the configuration of input devices in XFree, especially when a bigger number of displays are used.</para> <para>Using the <quote>Phys</quote> descriptor of input devices simplifies a lot the configuration of input devices in XFree, especially when a bigger number of displays are used.</para>
<para>As USB devices are connecting in a tree form, you can really easy specify the way keyboard and mice devices are bound to a specified X display. You have to use one USB hub with number of ports equal(or bigger) to the number of the X displays, to this hub are connected smaller (2-4 port) hubs (or keyboards with integrated hub). To the first port of the smaller (integrated) hub are connected the keyboards, to the second the mice (in case there are free ports you can connect usb-audio devices to them :) ). This results in the following layout of the usb-id's in case the primary USB hub is the first USB device :</para> <para>As USB devices are connecting in a tree form, you can really easy specify the way keyboard and mice devices are bound to a specified X display. You have to use one USB hub with number of ports equal(or bigger) to the number of the X displays, to this hub are connected smaller (2-4 port) hubs (or keyboards with integrated hub). To the first port of the smaller (integrated) hub are connected the keyboards, to the second the mice (in case there are free ports you can connect usb-audio devices to them :) ). This results in the following layout of the usb-id's in case the primary USB hub is the first USB device :</para>
<note> <note>
<para>In the following explanations and examples I use for first device on the secondary(integrated) hub keyboard device because my keyboard is internally connected to the 1st port of the integrated hub. I assume this will apply for most of the keyboards with integrated hub, but in case the one you own uses different port you will have to make small adjustments.</para> <para>In the following explanations and examples I use for first device on the secondary(integrated) hub keyboard device because my keyboard is internally connected to the 1st port of the integrated hub. I assume this will apply for most of the keyboards with integrated hub, but in case the one you own uses different port you will have to make small adjustments.</para>
@ -1123,9 +1202,120 @@ EndSection</programlisting>
</itemizedlist> </itemizedlist>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<note> <para>Based on this we can bind all devices connected to a specified USB port to a given X server.</para>
<para>The examples below are for multiple XFree configuration files, if you use a single XFree configuration file you have to adjust the identifiers.</para> <sect2 id="tweak_input_devs-inputAgent2">
</note> <title>... with Input Agent</title>
<para>An example for a 4-user system using the <quote>Phys</quote> descriptor with Input Agent and USB input devices.</para>
<para>We'll use the <quote><command>vt[n]</command></quote> parameter when starting X and the following configuration file for the keyboards:</para>
<programlisting>
#
# keyboard configuration
#
# vt_name device_physicaly_location
VT0 usb-*.*-1.1.1/input0
VT1 usb-*.*-1.2.1/input0
VT2 usb-*.*-1.3.1/input0
VT3 usb-*.*-1.4.1/input0
</programlisting>
<para>For mouse devices the configuration file will look like this:</para>
<programlisting>
#
# mouse device configuration
#
# sym_link device_physicaly_location
mouse0br usb-*.*-1.1.2/input0
mouse1br usb-*.*-1.2.2/input0
mouse2br usb-*.*-1.3.2/input0
mouse3br usb-*.*-1.4.2/input0
</programlisting>
<para>and we have to adjust the XFree configuration files, so XFree uses the symbolic links instead of the actual devices. If you already configured independent mice you have only to append <quote>br</quote> to each of the mouse devices.</para>
<para>Change each <quote>/dev/input/mouse[n]</quote> to <quote>/dev/input/mouse[n]br</quote>.</para>
<para>For the first display:</para>
<programlisting>
......
# **********************************************************************
# Pointer section
# **********************************************************************
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse0br"
Option "ZAxisMapping" "4 5"
# ChordMiddle is an option for some 3-button Logitech mice
Option "Emulate3Buttons"
# Option "ChordMiddle"
EndSection
......
</programlisting>
<para>For the second display:</para>
<programlisting>
......
# **********************************************************************
# Pointer section
# **********************************************************************
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse1br"
Option "ZAxisMapping" "4 5"
# ChordMiddle is an option for some 3-button Logitech mice
Option "Emulate3Buttons"
# Option "ChordMiddle"
EndSection
......
</programlisting>
<para>and so on.</para>
<para>Or in case a single XFree configuration file is used:</para>
<programlisting>
......
# **********************************************************************
# Pointer section
# **********************************************************************
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse0br"
Option "ZAxisMapping" "4 5"
# ChordMiddle is an option for some 3-button Logitech mice
Option "Emulate3Buttons"
# Option "ChordMiddle"
EndSection
Section "InputDevice"
Identifier "Mouse2"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse1br"
Option "ZAxisMapping" "4 5"
# ChordMiddle is an option for some 3-button Logitech mice
Option "Emulate3Buttons"
# Option "ChordMiddle"
EndSection
......
</programlisting>
</sect2>
<sect2 id="tweak_input_devs-Xev2">
<title>... with XFree with event interface support</title>
<para>Using the <quote>Dev Phys</quote> option of XFree with event device support and USB input devices enables us to use almost identical configuration of the input devices for all X servers. The only difference will be in the part of the usb-id, which reflects the port of the primary USB hub.</para>
<note><para>The examples below are for multiple XFree configuration files, if you use a single XFree configuration file you have to adjust the identifiers.</para></note>
<para>The configuration for the input devices for the 1st display would look something like this:</para> <para>The configuration for the input devices for the 1st display would look something like this:</para>
<programlisting> <programlisting>
Section "InputDevice" Section "InputDevice"
@ -1204,6 +1394,7 @@ Section "InputDevice"
Option "ZAxisMapping" "4 5" Option "ZAxisMapping" "4 5"
EndSection EndSection
</programlisting> </programlisting>
</sect2>
</sect1> </sect1>
</chapter> </chapter>
<chapter id="dm_conf"> <chapter id="dm_conf">
@ -1832,7 +2023,7 @@ your display manager will start a single X server with the corresponding XF86Con
<para>Recommended: disable.</para> <para>Recommended: disable.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>RedHat 8.0/9, SuSE 8.1 - <filename>/bin/sysfont</filename>:</para> <para>RedHat 8.0/9 - <filename>/bin/sysfont</filename>:</para>
<para>You can use RedHat 7.3 <filename>consolechars</filename> instead.</para> <para>You can use RedHat 7.3 <filename>consolechars</filename> instead.</para>
</listitem> </listitem>
<listitem> <listitem>
@ -1985,7 +2176,6 @@ if [ $MACHINE = ppc -o $MACHINE = ppc64 ]; then
</chapter> </chapter>
<chapter id="final_words"> <chapter id="final_words">
<title>Final words</title> <title>Final words</title>
<para>You really got to the end? :) Or just used the link? :(</para>
<para>Have some comments? Send them to Svetoslav Slavtchev, <email>galia (at) st-peter.stw.uni-erlangen.de</email>.</para> <para>Have some comments? Send them to Svetoslav Slavtchev, <email>galia (at) st-peter.stw.uni-erlangen.de</email>.</para>
<para>Difficulty understanding the HOWTO? Some parts are not clear? Drop a line to the above address.</para> <para>Difficulty understanding the HOWTO? Some parts are not clear? Drop a line to the above address.</para>
<para>Difficulty configuring your system to run multiple independent X sessions using this HOWTO? Send your problems to the email address above.</para> <para>Difficulty configuring your system to run multiple independent X sessions using this HOWTO? Send your problems to the email address above.</para>
@ -3266,13 +3456,49 @@ handled=false
</programlisting> </programlisting>
</sect2> </sect2>
</sect1> </sect1>
<sect1 id="examples_hotplug">
<title>Configuration files for Input Agent</title>
<sect2>
<title>Keyboard configuration</title>
<para><filename>/etc/hotplug/kbd.conf</filename></para>
<programlisting>#
# keyboard configuretion
#
# vt_name device_physicaly_location
VT0 usb-00:10.1-1.1/input0
VT1 isa0060/serio0/input0
#VT2 usb-*.*-1/input0</programlisting>
</sect2>
<sect2>
<title>Mouse configuration</title>
<para><filename>/etc/hotplug/mouse.conf</filename></para>
<programlisting># mouse device configuration
#
# sym_link device_physicaly_location
mouse0br usb-00:10.1-1.2/input0
mouse2br usb-00:10.1-2.7.*/input0
mouse1br usb-00:10.1-2.2/input0</programlisting>
</sect2>
<sect2>
<title>Event device configuration</title>
<para><filename>/etc/hotplug/event.conf</filename></para>
<programlisting>#
# input event device config file
#
# symbolic_link device_physicaly_location
#event0br isa0060/serio0/*
#event0br isa0060/serio1/input0
#event3br usb-*.*-1.3/*</programlisting>
</sect2>
</sect1>
</appendix> </appendix>
<appendix id="scripts"> <appendix id="scripts">
<title>Scripts</title> <title>Scripts</title>
<sect1 id="scripts_input-agent"> <sect1 id="scripts_input-agent">
<title> <filename>input.agent</filename> </title> <title><filename>input.agent</filename></title>
<para> <filename>/etc/hotplug/input.agent</filename></para> <para><filename>/etc/hotplug/input.agent</filename></para>
<programlisting>#!/bin/bash <programlisting>
/bin/sh
# Please place this file /etc/hotplug # Please place this file /etc/hotplug
# #
# input-specific hotplug policy agent. # input-specific hotplug policy agent.
@ -3284,29 +3510,116 @@ handled=false
# NAME=Name of the device # NAME=Name of the device
# #
# HISTORY: # HISTORY:
# 05-APR-2003 Total simplificate because Andreas should not support end-user # 07-MAY-2003 remake by Aivils Stoss
# but Aivils Stoss does it. /proc manipulation added # /proc manipulation added
# parse kbd.conf event.conf mouse.conf.
# create necessary symbolic links
# 28-SEP-2002 Initial version from Andreas Schuldei # 28-SEP-2002 Initial version from Andreas Schuldei
# &lt;andreas@schuldei.org&gt; # < andreas@schuldei.org >
# #
cd /etc/hotplug cd /etc/hotplug
. hotplug.functions . hotplug.functions
DEBUG=yes export DEBUG DEBUG=yes export DEBUG
KBD_CONFIG="./kbd.conf"
EVENT_CONFIG="./event.conf"
MOUSE_CONFIG="./mouse.conf"
setup_kbd ()
{
while read VT_NUM PHYS_PATTERN NAME_PATTERN
do
if [ `echo "$VT_NUM" | grep "^#"` ]; then
continue;
fi
if [ `echo "$PHYS" | grep $PHYS_PATTERN 2>/dev/null` ]; then
VT=`echo "$VT_NUM" | sed 's/VT//' | awk '{printf "%02d", $0}'`
echo "$PHYS" > "/proc/bus/console/$VT/keyboard"
debug_mesg "Input device $NAME on $PHYS mapping to VT$VT"
return;
fi
done
debug_mesg "Found no fitting VT"
}
setup_event ()
{
while read SYM_LINK PHYS_PATTERN NAME_PATTERN
do
if [ `echo "$SYM_LINK" | grep "^#"` ]; then
continue;
fi
if [ `echo "$PHYS" | grep $PHYS_PATTERN 2>/dev/null` ]; then
case $ACTION in
add)
cd /dev/input
rm -f $SYM_LINK
ln -s $DEV_EVENT $SYM_LINK
debug_mesg "Input event device $NAME on $PHYS linked to $SYM_LINK"
;;
remove)
rm -f /dev/input/$SYM_LINK
debug_mesg "Input event device link $SYM_LINK removed"
;;
esac
return;
fi
done
debug_mesg "Found no fitting event device"
}
setup_mouse ()
{
while read SYM_LINK PHYS_PATTERN NAME_PATTERN
do
if [ `echo "$SYM_LINK" | grep "^#"` ]; then
continue;
fi
if [ `echo "$PHYS" | grep $PHYS_PATTERN 2>/dev/null` ]; then
case $ACTION in
add)
cd /dev/input
rm -f $SYM_LINK
ln -s $DEV_MOUSE $SYM_LINK
debug_mesg "Input mouse device $NAME on $PHYS linked to $SYM_LINK"
;;
remove)
rm -f /dev/input/$SYM_LINK
debug_mesg "Input mouse device link $SYM_LINK removed"
;;
esac
return;
fi
done
debug_mesg "Found no fitting mouse device"
}
if [ "$ACTION" = "" ]; then if [ "$ACTION" = "" ]; then
mesg Bad input agent invocation mesg Bad input agent invocation
exit 1 exit 1
fi fi
declare device_phys device_name kbd_phys0 kbd_phys1 kbd_phys2 MATCHED=`grep -E 'Name|Phys|Handlers' /proc/bus/input/devices | \
device_phys="$PHYS" sed -n -e 's/^.*=//p' | paste -d"%" - - - | \
device_name="$NAME" grep $PHYS`
# Edit here Your keyboard physicaly names
# Read about Your keyboard /proc/bus/input/devices #DEV_NAME=`echo "$MATCHED" | awk -F% '{print $1}'`
kbd_phys0="isa0060/serio0/input0" #DEV_PHYS=`echo "$MATCHED" | awk -F% '{print $2}'`
kbd_phys1="isa0060/serio1/input0" DEV_DRIVERS=`echo "$MATCHED" | awk -F% '{print $3}'`
kbd_phys2="usb1:2/input0"
# older grep do not support -o :-(
#DEV_EVENT=`echo $MATCHED | grep -oE event[0-9]+`
#DEV_MOUSE=`echo $MATCHED | grep -oE mouse[0-9]+`
#DEV_KBD=`echo $MATCHED | grep -o kbd`
DEV_EVENT=`echo $DEV_DRIVERS | \
awk -F" " '{for(n=1;$n;n=n+1) if($n ~ /event/) print $n}'`
DEV_MOUSE=`echo $DEV_DRIVERS | \
awk -F" " '{for(n=1;$n;n=n+1) if($n ~ /mouse/) print $n}'`
DEV_KBD=`echo $DEV_DRIVERS | \
awk -F" " '{for(n=1;$n;n=n+1) if($n ~ /kbd/) print $n}'`
# #
# What to do with this input device event? # What to do with this input device event?
@ -3314,27 +3627,22 @@ kbd_phys2="usb1:2/input0"
case "$ACTION" in case "$ACTION" in
add) add)
if [[ $device_phys == $kbd_phys0 ]]; then if [ -n "$DEV_KBD" ]; then
echo $kbd_phys0 &gt; /proc/bus/console/00/keyboard setup_kbd < $KBD_CONFIG
debug_mesg " Input device $NAME on $PHYS mapping to VT0"
return 0;
fi fi
if [[ $device_phys == $kbd_phys1 ]]; then if [ -n "$DEV_EVENT" ]; then
echo $kbd_phys1 &gt; /proc/bus/console/01/keyboard setup_event < $EVENT_CONFIG
debug_mesg " Input device $NAME on $PHYS mapping to VT1"
return 0;
fi fi
if [[ $device_phys == $kbd_phys2 ]]; then if [ -n "$DEV_MOUSE" ]; then
echo $kbd_phys2 &gt; /proc/bus/console/02/keyboard setup_mouse < $MOUSE_CONFIG
debug_mesg " Input device $NAME on $PHYS mapping to VT2"
return 0;
fi fi
debug_mesg " found no fitting VT"
return 2
;; ;;
remove)
#setup_event < $EVENT_CONFIG
#setup_mouse < $MOUSE_CONFIG
;;
*) *)
debug_mesg " Input '$ACTION' event not supported" debug_mesg "Input '$ACTION' event not supported"
return 1 return 1
;; ;;