From 0a84e3f7801ac641983ea2c1711ac77b3113c6b6 Mon Sep 17 00:00:00 2001 From: gferg <> Date: Fri, 23 May 2003 15:08:33 +0000 Subject: [PATCH] updated --- .../docbook/SCSI-2.4-HOWTO/SCSI-2.4-HOWTO.xml | 149 ++++-- LDP/howto/docbook/SCSI-2.4-HOWTO/cdrom.eps | 4 +- LDP/howto/docbook/SCSI-2.4-HOWTO/ppscsi.eps | 4 +- .../docbook/SCSI-2.4-HOWTO/scsi-arch.eps | 14 +- .../docbook/SCSI-2.4-HOWTO/scsi-arch.fig | 28 +- .../docbook/XFree-Local-multi-user-HOWTO.xml | 496 ++++++++++++++---- 6 files changed, 538 insertions(+), 157 deletions(-) diff --git a/LDP/howto/docbook/SCSI-2.4-HOWTO/SCSI-2.4-HOWTO.xml b/LDP/howto/docbook/SCSI-2.4-HOWTO/SCSI-2.4-HOWTO.xml index ea6138be..e4177ec6 100644 --- a/LDP/howto/docbook/SCSI-2.4-HOWTO/SCSI-2.4-HOWTO.xml +++ b/LDP/howto/docbook/SCSI-2.4-HOWTO/SCSI-2.4-HOWTO.xml @@ -23,9 +23,18 @@ when this was a sgml document. - 2002-11-20 + 2003-05-04 + + 2.0 + 2003-05-04 + dpg + + lk2.4.20, linuxdoc->tldp, sATA and SAS, last sector on raw devs, + blockdev + + 1.9 2002-11-20 @@ -102,9 +111,9 @@ when this was a sgml document. - 2000 2001 2002 + 2003 Douglas Gilbert @@ -173,20 +182,20 @@ document has a lot of information on the adapter drivers. This document can be found in electronic form at - -www.linuxdoc.org/HOWTO/SCSI-2.4-HOWTO. + +www.tldp.org/HOWTO/SCSI-2.4-HOWTO. The home site and perhaps the most up to date version of this document can be found at www.torque.net/scsi/SCSI-2.4-HOWTO (this is 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 version is at www.torque.net/scsi/SCSI-2.4-HOWTO.ps). -This document was last altered on 20th November 2002. +This document was last altered on 4th May 2003. @@ -204,10 +213,10 @@ braces in the following diagram. - + - + 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 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 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 @@ -1238,10 +1247,10 @@ part: - + - + The architecture of the CD-ROM subsystem. @@ -1432,10 +1441,11 @@ Can write DVD-RAM: 0 0 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 -and cd players should also use the "sr" device. Strangely the +subsystem, then cdroms should be mounted via the "scd" device name +and cd players should also use the "scd" device. Strangely the hdparm command should still use the -/dev/hdd device file. +/dev/hdd device file (or the "echo ... > /proc/ide/hdd/settings" +method). In the linux 2.4 kernel series there has been an increase in problems when the ide-scsi driver is used so that cdrecord 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() is SG_IO which sends a SCSI command and waits for its response. See the Linux Documentation Project site: - -www.linuxdoc.org/HOWTO/SCSI-Generic-HOWTO/ + +www.tldp.org/HOWTO/SCSI-Generic-HOWTO/ for a full description of the sg driver. A (possibly later) version of this document can be found at @@ -1859,7 +1869,7 @@ hdx=ide-cdrom hdx=ide-floppy -[The term "hdx" is used +[The term hdx is used 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 see . @@ -1878,6 +1888,11 @@ I/O, unmasking irq's, etc) are available by using the hdparm -d1 /dev/hdx + +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. + Using cat /proc/ide/hdx/settings will show the available settings. 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: echo "log:1" > /proc/ide/hdx/settings +To turn off the "using_dma" flag use: + + echo "using_dma:0" > /proc/ide/hdx/settings + PPA + IMM @@ -1943,10 +1962,10 @@ common to all protocol 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 sg_dd command in the sg_utils package can access both raw and sg devices. + +Also note that if the physical device has an odd number of sectors (as +shown by blockdev --getsize /dev/raw/raw*), the last +sector will not be accessible using raw IO. + 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 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) -is included. Other improvements include "quick arbitration and selection" -and "read and write data streaming". Note that adapter 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 +is included. Other improvements include "quick arbitration and selection", +"read and write data streaming" and CRC protection for command blocks as well +as data (Ultra 160 had CRC protection for data only). Note that adapter +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 www.scsita.org. -One recent Ultra 320 HBA is claiming up to 50,000 IO operations per second -which implies per command SCSI bus overhead is less than 20 microseconds. -Evidently ULTRA 640 is coming as well. +Recently an Ultra 320 HBA vendor claimed up to 105,000 IO operations +per second which implies per command SCSI bus overhead is less than 10 +microseconds. There is a draft ULTRA 640 standard but that may be overtaken +by Serial Attached SCSI. + + +Serial Attached SCSI (SAS) + +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. FC-AL This stands for Fibre Channel - Arbitrated Loop and may involve dual 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 devices can be attached to a loop which in turn can be extended 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 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 -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). 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. @@ -2406,6 +2444,21 @@ relatively rare. +Serial ATA (sATA) + +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. + + + USB 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) drivers. Each item of the list is prefixed by the kernel version that it was introduced. + +This list has been compiled from the official 2.4 series kernels released +at www.kernel.org. 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. + [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 3.1.22 to 3.1.24 but this is not reflected in sg.h (supeficial).] + +[2.4.20] Support for highmem I/O added. Used by aic7xxx, +3w-xxxx, esp, megaraid, qlogicfc and sym53c8xx_2 LLDs. + + +[2.4.20] "blocking_open" boot time, module load time parameter added to st. + @@ -2790,6 +2861,13 @@ and outputs timing and throughput numbers on completion. Hence the time command and a calculator are not needed. +blockdev + +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 man blockdev. + + sg_dd This command is part of the sg_utils package (see @@ -3353,18 +3431,13 @@ if any of these links become stale. www.andante.org/scsi.html - -[W3] Jens Axboe maintains the cdrom subsystem which includes sr: -www.kernel.dk - - [W4] The author's scsi generic (sg) site is: www.torque.net/sg. The Linux Documentation Project's site includes the - -www.linuxdoc.org/HOWTO/SCSI-Generic-HOWTO/ . + +www.tldp.org/HOWTO/SCSI-Generic-HOWTO/ . A (possibly later) version of that document can be found at www.torque.net/sg/p/sg_v3_ho . @@ -3401,8 +3474,8 @@ the damaged media rescue program dd_rescue at this site: [W8] Linux Documentation Project (LDP): - -linuxdoc.org + +tldp.org @@ -3477,7 +3550,7 @@ of Linux (sg) and ASPI/ASPI32 as used by Windows. The author is grateful for the following contributions: -Kai Makisara (st) Kai.Makisara@metla.fi +Kai Mäkisara (st) Kai.Makisara@metla.fi Jens Axboe (sr) axboe@suse.de diff --git a/LDP/howto/docbook/SCSI-2.4-HOWTO/cdrom.eps b/LDP/howto/docbook/SCSI-2.4-HOWTO/cdrom.eps index d518757f..eb42cc5d 100644 --- a/LDP/howto/docbook/SCSI-2.4-HOWTO/cdrom.eps +++ b/LDP/howto/docbook/SCSI-2.4-HOWTO/cdrom.eps @@ -1,8 +1,8 @@ %!PS-Adobe-2.0 EPSF-2.0 %%Title: cdrom.fig %%Creator: fig2dev Version 3.2 Patchlevel 3d -%%CreationDate: Wed Nov 20 10:01:39 2002 -%%For: dougg@fred (Douglas Gilbert) +%%CreationDate: Fri May 2 10:16:56 2003 +%%For: dougg@frig.bingwo.com (Douglas Gilbert) %%BoundingBox: 0 0 393 267 %%Magnification: 1.0000 %%EndComments diff --git a/LDP/howto/docbook/SCSI-2.4-HOWTO/ppscsi.eps b/LDP/howto/docbook/SCSI-2.4-HOWTO/ppscsi.eps index ca25f0ba..36d7dcd5 100644 --- a/LDP/howto/docbook/SCSI-2.4-HOWTO/ppscsi.eps +++ b/LDP/howto/docbook/SCSI-2.4-HOWTO/ppscsi.eps @@ -1,8 +1,8 @@ %!PS-Adobe-2.0 EPSF-2.0 %%Title: ppscsi.fig %%Creator: fig2dev Version 3.2 Patchlevel 3d -%%CreationDate: Wed Nov 20 10:01:40 2002 -%%For: dougg@fred (Douglas Gilbert) +%%CreationDate: Fri May 2 10:16:56 2003 +%%For: dougg@frig.bingwo.com (Douglas Gilbert) %%BoundingBox: 0 0 202 177 %%Magnification: 1.0000 %%EndComments diff --git a/LDP/howto/docbook/SCSI-2.4-HOWTO/scsi-arch.eps b/LDP/howto/docbook/SCSI-2.4-HOWTO/scsi-arch.eps index e612e196..cadd455c 100644 --- a/LDP/howto/docbook/SCSI-2.4-HOWTO/scsi-arch.eps +++ b/LDP/howto/docbook/SCSI-2.4-HOWTO/scsi-arch.eps @@ -1,9 +1,9 @@ %!PS-Adobe-2.0 EPSF-2.0 %%Title: scsi-arch.fig %%Creator: fig2dev Version 3.2 Patchlevel 3d -%%CreationDate: Wed Nov 20 10:01:38 2002 -%%For: dougg@fred (Douglas Gilbert) -%%BoundingBox: 0 0 439 353 +%%CreationDate: Fri May 2 10:16:55 2003 +%%For: dougg@frig.bingwo.com (Douglas Gilbert) +%%BoundingBox: 0 0 439 355 %%Magnification: 1.0000 %%EndComments /$F2psDict 200 dict def @@ -45,7 +45,7 @@ $F2psDict /mtrx matrix put end 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 1 -1 scale @@ -132,9 +132,6 @@ $F2psBegin n 2175 1370 m 3604 1370 l 3604 2410 l 2175 2410 l cp gs col0 s gr /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 gs 1 -1 sc (block device) col0 sh gr /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 2700 1650 m 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 n 3799 1370 m 5229 1370 l 5229 2410 l 3799 2410 l cp gs col0 s gr diff --git a/LDP/howto/docbook/SCSI-2.4-HOWTO/scsi-arch.fig b/LDP/howto/docbook/SCSI-2.4-HOWTO/scsi-arch.fig index 9a29af8a..9c9bfcce 100644 --- a/LDP/howto/docbook/SCSI-2.4-HOWTO/scsi-arch.fig +++ b/LDP/howto/docbook/SCSI-2.4-HOWTO/scsi-arch.fig @@ -7,14 +7,14 @@ Letter Single -2 1200 2 -6 1200 525 8550 6450 +6 1200 450 8550 6450 6 2175 1350 3675 2475 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 -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 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 3750 1350 5250 2475 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 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 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 5400 1350 6900 2475 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 -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 150 1005 5700 2100 char device\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 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 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 1275 1725 1875 2175 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 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 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 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 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 @@ -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 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 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 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 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 @@ -81,17 +81,17 @@ Single 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 -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 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 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 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 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 195 1140 3900 1050 Kernel 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 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 405 1350 5700 level\001 -6 diff --git a/LDP/howto/docbook/XFree-Local-multi-user-HOWTO.xml b/LDP/howto/docbook/XFree-Local-multi-user-HOWTO.xml index ef387be5..0c8469e1 100644 --- a/LDP/howto/docbook/XFree-Local-multi-user-HOWTO.xml +++ b/LDP/howto/docbook/XFree-Local-multi-user-HOWTO.xml @@ -1,7 +1,6 @@ - - + @@ -18,6 +17,12 @@ May 2003 + + 1.0.2 + 2003-05-23 + SS + sync with bruby, new input agent, ... + 1.0.1 2003-05-14 @@ -202,7 +207,7 @@ information in case of problems. Andreas Schuldei andreas (at) schuldei.org - for providing Debian packages, comments about Debian, <grin> giving me the idea of using XFree with the event patches </grin> + for providing Debian packages, comments about Debian @@ -215,12 +220,10 @@ information in case of problems. email address : galia (at) st-peter.stw.uni-erlangen.de. - Before we begin - XFree configuration files 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. @@ -264,7 +267,6 @@ Currently the binary rpm packages are not mirrored and are only available from < Debian packages are also available thanks to Andreas Schuldei at http://www.schuldei.org/debian/bruby, or as apt repository "deb http://www.schuldei.org/debian/bruby ./ ". - Installing the kernel @@ -274,7 +276,7 @@ Currently the binary rpm packages are not mirrored and are only available from < Now it's time to install the kernel. 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. 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: http://startx.times.lv (or some of the mirrors) -> Documentation -> Quick Kernel. - (If you are new to Linux, reading The Linux Kernel HOWTO, http://tldp.org/HOWTO/Kernel-HOWTO.html, could be very heplful.) + (If you are new to Linux, reading The Linux Kernel HOWTO, http://tldp.org/HOWTO/Kernel-HOWTO.html, could be very helpful.) You can find binary kernel package for Mandrake-9.1 at http://varna.demon.co.uk/~svetlio/ruby-contrib/kernel.html. Debian binary kernel packages are available at http://www.schuldei.org/debian/bruby, or as apt repository "deb http://www.schuldei.org/debian/bruby ./ " @@ -323,6 +325,7 @@ USB support --> HID input layer support Support for frame buffer devices is not back-ported, and is disabled. + 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. Creating needed device files @@ -352,7 +355,7 @@ ln -s input/js1 js1 ln -s input/mice mouse If you use devfs, all required devices will be created automatically by devfs. - 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 devfs=mount to the append 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. + 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 devfs=mount to the append line of your boot loader and install devfsd (the devfs demon). Distributions that do not use devfs are Red Hat and SuSE. You can check whether devfs is used by issuing the following commands: @@ -415,6 +418,7 @@ isa0060/serio0/input0tells us that: Installing modified X server 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. + Why should a modified X server be used? - 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. 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: @@ -437,6 +441,19 @@ isa0060/serio0/input0tells us that: The new patch solves major problems for a number of graphic cards. Check the Video Compatibility list for details. + 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. + To enable this feature you have to add this to your XFree configuration file: + +Section "ServerFlags" +... +Option "PciOsConfig" "1" + ... +EndSection + + and to inform the kernel to filter unnecessary PCI commands: + [root@mc contrib]#echo "1"> /proc/bus/pci/hackvideo + If you want to disable this functionality you have to: + [root@mc contrib]# echo "0"> /proc/bus/pci/hackvideo Creating symbolic links @@ -975,49 +992,111 @@ N: Name="Logitech USB Keyboard" P: Phys=usb-00:10.1-1.1/input0 H: Handlers=kbd ..... + The P: Phys= field (the physical descriptor/address) consorts of: + + Bus type: usb + PCI function of the USB controller: 00:10.1 + USB device id: 1.1 + The string: /input + Interface number: 0 + - - Using hotplug with <filename>input.agent</filename> - Using the input agent will allow you to specify the way a keyboard with a given PHYS ID is assigned to a given VT. - From /etc/hotplug/input.agent (see Appendix->Scripts): - ...... -# 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" -...... + + Using hotplug with <filename>input.agent</filename> + Using the input agent will allow you to manage input devices based on their PHYS ID. + The input agent uses 3 configuration files: - - kbd_phys0 is the address of the keyboard bound to VT0 - The keyboard plugged in the first PS2 port will be bound to VT0 (tty0-tty7) - - - kbd_phys1 is the address of the keyboard bound to VT1 - The keyboard plugged in the second PS2 port will be bound to VT1 (tty8-tty15) - - - kbd_phys2 is the address of the keyboard bound to VT2 - The USB keyboard plugged in ??? will be bound to VT2 (tty16-tty23) - < 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. > - - - So if I wanted to use the PS2 keyboard for the primary Display and for the VGA console, I would have: - ...... -# Edit here Your keyboard physicaly names -# Read about Your keyboard /proc/bus/input/devices -kbd_phys0="isa0060/serio0/input0" -kbd_phys1="usb-00:10.1-1.1/input0" -...... + /etc/hotplug/kbd.conf + /etc/hotplug/mouse.conf + /etc/hotplug/event.conf + + + To configure the keyboards you have to adjust /etc/hotplug/kbd.conf + If I wanted to use the PS2 keyboard for the primary Display and for the VGA console, I would have: + +# +# keyboard configuration +# +# vt_name device_physicaly_location + +VT0 isa0060/serio0/input0 +VT1 usb-00:10.1-1.1/input0 + Or, if I want to use the USB keyboard for the primary Display and for the VGA console: - ...... -# Edit here Your keyboard physicaly names -# Read about Your keyboard /proc/bus/input/devices -kbd_phys0="usb-00:10.1-1.1/input0" -kbd_phys1="isa0060/serio0/input0" -...... - - + +# +# keyboard configuration +# +# vt_name device_physicaly_location + +VT0 usb-00:10.1-1.1/input0 +VT1 isa0060/serio0/input0 + + you could also use *.* instead of the pci function of the USB controller: + +# +# keyboard configuration +# +# vt_name device_physicaly_location + +VT0 usb-*.*-1.1/input0 +VT1 isa0060/serio0/input0 + + For mouse devices you have to edit /etc/hotplug/mouse.conf + +# +# mouse device configuration +# +# sym_link device_physicaly_location +mouse0br usb-00:10.1-1.2/input0 +mouse1br usb-*.*-2.7.*/input0 +mouse2br isa0060/serio1/* + + and adjust the XFree configuration file. + For the first mouse change + +...... + Option "Protocol" "IMPS/2" + Option "Device" "/dev/input/mouse0" + Option "ZAxisMapping" "4 5" +...... + + to : + +...... + Option "Protocol" "IMPS/2" + Option "Device" "/dev/input/mouse0br" + Option "ZAxisMapping" "4 5" +...... + + For the second mouse change + +...... + Option "Protocol" "IMPS/2" + Option "Device" "/dev/input/mouse1" + Option "ZAxisMapping" "4 5" +...... + + to : + +...... + Option "Protocol" "IMPS/2" + Option "Device" "/dev/input/mouse1br" + Option "ZAxisMapping" "4 5" +...... + + and so on. + For Event devices edit /etc/hotplug/event.conf + +# +# input event device config file +# +# symbolic_link device_physicaly_location +event0br isa0060/serio0/* +event1br isa0060/serio1/input0 +event2br usb-*.*-3/input0 + + and configure the applications which use them to use the symbolic links instead of the real devices Using XFree with event interface support @@ -1030,7 +1109,7 @@ kbd_phys1="isa0060/serio0/input0" 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. - in comparison with the previous input.agent, the ability to also manage the mice devices, and to use wild cards such as * and ?. + the ability to use wild cards such as * and ?. @@ -1076,11 +1155,11 @@ EndSection Option "XkbLayout" "dvorak" EndSection For Dev Name and Dev Phys, the wildcats ? and * 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 *. - + - - More about XFree with event interface support - Using the Dev Phys 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. + + Using the <quote>Phys</quote> descriptor and USB devices + Using the Phys descriptor of input devices simplifies a lot the configuration of input devices in XFree, especially when a bigger number of displays are used. 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 : 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. @@ -1123,9 +1202,120 @@ EndSection - - The examples below are for multiple XFree configuration files, if you use a single XFree configuration file you have to adjust the identifiers. - + Based on this we can bind all devices connected to a specified USB port to a given X server. + + ... with Input Agent + An example for a 4-user system using the Phys descriptor with Input Agent and USB input devices. + We'll use the vt[n] parameter when starting X and the following configuration file for the keyboards: + +# +# 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 + + For mouse devices the configuration file will look like this: + +# +# 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 + + 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 br to each of the mouse devices. + Change each /dev/input/mouse[n] to /dev/input/mouse[n]br. + For the first display: + +...... +# ********************************************************************** +# 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 +...... + + For the second display: + +...... +# ********************************************************************** +# 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 +...... + + and so on. + Or in case a single XFree configuration file is used: + +...... +# ********************************************************************** +# 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 +...... + + + + ... with XFree with event interface support + Using the Dev Phys 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. + The examples below are for multiple XFree configuration files, if you use a single XFree configuration file you have to adjust the identifiers. The configuration for the input devices for the 1st display would look something like this: Section "InputDevice" @@ -1204,6 +1394,7 @@ Section "InputDevice" Option "ZAxisMapping" "4 5" EndSection + @@ -1832,7 +2023,7 @@ your display manager will start a single X server with the corresponding XF86Con Recommended: disable. - RedHat 8.0/9, SuSE 8.1 - /bin/sysfont: + RedHat 8.0/9 - /bin/sysfont: You can use RedHat 7.3 consolechars instead. @@ -1985,7 +2176,6 @@ if [ $MACHINE = ppc -o $MACHINE = ppc64 ]; then Final words - You really got to the end? :) Or just used the link? :( Have some comments? Send them to Svetoslav Slavtchev, galia (at) st-peter.stw.uni-erlangen.de. Difficulty understanding the HOWTO? Some parts are not clear? Drop a line to the above address. Difficulty configuring your system to run multiple independent X sessions using this HOWTO? Send your problems to the email address above. @@ -3266,47 +3456,170 @@ handled=false + + Configuration files for Input Agent + + Keyboard configuration + /etc/hotplug/kbd.conf + # +# keyboard configuretion +# +# vt_name device_physicaly_location +VT0 usb-00:10.1-1.1/input0 +VT1 isa0060/serio0/input0 +#VT2 usb-*.*-1/input0 + + + Mouse configuration + /etc/hotplug/mouse.conf + # 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 + + + Event device configuration + /etc/hotplug/event.conf + # +# input event device config file +# +# symbolic_link device_physicaly_location +#event0br isa0060/serio0/* +#event0br isa0060/serio1/input0 +#event3br usb-*.*-1.3/* + + Scripts - <filename>input.agent</filename> - /etc/hotplug/input.agent - #!/bin/bash + <filename>input.agent</filename> + /etc/hotplug/input.agent + +/bin/sh # Please place this file /etc/hotplug # # input-specific hotplug policy agent. # # Kernel Input params are: -# +# # ACTION=add # PHYS=pysical location of device # NAME=Name of the device # # HISTORY: -# 05-APR-2003 Total simplificate because Andreas should not support end-user -# but Aivils Stoss does it. /proc manipulation added +# 07-MAY-2003 remake by Aivils Stoss +# /proc manipulation added +# parse kbd.conf event.conf mouse.conf. +# create necessary symbolic links # 28-SEP-2002 Initial version from Andreas Schuldei -# <andreas@schuldei.org> +# < andreas@schuldei.org > # - cd /etc/hotplug . hotplug.functions 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 mesg Bad input agent invocation exit 1 fi -declare device_phys device_name kbd_phys0 kbd_phys1 kbd_phys2 -device_phys="$PHYS" -device_name="$NAME" -# 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" +MATCHED=`grep -E 'Name|Phys|Handlers' /proc/bus/input/devices | \ + sed -n -e 's/^.*=//p' | paste -d"%" - - - | \ + grep $PHYS` + +#DEV_NAME=`echo "$MATCHED" | awk -F% '{print $1}'` +#DEV_PHYS=`echo "$MATCHED" | awk -F% '{print $2}'` +DEV_DRIVERS=`echo "$MATCHED" | awk -F% '{print $3}'` + +# 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? @@ -3314,27 +3627,22 @@ kbd_phys2="usb1:2/input0" case "$ACTION" in add) - if [[ $device_phys == $kbd_phys0 ]]; then - echo $kbd_phys0 > /proc/bus/console/00/keyboard - debug_mesg " Input device $NAME on $PHYS mapping to VT0" - return 0; - fi - if [[ $device_phys == $kbd_phys1 ]]; then - echo $kbd_phys1 > /proc/bus/console/01/keyboard - debug_mesg " Input device $NAME on $PHYS mapping to VT1" - return 0; - fi - if [[ $device_phys == $kbd_phys2 ]]; then - echo $kbd_phys2 > /proc/bus/console/02/keyboard - debug_mesg " Input device $NAME on $PHYS mapping to VT2" - return 0; - fi - debug_mesg " found no fitting VT" - return 2 + if [ -n "$DEV_KBD" ]; then + setup_kbd < $KBD_CONFIG + fi + if [ -n "$DEV_EVENT" ]; then + setup_event < $EVENT_CONFIG + fi + if [ -n "$DEV_MOUSE" ]; then + setup_mouse < $MOUSE_CONFIG + fi + ;; +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 ;;