My ohci adapter doesn't work on 2.4, so I can't tell if this is the 2.6
kernel, devfsd, or configuration related. There are two facts that make
hot swapping a USB mouse in X windows fail:
1) If a mouse is not detected at the start of X windows, that mouse will
not be checked for during the operation of X windows.
2) If a mouse is detected at the start of X windows, then the device
corresponding to that mouse cannot be released until X windows is stopped.
So when I start X windows without the mouse plugged in, and then try to
plug the mouse in, X windows will not even look at it, because it threw
away it's InputDevice section at startup. I can verify that it is
recognized by Linux proper because a /dev/input/mouse1 device will be
created and catting this device while moving the mouse will result in
junk on the screen.
But when I start X windows with the mouse, unplug it, and replug it in,
I get a different problem. What happens is that upon unplugging the
mouse, the /dev/input/mouse1 device will stay there, whereas unplugging
it outside of X windows results in its disappearance. So X windows is
still listening for input from /dev/input/mouse1. But when I replug in
the USB mouse, it doesn't attach to /dev/input/mouse1. Rather, it
creates a new device called /dev/input/mouse2. And X windows is not
looking at this.
I tried creating a third InputDevice section for X windows that points
to mouse2, but it discards the configuration at startup, and so won't
use it when it is plugged in.
I'd appreciate hearing from anyone who has experienced similar, or knows
if there is a way to work around this.
-Brandon
> 1) If a mouse is not detected at the start of X windows, that mouse will
> not be checked for during the operation of X windows.
> 2) If a mouse is detected at the start of X windows, then the device
> corresponding to that mouse cannot be released until X windows is stopped
Use /dev/input/mice, it multiplexes all mice found and exists even if no
device is currentrly available.
Under 2.6 I can "hot-plug" serial and PS2 mouse this way and use both at the
same time.
-andrey
Ok, that works. I knew about /dev/input/mice, but I didn't use it
because one mouse was PS/2 and the other was IMPS/2. But it appears to
figure things out on it's own. Thanks.
-Brandon
Andrey Borzenkov wrote:
>>1) If a mouse is not detected at the start of X windows, that mouse will
>>not be checked for during the operation of X windows.
>>2) If a mouse is detected at the start of X windows, then the device
>>corresponding to that mouse cannot be released until X windows is stopped
>>
>>
>
>Use /dev/input/mice, it multiplexes all mice found and exists even if no
>device is currentrly available.
>
>Under 2.6 I can "hot-plug" serial and PS2 mouse this way and use both at the
>same time.
>
>-andrey
>
> I'd appreciate hearing from anyone who has experienced similar, or knows
> if there is a way to work around this.
Either configure X to use /dev/input/mice and create /dev/input/mice if it doesn't exist using:
mknod /dev/input/mice c 13,63
or use the virtual ps/2 device.
John.