# [solved] USB: Keyboard and mouse hate each other

## haarp

Hey guys. I have a problem with USB.

I have this USB mouse receiver (it's wireless, USB2.0):

```
Bus 004 Device 004: ID 046d:c526 Logitech, Inc. 

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               2.00

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0        32

  idVendor           0x046d Logitech, Inc.

  idProduct          0xc526 

  bcdDevice            5.00

  iManufacturer           1 Logitech

  iProduct                2 USB Receiver

  iSerial                 0 

  bNumConfigurations      1

```

and this PS2-to-USB Adapter which offers ports for a PS2 mouse and keyboard, but I only use the keyboard one (USB1):

```
Bus 007 Device 006: ID 0e8f:0020 GreenAsia Inc. 

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               1.10

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0         8

  idVendor           0x0e8f GreenAsia Inc.

  idProduct          0x0020 

  bcdDevice            2.80

  iManufacturer           1 GASIA

  iProduct                2 PS2toUSB Adapter

  iSerial                 0 

  bNumConfigurations      1

```

When I connect both to this Hub (USB2.0):

```
Bus 007 Device 005: ID 2001:f103 D-Link Corp. [hex] 

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               2.00

  bDeviceClass            9 Hub

  bDeviceSubClass         0 Unused

  bDeviceProtocol         1 Single TT

  bMaxPacketSize0        64

  idVendor           0x2001 D-Link Corp. [hex]

  idProduct          0xf103 

  bcdDevice            1.00

  iManufacturer           0 

  iProduct                0 

  iSerial                 0 

  bNumConfigurations      1

```

it works fine when I connect the hub to my Desktop machine (OHCI/EHCI) but on my Laptop (UHCI/EHCI) I get this:

```
Oct 11 17:42:02 marauder kernel: [18652.598280] usb 7-2.4: reset low speed USB device using ehci_hcd and address 11

Oct 11 17:42:04 marauder kernel: [18654.133285] usb 7-2.4: reset low speed USB device using ehci_hcd and address 11

Oct 11 17:42:05 marauder kernel: [18655.669282] usb 7-2.4: reset low speed USB device using ehci_hcd and address 11

Oct 11 17:42:07 marauder kernel: [18657.204269] usb 7-2.4: reset low speed USB device using ehci_hcd and address 11

Oct 11 17:42:08 marauder kernel: [18658.740161] usb 7-2.4: reset low speed USB device using ehci_hcd and address 11

```

Either the keyboard or mouse work fine, but as soon as both of them are connected to this hub, it keeps resetting the device I added last indefinitely. (If both are connected to the hub when I plug the hub in, it defaults to resetting the keyboard adapter)

My desktop PC doesn't have this problem. The hub works fine with other USB devices on the laptop plus either the keyboard or mouse, just the keyboard and mouse together cause trouble. I can't explain it.

Both machines run Gentoo and the same kernel (2.6.35-zen2). Could UHCI have a bug that OHCI doesn't?

Any ideas?Last edited by haarp on Mon Oct 11, 2010 8:03 pm; edited 1 time in total

----------

## NeddySeagoon

haarp,

Your keyboard adaptor is USB1.1

When you mix USB1 adnd USB2 devices on the same root hub (your external hub) you can only have USB1 speeds.

USB2 devices are supposed to fall back to USB1 and tolerate that but may don't.

PS2 to USB converters are also a source of great pain.  Avoid them like the plague.

----------

## haarp

Never had problems with them before  :Wink: 

Don't USB hubs switch the speeds on a per-port basis? Like Ethernet switches? And why does this arrangement work fine on my Desktop? Something tells me that this _should_ work.

Besides, how else am I supposed to connect my trusty Model M to the Laptop then?  :Wink: 

----------

## NeddySeagoon

haarp,

It works sometimes with some combinations of hardware, when the USB2 devices fall back to USB1 as thay are supposed to.

Think about your USB tree for a moment. You have a root hub in the PC (that can only operate at one speed) connected to a USB hub that does not do USB2/USB1 speed switching. Does the *identical* setup work on your desktop ?

Some things to try on the laptop:-

Remove EHCI_HCD support, so you only have USB1 drivers loaded. IF you have made it modular,

```
 modprobe -r ehci_hcd
```

will do nicely.

Does that work?

Depending on how old your laptop is it may support USB Transaction Translation. Remove UHCI_HCD and ensure you have USB Transaction Translation support in your kernel.

If you have the hardware, the EHCI_HCD driver with USB Transaction Translation support will correctly drive both USB1 and USB2. IF your USB1 devices fail, you don't have  USB Transaction Translation hardware support.

Messages like 

```
[    2.185831] usb 1-2.1: new low speed USB device using ehci_hcd and address 4

[    2.373175] usb 1-2.2: new full speed USB device using ehci_hcd and address 5
```

in dmesg show that transaction translation is working.

The ehci_hcd driver is controlling USB1 devices.

----------

## haarp

Hey,

I enabled USB Transaction Translation in my kernel. Everything magically works now  :Surprised: 

```
Oct 11 22:07:31 marauder kernel: [  778.436175] usb 7-2.7: new full speed USB device using ehci_hcd and address 7

.

.

.

Oct 11 22:07:33 marauder kernel: [  780.702191] usb 7-2.4: new low speed USB device using ehci_hcd and address 8

```

Thanks a lot Neddy!!

----------

