Re: Need help investigating not working NKRO over USB in Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 20, 2017 at 09:43:01PM +0300, IFo Hancroft wrote:
> Hello Everyone,
> 
> Greg Kroah-Hartman directed me to here.
> 
> Here is what I am trying to do, what problems am I facing and what I've
> tried so far:
> 
> My keyboard is USB and it is supposed to have NKRO (the ability to
> register as many keys as pressed). (I know the protocol doesn't really
> allow it and it's using some hack).

What hack is that, multiple keyboards showing up, or somehow sending
multiple HID reports with different keys showing up there?

> However, the NKRO doesn't work in Linux (By not working, I mean it only
> registers 6 keys and modifiers.), so I am trying to investigate what is
> happening.

How have you tested this?

> For example is it just sending one stream of
> data (the 6KRO one (referred to as boot mode)) or two and one gets
> ignored. In theory, since I know the NKRO works in Windows and
> supposedly in Mac OS X, I think it is sending two but one of them gets
> ignored somehow.
> 
> I've first ran lsbusb and got this:
> 
> Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 003 Device 011: ID 2516:003c 
> Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 001 Device 003: ID 046d:082d Logitech, Inc. HD Pro Webcam C920
> Bus 001 Device 002: ID 046d:c07d Logitech, Inc.
> Bus 001 Device 005: ID 0909:001c Audio-Technica Corp.
> Bus 001 Device 004: ID 0951:16a4 Kingston Technology
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
> I know that the second line refers to the keyboard:
> 
> Bus 003 Device 011: ID 2516:003c
> 
> I've run: sudo bash -c "echo -n 3-2:1.0
> >/sys/bus/usb/drivers/usbhid/unbind"; sudo bash -c "echo -n 3-2:1.2
> >/sys/bus/usb/drivers/usbhid/unbind"; sudo lsusb -v -d 2516:003c;
> (I've run it as sudo so I get rid of the 'Couldn't open device, some
> information will be missing' and hopefully get the full info. I've
> unbind the device to get the Debug descriptor, however since at places,
> I still get
> can't get debug descriptor: Resource temporarily unavailable I thought
> I'd unbind both device events that show up in dmesg after plugging the
> device')
> The output for the device in dmesg is the following:
> 
> [387473.151166] usb 3-2: new full-speed USB device number 11 using xhci_hcd
> [387473.320074] usb 3-2: New USB device found, idVendor=2516, idProduct=003c
> [387473.320079] usb 3-2: New USB device strings: Mfr=1, Product=2,
> SerialNumber=0
> [387473.320103] usb 3-2: Product: MASTERKEYS PRO S
> [387473.320105] usb 3-2: Manufacturer: Cooler Master Technology Inc.
> [387473.322051] input: Cooler Master Technology Inc. MASTERKEYS PRO S as
> /devices/pci0000:00/0000:00:1c.0/0000:03:00.0/0000:04:02.0/0000:07:00.0/usb3/3-2/3-2:1.0/0003:2516:003C.0026/input/input44
> [387473.373897] hid-generic 0003:2516:003C.0026: input,hidraw2: USB HID
> v1.11 Keyboard [Cooler Master Technology Inc. MASTERKEYS PRO S] on
> usb-0000:07:00.0-2/input0
> [387473.374961] hid-generic 0003:2516:003C.0027: hiddev0,hidraw3: USB
> HID v1.11 Device [Cooler Master Technology Inc. MASTERKEYS PRO S] on
> usb-0000:07:00.0-2/input1
> [387473.376754] input: Cooler Master Technology Inc. MASTERKEYS PRO S as
> /devices/pci0000:00/0000:00:1c.0/0000:03:00.0/0000:04:02.0/0000:07:00.0/usb3/3-2/3-2:1.2/0003:2516:003C.0028/input/input45
> [387473.428595] hid-generic 0003:2516:003C.0028: input,hidraw4: USB HID
> v1.11 Keyboard [Cooler Master Technology Inc. MASTERKEYS PRO S] on
> usb-0000:07:00.0-2/input2
> 
> As you can see, there are two input: lines having different parts in the
> path in the form of 3-2:1.0 and 3-2:1.2 (to be honest no idea why and
> what that means)

So you have a number of different HID keyboards showing up in your
system from the one device, perhaps that is how it gets away with this
hack.

You might want to ask on the linux-input mailing list, the people there
might know how NKRO works better than we do, we just know the
lower-level USB stuff :)

good luck!

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux