public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* problem with usb duo mouse and keyboard
@ 2003-12-21 20:43 Raul Miller
  2003-12-21 21:39 ` Vojtech Pavlik
  0 siblings, 1 reply; 5+ messages in thread
From: Raul Miller @ 2003-12-21 20:43 UTC (permalink / raw)
  To: linux-kernel

Linux 2.6.0 (and 2.6.0-test11) appears to have a significant problem
with the mouse of the logitech 700mx duo when it's plugged in using usb.

The mouse works fine* when plugged in using the ps/2 mouse connector,
and the keyboard works ok even when plugged in using usb.  However,
when using usb:

o   horizontal mouse movement is interpreted as vertical movement 
o   vertical mouse movement is ignored 
o   strange things happen with mouse button presses (I didn't bother
    working with this configuration long enough to figure out the
    details).

This occurs under both x and gpm, which is mild evidence that it's
not a user space problem.

It might also be worth noting that some of the extra keys on the keyboard
do odd mouse-like things (like move the mouse's pointer horizontally
a short distance) when it's a usb keyboard.  However, these keys work
reasonably normally (or, in two cases**, generate entries in syslog)
when it's plugged in as a ps/2 keyboard.

My guess is that the respective usb drivers haven't taken into account
that both a keyboard and a mouse might appear on the same physical
connection.  [But I'm still coming up to speed, and haven't yet figured
out how to confirm/disprove that guess.]

-- 
Raul Miller
moth@magenta.com


* one mouse button is ignored, however it is so awkwardly placed that I
doubt anyone would want to use it.


** the syslog entries from the unsupported keys:

Dec 21 15:28:07 localhost kernel: atkbd.c: Unknown key pressed (translated set 2, code 0x11d, data 0x11, on isa0060/serio0).
Dec 21 15:28:07 localhost kernel: atkbd.c: Unknown key released (translated set
2, code 0x11d, data 0x91, on isa0060/serio0).
Dec 21 15:28:10 localhost kernel: atkbd.c: Unknown key pressed (translated set 2, code 0x12c, data 0x14, on isa0060/serio0).
Dec 21 15:28:10 localhost kernel: atkbd.c: Unknown key released (translated set
2, code 0x12c, data 0x94, on isa0060/serio0).

Perhaps it's also worth noting that most of the other extra keys send two
byte sequences when pressed (as reported by showkey -s), and showkey -k
seems to be reporting the extra information as extra key releases, I think
I've seen something similar on other keyboards, but I don't have one of
those handy to test on).  If anyone cares, I can document this for them.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with usb duo mouse and keyboard
  2003-12-21 20:43 problem with usb duo mouse and keyboard Raul Miller
@ 2003-12-21 21:39 ` Vojtech Pavlik
  2003-12-21 22:03   ` Raul Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Vojtech Pavlik @ 2003-12-21 21:39 UTC (permalink / raw)
  To: Raul Miller; +Cc: linux-kernel

On Sun, Dec 21, 2003 at 03:43:31PM -0500, Raul Miller wrote:
> Linux 2.6.0 (and 2.6.0-test11) appears to have a significant problem
> with the mouse of the logitech 700mx duo when it's plugged in using usb.
> 
> The mouse works fine* when plugged in using the ps/2 mouse connector,
> and the keyboard works ok even when plugged in using usb.  However,
> when using usb:
> 
> o   horizontal mouse movement is interpreted as vertical movement 
> o   vertical mouse movement is ignored 
> o   strange things happen with mouse button presses (I didn't bother
>     working with this configuration long enough to figure out the
>     details).
> 
> This occurs under both x and gpm, which is mild evidence that it's
> not a user space problem.
> 
> It might also be worth noting that some of the extra keys on the keyboard
> do odd mouse-like things (like move the mouse's pointer horizontally
> a short distance) when it's a usb keyboard.  However, these keys work
> reasonably normally (or, in two cases**, generate entries in syslog)
> when it's plugged in as a ps/2 keyboard.
> 
> My guess is that the respective usb drivers haven't taken into account
> that both a keyboard and a mouse might appear on the same physical
> connection.  [But I'm still coming up to speed, and haven't yet figured
> out how to confirm/disprove that guess.]

They do take that into account. It's just that the descriptors are maybe
too complex. Could you possibly enable DEBUG in hid-core.c and send me
the output?

> -- 
> Raul Miller
> moth@magenta.com
> 
> 
> * one mouse button is ignored, however it is so awkwardly placed that I
> doubt anyone would want to use it.
> 
> 
> ** the syslog entries from the unsupported keys:
> 
> Dec 21 15:28:07 localhost kernel: atkbd.c: Unknown key pressed (translated set 2, code 0x11d, data 0x11, on isa0060/serio0).
> Dec 21 15:28:07 localhost kernel: atkbd.c: Unknown key released (translated set
> 2, code 0x11d, data 0x91, on isa0060/serio0).
> Dec 21 15:28:10 localhost kernel: atkbd.c: Unknown key pressed (translated set 2, code 0x12c, data 0x14, on isa0060/serio0).
> Dec 21 15:28:10 localhost kernel: atkbd.c: Unknown key released (translated set
> 2, code 0x12c, data 0x94, on isa0060/serio0).
> 
> Perhaps it's also worth noting that most of the other extra keys send two
> byte sequences when pressed (as reported by showkey -s), and showkey -k
> seems to be reporting the extra information as extra key releases, I think
> I've seen something similar on other keyboards, but I don't have one of
> those handy to test on).  If anyone cares, I can document this for them.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with usb duo mouse and keyboard
  2003-12-21 21:39 ` Vojtech Pavlik
@ 2003-12-21 22:03   ` Raul Miller
       [not found]     ` <20031221223443.GA15744@ucw.cz>
  0 siblings, 1 reply; 5+ messages in thread
From: Raul Miller @ 2003-12-21 22:03 UTC (permalink / raw)
  To: Vojtech Pavlik

On Sun, Dec 21, 2003 at 10:39:50PM +0100, Vojtech Pavlik wrote:
> They do take that into account. It's just that the descriptors are maybe
> too complex. Could you possibly enable DEBUG in hid-core.c and send me
> the output?

I've defined DEBUG in hid-core.c, and booted with the logitech
keyboard/mouse transceiver plugged in using usb (I'm using a different
keyboard and mouse to run the system) but I don't see any new messages.
Do I also need to define DEBUG_DATA?  Or are there some special tests
I need to ruN?

As an aside, I have spotted a few messages which might be relevant 
which I was getting even before I booted with this kernel instance:

Dec 21 16:55:51 localhost input.agent[283]: ... no modules for INPUT product 3/46d/c50b/2100
Dec 21 16:55:51 localhost input.agent[294]: ... no modules for INPUT product 3/46d/c50b/2100
Dec 21 16:55:51 localhost modprobe: FATAL: Module hid already in kernel.
Dec 21 16:55:51 localhost usb.agent[276]: kernel driver usbkbd already loaded
Dec 21 16:55:51 localhost kernel: drivers/usb/core/usb.c: registered new driver
hiddev
Dec 21 16:55:51 localhost kernel: drivers/usb/core/usb.c: registered new driver
hid
Dec 21 16:55:51 localhost kernel: drivers/usb/input/hid-core.c: v2.0:USB HID core driver
Dec 21 16:55:51 localhost usb.agent[284]: kernel driver usbmouse already loaded

Hmm...

Ok, I can get messages to show up in syslog if I use lsusb.  Here's what I get:

Dec 21 17:01:45 localhost kernel: usbfs: USBDEVFS_CONTROL failed cmd lsusb dev 2 rqt 128 rq 6 len 63 ret -32
Dec 21 17:01:45 localhost kernel: usbfs: USBDEVFS_CONTROL failed cmd lsusb dev 2 rqt 128 rq 6 len 190 ret -32
Dec 21 17:01:59 localhost kernel: usbfs: USBDEVFS_CONTROL failed cmd lsusb dev 2 rqt 128 rq 6 len 63 ret -32
Dec 21 17:01:59 localhost kernel: usbfs: USBDEVFS_CONTROL failed cmd lsusb dev 2 rqt 128 rq 6 len 190 ret -32
Dec 21 17:02:18 localhost kernel: usbfs: USBDEVFS_CONTROL failed cmd lsusb dev 2 rqt 128 rq 6 len 63 ret -32
Dec 21 17:02:18 localhost kernel: usbfs: USBDEVFS_CONTROL failed cmd lsusb dev 2 rqt 128 rq 6 len 190 ret -32

Also, I'm appending the output of lsusb -vv to the bottom of this message.

Let me know if there's anything else I can do.

Thanks,

-- 
Raul Miller
moth@magenta.com


Bus 003 Device 001: ID 0000:0000  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0000 
  idProduct          0x0000 
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.0 uhci_hcd
  iProduct                2 UHCI Host Controller
  iSerial                 1 0000:00:10.2
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x40
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               none
        wMaxPacketSize          2
        bInterval             255
  Language IDs: (length=4)
     0409 English(US)

Bus 002 Device 002: ID 046d:c50b Logitech, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x046d Logitech, Inc.
  idProduct          0xc50b 
  bcdDevice           21.00
  iManufacturer           1 Logitech
  iProduct                2 USB Receiver
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           59
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      Remote Wakeup
    MaxPower               98mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Devices
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      63
cannot get report descriptor
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               none
        wMaxPacketSize          8
        bInterval              10
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Devices
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     190
cannot get report descriptor
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               none
        wMaxPacketSize          8
        bInterval              10
  Language IDs: (length=4)
     0409 English(US)

Bus 002 Device 001: ID 0000:0000  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0000 
  idProduct          0x0000 
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.0 uhci_hcd
  iProduct                2 UHCI Host Controller
  iSerial                 1 0000:00:10.1
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x40
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               none
        wMaxPacketSize          2
        bInterval             255
  Language IDs: (length=4)
     0409 English(US)

Bus 001 Device 001: ID 0000:0000  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0000 
  idProduct          0x0000 
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.0 uhci_hcd
  iProduct                2 UHCI Host Controller
  iSerial                 1 0000:00:10.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x40
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               none
        wMaxPacketSize          2
        bInterval             255
  Language IDs: (length=4)
     0409 English(US)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: user problem with usb duo mouse and keyboard
       [not found]         ` <20031221230042.GA15960@ucw.cz>
@ 2003-12-21 23:27           ` Raul Miller
  2003-12-22  0:10             ` Vojtech Pavlik
  0 siblings, 1 reply; 5+ messages in thread
From: Raul Miller @ 2003-12-21 23:27 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: linux-kernel

On Mon, Dec 22, 2003 at 12:00:42AM +0100, Vojtech Pavlik wrote:
> hid-core.c includes hid.h, which in turn, if DEBUG is defined, includes
> hid-debug.h. That last file defines some functions (hid_dump_input,
> hid_dump_device), which are called by hid-core.c.
...
> This is the problem! Don't ever use usbkbd and usbmouse. Use hid
> instead.

Oh!

And, looking at the docs on those modules, I see nice big warnings that
say something similar...

Looking further, these modules where build and installed by default
when I installed my system (debian, with the 2.4.18-bf2.4 kernel), and
I've been carrying forward that configuration on my hand-built kernels,
and never realized I needed to get rid of those modules.

I see the hid-debug messages in syslog now, but the keyboard and mouse
are working properly as well.  Do you want to pursue this any further?
[If so, I can send you the messages.]

[It's perhaps of note that the extra keys on the keyboard are reported
as scancode 0 by showkey (with other release scan codes) when plugged
in via usb and which have different keypress scan codss when plugged as
a ps/2 keyboard.]

[[There's a slight chance that [to avoid confused messages from other
people in my situation] a warning message from hid about usbkbd and
usbmouse would be a good idea.]]

Thank you very much.

Sorry about the confusion,

-- 
Raul Miller
moth@magenta.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: user problem with usb duo mouse and keyboard
  2003-12-21 23:27           ` user " Raul Miller
@ 2003-12-22  0:10             ` Vojtech Pavlik
  0 siblings, 0 replies; 5+ messages in thread
From: Vojtech Pavlik @ 2003-12-22  0:10 UTC (permalink / raw)
  To: Raul Miller; +Cc: Vojtech Pavlik, linux-kernel

On Sun, Dec 21, 2003 at 06:27:57PM -0500, Raul Miller wrote:

> On Mon, Dec 22, 2003 at 12:00:42AM +0100, Vojtech Pavlik wrote:
> > hid-core.c includes hid.h, which in turn, if DEBUG is defined, includes
> > hid-debug.h. That last file defines some functions (hid_dump_input,
> > hid_dump_device), which are called by hid-core.c.
> ...
> > This is the problem! Don't ever use usbkbd and usbmouse. Use hid
> > instead.
> 
> Oh!
> 
> And, looking at the docs on those modules, I see nice big warnings that
> say something similar...
> 
> Looking further, these modules where build and installed by default
> when I installed my system (debian, with the 2.4.18-bf2.4 kernel), and
> I've been carrying forward that configuration on my hand-built kernels,
> and never realized I needed to get rid of those modules.
> 
> I see the hid-debug messages in syslog now, but the keyboard and mouse
> are working properly as well.  Do you want to pursue this any further?
> [If so, I can send you the messages.]

If they are working, then no.

> [It's perhaps of note that the extra keys on the keyboard are reported
> as scancode 0 by showkey (with other release scan codes) when plugged

This is normal. This is because the keycodes are above 128 and that's
all that you can fit into a single signed byte.

> in via usb and which have different keypress scan codss when plugged as
> a ps/2 keyboard.]

This is also normal and can be fixed via the setkeycodes utility. The
driver cannot be preconfigured for every PS/2 keyboard out there,
because their scancodes conflict. On USB the configuration is static,
because USB carries much more information about the keys.

> [[There's a slight chance that [to avoid confused messages from other
> people in my situation] a warning message from hid about usbkbd and
> usbmouse would be a good idea.]]

Maybe. But fortunately current distros get it right.

> Thank you very much.
> Sorry about the confusion,

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-12-22  0:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-21 20:43 problem with usb duo mouse and keyboard Raul Miller
2003-12-21 21:39 ` Vojtech Pavlik
2003-12-21 22:03   ` Raul Miller
     [not found]     ` <20031221223443.GA15744@ucw.cz>
     [not found]       ` <20031221175121.E28449@links.magenta.com>
     [not found]         ` <20031221230042.GA15960@ucw.cz>
2003-12-21 23:27           ` user " Raul Miller
2003-12-22  0:10             ` Vojtech Pavlik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox