I have a HID device which needs a tweak to convert the HID data to look like an absolute mouse device.
Simply building a hid quirks driver and binding it to the device works fine under Ubuntu and CentOS/Red Hat and, with the following modprobe for usbhid, in Debian 7.5:
modprobe usbhid quirks=0x<VID>:0x<PID>:0x0000
In openSUSE 13.1 I can make my driver and bind it (in place of hid-generic) to the device but I get no mouse movement (nor anything from evtest). The same situation occurred in Debian 7.5 and was fixed by explicitly informing usbhid that my device had a quirks driver (either by modifying the usbhid/hid-core.c to include the VID/PID or by the modprobe parameter above).
It seems that usbhid is not a module in openSUSE and so the modprobe is appropriate.
Does anyone know how I tell openSUSE to use my driver for a device with <VID>/<PID>?
Many thanks,
Pete.
Hi
What is the device? There are lots of hid drivers is /lib/modules/<kernel>/kernel/drivers/hid/
Perhaps the output from lsusb will provide some info…
The device is a new (KVM) mouse for which I have written a simple hid-quirks driver which I hope to submit for inclusion in kernel/drivers/hid/. In the meantime (for testing) I have managed to get the driver to work in Ubuntu, Debian Squeeze and Red Hat/CentOS just by making and binding the driver to my device.
In Debian 7.5 the usbhid driver checks to see if the VID/PID exists on a list of devices for which there is a quirks driver and makes the appropriate calls if there is. I can add my VID/PID using modprobe usbhid quirks=<VID>:<PID>:<Quirks>.
In openSUSE, I am getting the same symptoms (builds, installs and binds OK but no mouse data) as Debian 7.5 but I haven’t managed to work out how to (or even if I can) inform usbhid of my device. usbhid appears not to be a module and so modprobe won’t do the job - so I wondered if there was an equivalent method that will.
It may be that I will need to hard-wire the VID/PID into usbhid/hid-core.c (which also worked in Debian) until such time I have the quirks driver accepted into the kernel.
On 07/17/2014 01:56 PM, pwmpenwr wrote:
>
> The device is a new (KVM) mouse for which I have written a simple
> hid-quirks driver which I hope to submit for inclusion in
> kernel/drivers/hid/. In the meantime (for testing) I have managed to get
> the driver to work in Ubuntu, Debian Squeeze and Red Hat/CentOS just by
> making and binding the driver to my device.
>
> In Debian 7.5 the usbhid driver checks to see if the VID/PID exists on a
> list of devices for which there is a quirks driver and makes the
> appropriate calls if there is. I can add my VID/PID using modprobe
> usbhid quirks=<VID>:<PID>:<Quirks>.
>
> In openSUSE, I am getting the same symptoms (builds, installs and binds
> OK but no mouse data) as Debian 7.5 but I haven’t managed to work out
> how to (or even if I can) inform usbhid of my device. usbhid appears not
> to be a module and so modprobe won’t do the job - so I wondered if there
> was an equivalent method that will.
>
> It may be that I will need to hard-wire the VID/PID into
> usbhid/hid-core.c (which also worked in Debian) until such time I have
> the quirks driver accepted into the kernel.
It sounds as if you are unaware that Debian and openSUSE use essentially the
same kernels AS LONG AS THE KERNEL VERSION IS THE SAME. When reporting a
difference between two distros, always include the kernel version.
Ubuntu 14.04LTS has 3.13.0-24 (driver works with no modprobe parameter).
Debian 7.5 has 3.2.0-4 (driver needs modprobe parameter to get data passed).
openSUSE 13.1 has 3.11.6-4 (driver builds, installs and binds to device but I haven’t managed to get the driver called).
Hope that helps!
Pete.
On 07/17/2014 04:16 PM, pwmpenwr wrote:
>
> Ubuntu 14.04LTS has 3.13.0-24 (driver works with no modprobe parameter).
> Debian 7.5 has 3.2.0-4 (driver needs modprobe parameter to get data
> passed).
> openSUSE 13.1 has 3.11.6-4 (driver builds, installs and binds to device
> but I haven’t managed to get the driver called).
> Hope that helps!
Not really. We still need the output of lsusb to see if any standard driver is
configured for your device. We also need to see dmesg output to support your
contention that the driver is binding to the device. I do not understand what
you mean by “I haven’t managed to get the driver called”. If a driver properly
binds to a device, and it successfully registers with the kernel, it will be used.
It is possible that you are affected by a regression that was introduced after
3.2 and fixed by 3.13. You can test that by installing an openSUSE kernel for
3.13 or newer. There are lots of articles telling you how to do that.
I agree that since I hid_register_driver() with the VID/PID, there doesn’t seem to be any reason why the system shouldn’t join the dots. But in Debian 7.5, the point in usbhid where the call is made to the quirks driver depends on the VID/PID being in the ‘there is a quirks driver list’. Hence I was wondering if such a list exists in openSUSE and how to get my driver on it?
Pete.
lsusb:-
Bus 001 Device 004: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 004 Device 002: ID 413c:2005 Dell Computer Corp. RT7D50 Keyboard
Bus 004 Device 003: ID 0461:4d81 Primax Electronics, Ltd Dell N889 Optical Mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID XXXX:0010
Bus 010 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 413c:2003 Dell Computer Corp. Keyboard
Bus 001 Device 007: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
Bus 001 Device 008: ID XXXX:0001
dmesg | grep hid :-
2.528453] hidraw: raw HID events driver (C) Jiri Kosina
2.528506] usbcore: registered new interface driver usbhid
2.528507] usbhid: USB HID core driver
3.637785] hid-generic 0003:413C:2005.0001: input,hidraw0: USB HID v1.10 Keyboard [DELL DELL USB Keyboard] on usb-0000:00:1a.1-1/input0
4.016789] hid-generic 0003:0461:4D81.0002: input,hidraw1: USB HID v1.11 Mouse [USB Optical Mouse] on usb-0000:00:1a.1-2/input0
4.532754] hid-generic 0003:413C:2003.0003: input,hidraw2: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:1a.7-6.1.1/input0
4.697338] hid-generic 0003:046D:C018.0004: input,hidraw3: USB HID v1.11 Mouse [Logitech Logitech USB Optical Mouse] on usb-0000:00:1a.7-6.1.2/input0
4.835186] hid-generic 0003:XXXX:0001.0005: input,hidraw4: USB HID v1.11 Mouse [My Mouse] on usb-0000:00:1a.7-6.1.3/input0
211.392310] my-driver 0003:XXXX:0001.0005: input,hidraw4: USB HID v1.11 Mouse [My Mouse] on usb-0000:00:1a.7-6.1.3/input0
It is possible that you are affected by a regression that was introduced after
3.2 and fixed by 3.13. You can test that by installing an openSUSE kernel for
3.13 or newer. There are lots of articles telling you how to do that.
That’s helped. Updated to 3.15.6-2 and I’m now getting data out of evtest.
Many thanks,
Pete.