backstreet ruby
Q: Terminology troubles here?
Yes. I use abbreviation VT (Virtual Terminal) as bundle of VC (Virtual Console). Each VT has 16 VC. This one differ from standard Linux. Sorry, *nix veterans :)

Q: Warning: Unable to open initial console
Fixed since 23-SEP-2002. You should have at least one console driver into kernel.

Q: Why removed the Keyboard interface?
This is 2.5.X backport. Under 2.5.X special keyboard interface does not exist.

Q: How many keyboards will work simultaneously?
I tested this with three keyboards simultaneous: Two AT PS/2 and one USB.

Q: Where I can plug second PS/2 keyboard?
Unplug Your PS/2 mouse and plug keyboard instead.

Q: Allow Your i386 arch oriented drivers hot remove/replug?
Yes. Fixed since 24-OKT-2002.

Q: Perform removing automatic unregistering?
Not always - PS/2 mice and AT keyboards are not unregistered until a new device is plugged in. USB devices normal perform unregistering.

Q: What should happen if keyboard replugged under linux-ruby?
You get a disconnect for the old one and a connect for the new one. It might be the same keyboard, of course. PS/2 keyboard is not detected on hot correct assignment of input devices.

Q: What does /etc/hotplug/input.agent?
bound right keyboard with righ VT and create symbolic links for mouse and event devices. Mouse and event device files are assigned randomly depended from detecting order. input.agent create symbolic links, which depended only from device physicaly location and undepended from pluging/detecting order. input.agent use configuration files kbd.conf mouse.conf event.conf. All conf files should be placed into /etc/hotplug dir.

Q: Seems input.agent will not work?
input.agent will not work while /dev and /proc filesystems are not mounted. Input devices, which haves drivers compiled straight into kernel, call input.agent unsuccessful.

Q: How many USB keyboards should work independ?
Any number.

Q: Should work USBBP simultaneous with USB-HID keyboard?
BootProtocol shouldn't be used at all.

Q: Can I assign right VT with right keyboard?
Yes. Read about Your input devices in /proc/bus/input/devices .
Sample :
I: Bus=0011 Vendor=0001 Product=0002 Version=ab02
N: Name="AT Set 2 keyboard"
P: Phys=isa0060/serio0/input0
D: Drivers=kbd
B: EV=120002
B: KEY=41f9 fff9df20 efdfffdf ffefffff ffffffff fffffffe
B: LED=7
Command :
$ echo "isa0060/serio0/input0" > /proc/bus/console/00/keyboard
assign this keyboard with 1-st console under linux-ruby called VT0. Atomaticaly assigned VTs and keyboards names You can read with command
$ dmesg
keyboard.c AT Set 2 keyboard VT0 first VC 0
VT0 has "AT Set 2" keyboard and first Virtual Console number 0.

Q: How can i use /proc interface to assign VTs with keyboards?
/proc/bus/console is main dir.
Each VT has subdir
/proc/bus/console/00 is for VT0
Here only one entry
$ cat /proc/bus/console/00/keyboard
To get name of keyboard read /proc/bus/input/devices file.
root user can write into file and try reassign VT with other keyboard
root@bac$ echo "usb1:1/input0">/proc/bus/console/00/keyboard
root@bac$ cat /proc/bus/console/00/keyboard
After this VT0 has USB keyboard. VT previosly assigned with this keyboard now lost it. Read attempt get empty string
$ cat /proc/bus/console/01/keyboard
Trying assign VT with non-existing device
root@bac$ echo "blah-blah">/proc/bus/console/00/keyboard do not reassign any VT-keyboard pair.

Q: How can i configure which keyboard is associated with a given monitor/Xserver?
Unfortunatly right now it is not possibel to bind a given keybord to a distinct Xserver. But it you can work around this problem, if you understand how the VT - keyboard allocation works.
At boot time the kernel creates the specified number of VTs. One for the VGA text console, and one for each DUMB console, which are specified on the kernel boot promt or in your /etc/lilo.conf.
Then the kernel discovers the keyboards attached to your box and registers them with the imput layer. This process follows the same procedure every time and produces reproducabel results. You can look at the order in whitch the keyboards were registerd with the input layer in /proc/bus/input/devices. The ones with the lower event numbers are registerd before the ones with higher event numbers.
Count the numbers of keyboards you see there. You might be surprised to discover that there are more keyboards then you thought you had. Some USB (Multimedia) keyboards have several USB interfaces for the fancy extra buttons and some even split off curser keys or the keypad into an own interface.
The bad news is that the kernel right now assigns a VT to each keyboard that is registered and some valid keyboards might not get a VT, since they were used up by silly mulitmedia keys as keyboards. You might need to experiment a bit to find out which part of your multimedia keyboard is the part you want to use with a VT/X server.
But you can work around this by creating as many VTs as you see keyboards in your /proc/bus/input/devices.
Since we have a 'first come - first serve' situation, the first VT gets the first keyboard in the list, the second one the second keyboard (even if this is only the mulitmedia part), and so on. Now check which of these VTs got a real keyboard and start your Xservers only on those VTs.
You should activate the DUMB consoles with kernel command line parameter dumbcon=n , where n is number of DUMB devices you wish to have.
If you configure dumbcon=2 you get this layout:

VGA bound to /dev/tty1 - /dev/tty16
DUMB 1 bound to /dev/tty17 - /dev/tty17
DUMB 2 bound to /dev/tty18 - /dev/tty18

Q: How i can configure the X server to use a given keyboard?
You can configure your X display manager to start X servers on certain VTs (which in turn are associated with the keyboards). This is done in the /etc/X11/xdm/Xservers config file. How this works depends a little bit on your distribution. This is an example for redhat:

Please replace A:B:C with correct values for Your adapter (sample 1:0:0 for AGP video adaptrer)
:0 local /usr/X11R6/bin/X0 :0 -prefbusid A:B:C vt7
:1 local /usr/X11R6/bin/X1 :1 -xf86config X-2 -prefbusid A:B:C vt17
:2 local /usr/X11R6/bin/X2 :2 -xf86config X-3 -prefbusid A:B:C vt18

and here is an example for debian:

:0 local /usr/X11R6/bin/X0 :0 vt0 -xf86config XF86Config-0 -dpi 100 -nolisten tcp
:1 local /usr/X11R6/bin/X1 :1 vt8 -xf86config XF86Config-1 -dpi 100 -nolisten tcp

where X0,X1,X2 are symbolic links to the X binary:

$ ln -s /usr/X11R6/bin/XFree86 /usr/X11R6/bin/X0

This is necessary so several X servers can run in parallel.

Q: Does that mean that I have to start all X servers from one console?
Yes, you CAN start all X servers from one console (= Virtual terminal with eight virtual consoles) or also from a xterm of the first X server. This only works if you have patched your X server allready. Beter start 1-st X server and secondary run from xterm.
You could type this on the first text console:

Please replace A:B:C with correct values for Your adapter (sample 1:0:0 for AGP video adaptrer)
Alt-F1 $ sleep 30; startx -- :0 -prefbusid A:B:C vt7
Alt-F2 $ sleep 30; startx -- :1 -xf86config X-2nd -prefbusid A:B:C vt17
Alt-F3 $ startx -- :2 -xf86config X-3 -prefbusid A:B:C vt18

Here the parameter vtXX allows you to choose the correct /dev/tty - that means the right keyboard for your X server. The delay (sleep 30) allows you to switch to the next virtual console. If you start the second X server from an xterm this delay is not neccesary.

Q: How many X servers will work simultaneously?
Three Xservers work comfortablely, but I have not enough monitors to really check.

Q: AGP server restart will lead system hang up?
Usage of "2" (idea by Kim "kill" Lilliestiena) patch of xf86 helps. Usage of gdm helps. Edit line in gdm.conf like this AllwaysRestartServer=false . This may help until performed system halt or reboot. halt/reboot anyway stop AGP server and may lead system hung up.

Q: Ctrl-Alt-Fx show garbage on screen?
Realy. Press text mode VT sequence two times (Ctrl-Alt-Fx,Ctrl-F7,Ctrl-Alt-Fx). If You see garbage anyway, then check starting order of xf86 servers. 1-st must be started server over VGA. If You have BIOS primary video adater AGP, then You should start 1-st AGP server. GDM users can change xf86 server starting order in file gdm.conf. You may use command "consolechars -d" to restore VGA fonts.

Q: Is the second/third/... videocard initialized during boot?
In the current project state only one video card is incialized during boot. That is the VGA text console. So you should turn on the VGA text console in the kernel configuration. With my code it's impossible to use multiple VGA or framebuffer consoles. You will only get one VGA text console. Secondary video cards will be intitialized by the X servers.

Q: How will I know if there are any DUMB device consoles or not?
You will see only the VGA text console. The presence of the DUMB device are displayed in the dmesg output or can be tested by starting a X server on it:

$ startx -- vtXX

where XX is the /dev/ttyXX number.

Q: Why you are not using the 2.5.X-DJ kernel? I read that this features were already present in this kernel, but i don't know how to use it. :(
New console will not go in until 2.7.X.

Q: Support maintainers backstreet-ruby?
No. Busy, busy, busy!

Q: Where is the project mailing list?
I read the linuxconsole list Linuxconsole-dev info page

Send any questions, comments, bug reports to: Aivils Stoss <>