2001-12-11 21:20:38

by Jan Kasprzak

[permalink] [raw]
Subject: USB mouse disconnect/reconnect

Hello,

I have (maybe HW) problem w/ my USB mouse. From time to time,
the kernel thinks it was disconnected and then reconnected again,
altough nobody touched the cables.

It would be OK, but there is a problem: after the reconnect, it become
active as /dev/input/mouse1 instead of /dev/input/mouse0, and my
X server cannot (of course) find it.

The system is RH7.2, kernel 2.4.16, Athlon 850 (ABIT KT7).
Here is the dmesg output of the USB after boot:

usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.268 $ time 19:53:08 Dec 5 2001
usb-uhci.c: High bandwidth mode enabled
PCI: Found IRQ 10 for device 00:07.2
PCI: Sharing IRQ 10 with 00:07.3
PCI: Sharing IRQ 10 with 00:0b.0
usb-uhci.c: USB UHCI at I/O 0xd400, IRQ 10
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Found IRQ 10 for device 00:07.3
PCI: Sharing IRQ 10 with 00:07.2
PCI: Sharing IRQ 10 with 00:0b.0
usb-uhci.c: USB UHCI at I/O 0xd800, IRQ 10
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: v1.268:USB Universal Host Controller Interface driver
usb.c: registered new driver hid
hid-core.c: v1.8 Andreas Gal, Vojtech Pavlik <[email protected]>
hid-core.c: USB HID support drivers
mice: PS/2 mouse device common for all mice
hub.c: USB new device connect on bus2/1, assigned device number 2
input0: USB HID v1.00 Mouse [KYE Systems Genius USB Wheel Mouse ] on usb2:2.0
hub.c: USB new device connect on bus2/2, assigned device number 3
input1: USB HID v1.10 Keyboard [Chicony USB Keyboard] on usb2:3.0

And the disconnect/reconnect looks like this:

usb.c: USB disconnect on device 2
hub.c: USB new device connect on bus2/1, assigned device number 4
input0: USB HID v1.00 Mouse [KYE Systems Genius USB Wheel Mouse ] on usb2:4.0

Where the disconnect/reconnect come from, and why the mouse
changes its device number?

-Yenya

--
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Czech Linux Homepage: http://www.linux.cz/ |
Having your own personal custom language dialect might be tempting but it is
normally something only the lisp community do. (Alan Cox)


2001-12-11 21:41:28

by Johannes Erdfelt

[permalink] [raw]
Subject: Re: USB mouse disconnect/reconnect

On Tue, Dec 11, 2001, Jan Kasprzak <[email protected]> wrote:
> I have (maybe HW) problem w/ my USB mouse. From time to time,
> the kernel thinks it was disconnected and then reconnected again,
> altough nobody touched the cables.
>
> It would be OK, but there is a problem: after the reconnect, it become
> active as /dev/input/mouse1 instead of /dev/input/mouse0, and my
> X server cannot (of course) find it.
>
> The system is RH7.2, kernel 2.4.16, Athlon 850 (ABIT KT7).
> Here is the dmesg output of the USB after boot:
>
> usb.c: registered new driver usbdevfs
> usb.c: registered new driver hub
> usb-uhci.c: $Revision: 1.268 $ time 19:53:08 Dec 5 2001
> usb-uhci.c: High bandwidth mode enabled
> PCI: Found IRQ 10 for device 00:07.2
> PCI: Sharing IRQ 10 with 00:07.3
> PCI: Sharing IRQ 10 with 00:0b.0
> usb-uhci.c: USB UHCI at I/O 0xd400, IRQ 10
> usb-uhci.c: Detected 2 ports
> usb.c: new USB bus registered, assigned bus number 1
> hub.c: USB hub found
> hub.c: 2 ports detected
> PCI: Found IRQ 10 for device 00:07.3
> PCI: Sharing IRQ 10 with 00:07.2
> PCI: Sharing IRQ 10 with 00:0b.0
> usb-uhci.c: USB UHCI at I/O 0xd800, IRQ 10
> usb-uhci.c: Detected 2 ports
> usb.c: new USB bus registered, assigned bus number 2
> hub.c: USB hub found
> hub.c: 2 ports detected
> usb-uhci.c: v1.268:USB Universal Host Controller Interface driver
> usb.c: registered new driver hid
> hid-core.c: v1.8 Andreas Gal, Vojtech Pavlik <[email protected]>
> hid-core.c: USB HID support drivers
> mice: PS/2 mouse device common for all mice
> hub.c: USB new device connect on bus2/1, assigned device number 2
> input0: USB HID v1.00 Mouse [KYE Systems Genius USB Wheel Mouse ] on usb2:2.0
> hub.c: USB new device connect on bus2/2, assigned device number 3
> input1: USB HID v1.10 Keyboard [Chicony USB Keyboard] on usb2:3.0
>
> And the disconnect/reconnect looks like this:
>
> usb.c: USB disconnect on device 2
> hub.c: USB new device connect on bus2/1, assigned device number 4
> input0: USB HID v1.00 Mouse [KYE Systems Genius USB Wheel Mouse ] on usb2:4.0
>
> Where the disconnect/reconnect come from, and why the mouse
> changes its device number?

It may be because of a flaky cable. Are there any messages above that?

The device number changes because some process still has the first mouse
open, so it assigns it the next available unused device.

There's a shared mouse device as well you might find more to your
liking.

JE

2001-12-12 09:38:20

by Jan Kasprzak

[permalink] [raw]
Subject: Re: USB mouse disconnect/reconnect

Johannes Erdfelt wrote:
: It may be because of a flaky cable. Are there any messages above that?
:
No messages from USB (some HW csum failures from the eth0, but
nothing related to my mouse). But you may be right, the mouse is connected
via a 5m extension USB cable.

: The device number changes because some process still has the first mouse
: open, so it assigns it the next available unused device.
:
: There's a shared mouse device as well you might find more to your
: liking.

I'll look at it, thanks. Fortunately I do not use more than one
USB mouse (altough this is a dual-{head,keyboard,mouse} configuration,
the other mouse is on the PS/2 port).

-Y.

--
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Czech Linux Homepage: http://www.linux.cz/ |
Having your own personal custom language dialect might be tempting but it is
normally something only the lisp community do. (Alan Cox)

2001-12-12 16:26:13

by Johannes Erdfelt

[permalink] [raw]
Subject: Re: USB mouse disconnect/reconnect

On Wed, Dec 12, 2001, Jan Kasprzak <[email protected]> wrote:
> Johannes Erdfelt wrote:
> : It may be because of a flaky cable. Are there any messages above that?
> :
> No messages from USB (some HW csum failures from the eth0, but
> nothing related to my mouse). But you may be right, the mouse is connected
> via a 5m extension USB cable.

Is it an active extension cable?

JE

2001-12-12 16:30:03

by Jan Kasprzak

[permalink] [raw]
Subject: Re: USB mouse disconnect/reconnect

Johannes Erdfelt wrote:
: On Wed, Dec 12, 2001, Jan Kasprzak <[email protected]> wrote:
: > Johannes Erdfelt wrote:
: > : It may be because of a flaky cable. Are there any messages above that?
: > :
: > No messages from USB (some HW csum failures from the eth0, but
: > nothing related to my mouse). But you may be right, the mouse is connected
: > via a 5m extension USB cable.
:
: Is it an active extension cable?

No. Just a simple passive one.

-Y.

--
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Czech Linux Homepage: http://www.linux.cz/ |
Having your own personal custom language dialect might be tempting but it is
normally something only the lisp community do. (Alan Cox)

2001-12-12 16:48:44

by Johannes Erdfelt

[permalink] [raw]
Subject: Re: USB mouse disconnect/reconnect

On Wed, Dec 12, 2001, Jan Kasprzak <[email protected]> wrote:
> Johannes Erdfelt wrote:
> : On Wed, Dec 12, 2001, Jan Kasprzak <[email protected]> wrote:
> : > Johannes Erdfelt wrote:
> : > : It may be because of a flaky cable. Are there any messages above that?
> : > :
> : > No messages from USB (some HW csum failures from the eth0, but
> : > nothing related to my mouse). But you may be right, the mouse is connected
> : > via a 5m extension USB cable.
> :
> : Is it an active extension cable?
>
> No. Just a simple passive one.

There's your problem with disconnects. Those are illegal per the specs.

JE

2001-12-12 17:03:54

by Jan Kasprzak

[permalink] [raw]
Subject: Re: USB mouse disconnect/reconnect

[l-k removed from Cc:]

Johannes Erdfelt wrote:
:
: There's your problem with disconnects. Those are illegal per the specs.
:
What is the maximum length?

-Y.

--
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Czech Linux Homepage: http://www.linux.cz/ |
Having your own personal custom language dialect might be tempting but it is
normally something only the lisp community do. (Alan Cox)

2001-12-12 17:53:46

by Johannes Erdfelt

[permalink] [raw]
Subject: Re: USB mouse disconnect/reconnect

On Wed, Dec 12, 2001, Jan Kasprzak <[email protected]> wrote:
> [l-k removed from Cc:]
>
> Johannes Erdfelt wrote:
> :
> : There's your problem with disconnects. Those are illegal per the specs.
> :
> What is the maximum length?

I haven't looked at the spec lately, but I think 5 meters is the
maximum. You can go longer if you use an active cable which is
essentially a one port hub. It essentially acts as a repeater.

JE

2001-12-12 21:06:58

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: USB mouse disconnect/reconnect

On Wed, Dec 12, 2001 at 12:53:23PM -0500, Johannes Erdfelt wrote:
> On Wed, Dec 12, 2001, Jan Kasprzak <[email protected]> wrote:
> > [l-k removed from Cc:]
> >
> > Johannes Erdfelt wrote:
> > :
> > : There's your problem with disconnects. Those are illegal per the specs.
> > :
> > What is the maximum length?
>
> I haven't looked at the spec lately, but I think 5 meters is the
> maximum. You can go longer if you use an active cable which is
> essentially a one port hub. It essentially acts as a repeater.

The problem with active cables is that they are very problematic as
well. The device plugged in isn't visible to Linux until the cable
itself is unplugged and replugged into the computer. I haven't found out
why yet.

--
Vojtech Pavlik
SuSE Labs

2001-12-12 21:09:38

by Johannes Erdfelt

[permalink] [raw]
Subject: Re: USB mouse disconnect/reconnect

On Wed, Dec 12, 2001, Vojtech Pavlik <[email protected]> wrote:
> On Wed, Dec 12, 2001 at 12:53:23PM -0500, Johannes Erdfelt wrote:
> > On Wed, Dec 12, 2001, Jan Kasprzak <[email protected]> wrote:
> > > [l-k removed from Cc:]
> > >
> > > Johannes Erdfelt wrote:
> > > :
> > > : There's your problem with disconnects. Those are illegal per the specs.
> > > :
> > > What is the maximum length?
> >
> > I haven't looked at the spec lately, but I think 5 meters is the
> > maximum. You can go longer if you use an active cable which is
> > essentially a one port hub. It essentially acts as a repeater.
>
> The problem with active cables is that they are very problematic as
> well. The device plugged in isn't visible to Linux until the cable
> itself is unplugged and replugged into the computer. I haven't found out
> why yet.

That's weird. Sounds like a problem specific to that cable. It should
just look like a hub and act as one.

Including hot plugging.

JE

2001-12-12 21:11:38

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: USB mouse disconnect/reconnect

On Wed, Dec 12, 2001 at 04:09:19PM -0500, Johannes Erdfelt wrote:
> On Wed, Dec 12, 2001, Vojtech Pavlik <[email protected]> wrote:
> > On Wed, Dec 12, 2001 at 12:53:23PM -0500, Johannes Erdfelt wrote:
> > > On Wed, Dec 12, 2001, Jan Kasprzak <[email protected]> wrote:
> > > > [l-k removed from Cc:]
> > > >
> > > > Johannes Erdfelt wrote:
> > > > :
> > > > : There's your problem with disconnects. Those are illegal per the specs.
> > > > :
> > > > What is the maximum length?
> > >
> > > I haven't looked at the spec lately, but I think 5 meters is the
> > > maximum. You can go longer if you use an active cable which is
> > > essentially a one port hub. It essentially acts as a repeater.
> >
> > The problem with active cables is that they are very problematic as
> > well. The device plugged in isn't visible to Linux until the cable
> > itself is unplugged and replugged into the computer. I haven't found out
> > why yet.
>
> That's weird. Sounds like a problem specific to that cable. It should
> just look like a hub and act as one.
>
> Including hot plugging.

Most active extension cables don't look like hubs. They have the
electric part of the hub built in, but not the logic one. They're
invisible on the USB bus.

--
Vojtech Pavlik
SuSE Labs

2001-12-13 02:22:51

by watermodem

[permalink] [raw]
Subject: Re: USB mouse disconnect/reconnect

On a machine at work with a Logitech USB MouseMan+ and no extension
cable and a M$ usb keyboard I see the same thing. Machine is a
Dell with PII-400 and BX chipset.
Happens during the night when not in use.

Jan Kasprzak wrote:
>
> Johannes Erdfelt wrote:
> : It may be because of a flaky cable. Are there any messages above that?
> :
> No messages from USB (some HW csum failures from the eth0, but
> nothing related to my mouse). But you may be right, the mouse is connected
> via a 5m extension USB cable.
>
> : The device number changes because some process still has the first mouse
> : open, so it assigns it the next available unused device.
> :
> : There's a shared mouse device as well you might find more to your
> : liking.
>
> I'll look at it, thanks. Fortunately I do not use more than one
> USB mouse (altough this is a dual-{head,keyboard,mouse} configuration,
> the other mouse is on the PS/2 port).
>
> -Y.
>
> --
> | Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
> | GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
> | http://www.fi.muni.cz/~kas/ Czech Linux Homepage: http://www.linux.cz/ |
> Having your own personal custom language dialect might be tempting but it is
> normally something only the lisp community do. (Alan Cox)
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2001-12-13 08:07:16

by Peter Svensson

[permalink] [raw]
Subject: Re: USB mouse disconnect/reconnect

On Wed, 12 Dec 2001, Vojtech Pavlik wrote:

> Most active extension cables don't look like hubs. They have the
> electric part of the hub built in, but not the logic one. They're
> invisible on the USB bus.

The ones I have seen do act as a hub, and are visible from the host
computer.

Peter
--
Peter Svensson ! Pgp key available by finger, fingerprint:
<[email protected]> ! 8A E9 20 98 C1 FF 43 E3 07 FD B9 0A 80 72 70 AF
------------------------------------------------------------------------
Remember, Luke, your source will be with you... always...


2001-12-13 08:32:09

by Jan Kasprzak

[permalink] [raw]
Subject: Re: USB mouse disconnect/reconnect

watermodem wrote:
: On a machine at work with a Logitech USB MouseMan+ and no extension
: cable and a M$ usb keyboard I see the same thing. Machine is a
: Dell with PII-400 and BX chipset.
: Happens during the night when not in use.
:
My mouse is Genius Netscroll, and it also happens during the night
when not in use. It cannot be a power saving, though, because I run
distributed.net client on this machine. Chipset is VIA KT133. There is
an interesting thinng though: I don't see disconnects/reconnects on the
USB keyboard, which is connected via the identical 5m USB extension cable
as the USB mouse.

I can try to plug the mouse into another USB port.

-Y.

--
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Czech Linux Homepage: http://www.linux.cz/ |
Having your own personal custom language dialect might be tempting but it is
normally something only the lisp community do. (Alan Cox)

2001-12-13 08:34:49

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: USB mouse disconnect/reconnect

On Thu, Dec 13, 2001 at 09:06:46AM +0100, Peter Svensson wrote:
> On Wed, 12 Dec 2001, Vojtech Pavlik wrote:
>
> > Most active extension cables don't look like hubs. They have the
> > electric part of the hub built in, but not the logic one. They're
> > invisible on the USB bus.
>
> The ones I have seen do act as a hub, and are visible from the host
> computer.

I guess I'll have to get me some of those as a replacement to those I
have.

--
Vojtech Pavlik
SuSE Labs