USB Gaming Mouse 04d9:a078 not working in linux plus workaround

Short Description:

USB Gaming Mouse 04d9:a078 is not working.
dmesg says:
generic-usb: probe of 0003:04D9:A078.0010 failed with error -22

workaroud:

In /usr/src/linux/include/linux/hid.h
change the value of the constant in line 344

#define HID_MAX_USAGES                        12288

from 12288 to a value greater than 32k,
recompile and install the new kernel.

Additional Description:

dmesg:

[1932216.901113] usb 3-1: new full speed USB device using uhci_hcd and address 4
[1932217.100645] usb 3-1: New USB device found, idVendor=04d9, idProduct=a078
[1932217.100654] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[1932217.100662] usb 3-1: Product: USB Gaming Mouse
[1932217.100667] usb 3-1: Manufacturer: G-SPY
[1932217.111214] input: G-SPY USB Gaming Mouse as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.0/input/input22
[1932217.111420] generic-usb 0003:04D9:A078.000F: input,hidraw0: USB HID v1.10 Keyboard [G-SPY USB Gaming Mouse] on usb-0000:00:1a.0-1/input0
[1932217.118799] generic-usb: probe of 0003:04D9:A078.0010 failed with error -22
[1932217.123547] generic-usb 0003:04D9:A078.0011: hiddev0,hidraw1: USB HID v1.10 Device [G-SPY USB Gaming Mouse] on usb-0000:00:1a.0-1/input2

modprobing hid.ko in debugmode gives three rdesc

/sys/kernel/debug/hid/0003:04D9:A078.0001/rdesc
/sys/kernel/debug/hid/0003:04D9:A078.0002/rdesc
/sys/kernel/debug/hid/0003:04D9:A078.0003/rdesc

more than 64k lines (1.MB text) therefore … skip

lsusb: the mouse say it is also a keyboard?? like one of these with keyboard shortcuts as mousebutton for some MMORPG?

Bus 005 Device 002: ID 04d9:a078 Holtek Semiconductor, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x04d9 Holtek Semiconductor, Inc.
  idProduct          0xa078 
  bcdDevice            1.09
  iManufacturer           1 G-SPY
  iProduct                2 USB Gaming Mouse
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           84
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      63
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     166
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      26
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               8
Device Status:     0x0000
  (Bus Powered)

Hi there - thanks so much for this, I’ve just bought a Sharkoon Drakonia mouse and the fix pertains to that however, I struggled to recompile the kernel with this fix. I changed the hid.h file to 32768 and compiled the mainline 3.4.6 kernel on my Ubuntu system (apologies but there is next no support online for this problem) but this broke all USB and I think nvidia drivers.

Is there a generic way to recompile the kernel installed with this simple fix? If so please enlighten me - been years since I did anything like this!

Thanks,

Tom

Hi!
I’m not on ubuntu but some generic tips:

Install the kernel source provided by your distribution, same version as the working kernel, not from kernel.org, because distributors add their own (small)
patches and/or configuration.
(For several reasons like optimising for desktop or server, additonal hardware drivers, backward compatibility, security hardening, boot optimising, integration in their startup process, etc)

Compile and install a kernel without changes (same configuration as the working kernel).
FYI: you can find the compiletime config of the running kernel in /proc/config.gz (gz-compressed)

If that works u can try to patch the kernel for your needs.

however, i think the best way to get this patch into the mainline kernel is to fly to the place of the kernel usb/hid maintainer and beat him with the mouse cord :wink:

Does anyone know what I might do if I have no files in /usr/src/

I would really like to figure out how to make this work. Im a tad confused as to the process. From what I understand is that there should be a file there that we can change the value to. Then im not sure I understand how it gets installed.

Edit: Ah Il have to look up how to recompile the kernel. But I still need to find out why I do no have any files there…

I am using Debian 7.2 64Bit

On 12/12/2013 09:36 PM, razorskills wrote:
>
> Does anyone know what I might do if I have no files in /usr/src/
>
> I would really like to figure out how to make this work. Im a tad
> confused as to the process. From what I understand is that there should
> be a file there that we can change the value to. Then im not sure I
> understand how it gets installed.
>
> Edit: Ah Il have to look up how to recompile the kernel. But I still
> need to find out why I do no have any files there…
>
> I am using Debian 7.2 64Bit

I’m not sure how we should know how to build a kernel on Debian. From a little
experience using Mint11 on PowerPC, I know it is different that what I do to
build kernels for openSUSE.