# Group Input Output Hardware at the Kernel Level



## dkovacevic (Oct 14, 2012)

Currently, attaching multiple keyboards, mice and monitors has this result: mouse/keyboard input is all sent to the same session, and all attached monitors are "cloned".

Could the kernel be modified so that input / output devices are put into groups? For example, when the system is first started up, all io devices are in the "root" group. The root user creates a second group, then moves io hardware between the groups dynamically.

Rather than having one ttys file, each group would have a ttys file of its own.

X and xorg should not be handling multiple io devices- it is a crude hack to do things that way.

Each set of grouped hardware should have its own set of virtual terminals (again, multiple ttys files). 

Eventually, USB devices, sound devices, perhaps even network adapters could be done in this manner; for now, it would be amazing to see support for proper mouse, keyboard, and monitor grouping at the kernel level.

What would be involved in making these changes?


----------



## un_x (Nov 9, 2012)

I do not understand the basis for this post, i.e., be more clear on the problem that exists for you, and how your solution solves these problems.  You want every X-terminal to be a member of various groups that each have their own overlapping group access to hardware?  I can't imagine that.  What problem would that solve?  Why shouldn't Xwindow handle multiple I/O devices?  Seems like a nightmare to me.


----------



## un_x (Nov 9, 2012)

You should be attaching terminals to the Xserver, not multiple keybords and mice and monitors ... that's the short simple answer,


----------



## un_x (Nov 9, 2012)

It seems like you want 1 machine to function as numerous separate and independent yet co-existing machines, which would seem to be fairly useless and impossible.  Why not just use some old PCs as X-terminals?


----------



## dkovacevic (Jun 20, 2013)

un_x said:
			
		

> It seems like you want 1 machine to function as numerous separate and independent yet co-existing machines, which would seem to be fairly useless and impossible.  Why not just use some old PCs as X-terminals?



Consider a school, where the purchase of a single computer with two compatible video cards could serve four students simultaneously. Consider a home, where one computer could serve two people simultaneously with one video card (which is typical of desktops to have now).

This is not impossible. Just difficult. Currently, there are Linux systems that allow connecting multiple mice/keyboards/onitors to a single system which achieves this goal. However, this is not done at a low level; X (or some other component directly related to X) handles the hardware "splitting" in these systems.

My point is that it should not be necessary for X to be messing about with hardware. This should (or rather, I wish it could) be handled at a lower level, so that, for example, the console driver could accept multiple keyboards as separate input before X even comes into the picture.


----------



## wblock@ (Jun 21, 2013)

For a start, disable kbdmux(4) and multiple keyboards will appear as separate devices.  Setting up separate consoles could be useful, but I don't know if anyone has successfully done that.


----------



## mdhughes (Jun 21, 2013)

Take a look at this web page:
https://wiki.archlinux.org/index.php/Xorg_multiseat

We did this a lot back in the late 90's with SUN systems.  Hope this helps.


----------

