From: Benjamin Tissoires <hidden> Date: 2014-01-29 14:53:05
On Fri, Jan 24, 2014 at 11:51 PM, Stephan Mueller [off-list ref] wrote:
Am Samstag, 25. Januar 2014, 12:17:13 schrieb Mattia Dongili:
Hi Mattia,
quoted
I'd try with the input subsystem and the synaptics_usb driver first but
it's just a wild guess. Your kernel log should give you more hints about
which driver is bound to the device and the sysfs tree under
/sys/class/input/event*/device/* has all the capabilities and
identifiers.
The following did not help:
modprobe synaptics_usb
cd /sys/bus/usb/drivers/usbhid
echo -n "1-1.3:1.0" > unbind
#now the mouse is without driver, does not move, and
#/sys/class/input/event2/device/device is without driver
cd /sys/bus/usb/drivers/synaptics_usb
echo -n "1-1.3:1.0" > bind
#error: no such device, mouse does not work, nothing in dmesg
cd /sys/bus/usb/drivers/usbhid
echo -n "1-1.3:1.0" > bind
#mouse works again without middle button
Hi Stephan,
in this case, you definitively want to talk to HID (and input) folks.
Adding Jiri, the HID maintainer in the discussion.
Your mouse does not seem to be handled properly by the hid subsystem
and needs quirks, or fix.
Can you send us some hid-recorder[1] traces of your device? We should
then be able to check what's wrong and hopefully fix the problem.
Cheers,
Benjamin
[1] http://bentiss.github.io/hid-replay-docs/
From: Stephan Mueller <hidden> Date: 2014-01-29 14:59:24
Am Mittwoch, 29. Januar 2014, 09:53:03 schrieb Benjamin Tissoires:
Hi Benjamin,
On Fri, Jan 24, 2014 at 11:51 PM, Stephan Mueller [off-list ref]
wrote:
quoted
Am Samstag, 25. Januar 2014, 12:17:13 schrieb Mattia Dongili:
Hi Mattia,
quoted
I'd try with the input subsystem and the synaptics_usb driver first
but it's just a wild guess. Your kernel log should give you more
hints about which driver is bound to the device and the sysfs tree
under
/sys/class/input/event*/device/* has all the capabilities and
identifiers.
The following did not help:
modprobe synaptics_usb
cd /sys/bus/usb/drivers/usbhid
echo -n "1-1.3:1.0" > unbind
#now the mouse is without driver, does not move, and
#/sys/class/input/event2/device/device is without driver
cd /sys/bus/usb/drivers/synaptics_usb
echo -n "1-1.3:1.0" > bind
#error: no such device, mouse does not work, nothing in dmesg
cd /sys/bus/usb/drivers/usbhid
echo -n "1-1.3:1.0" > bind
#mouse works again without middle button
Hi Stephan,
in this case, you definitively want to talk to HID (and input) folks.
Adding Jiri, the HID maintainer in the discussion.
Your mouse does not seem to be handled properly by the hid subsystem
and needs quirks, or fix.
Can you send us some hid-recorder[1] traces of your device? We should
then be able to check what's wrong and hopefully fix the problem.
Thanks a lot for the helping hand. I will try your suggestion tonight
and report back.
But please allow me to point out that I have doubts that HID or input is
at fault, because when sniffing on the USB bus with usbmon, I do *not*
see any information transported when pressing the middle button.
Therefore, I would suspect it is rather the base USB driver that somehow
needs a quirk to access the mouse properly.
Thanks a lot
Stephan
From: Benjamin Tissoires <hidden> Date: 2014-01-29 15:07:42
On Wed, Jan 29, 2014 at 9:59 AM, Stephan Mueller [off-list ref] wrote:
Am Mittwoch, 29. Januar 2014, 09:53:03 schrieb Benjamin Tissoires:
Hi Benjamin,
quoted
On Fri, Jan 24, 2014 at 11:51 PM, Stephan Mueller [off-list ref]
wrote:
quoted
quoted
Am Samstag, 25. Januar 2014, 12:17:13 schrieb Mattia Dongili:
Hi Mattia,
quoted
I'd try with the input subsystem and the synaptics_usb driver first
but it's just a wild guess. Your kernel log should give you more
hints about which driver is bound to the device and the sysfs tree
under
/sys/class/input/event*/device/* has all the capabilities and
identifiers.
The following did not help:
modprobe synaptics_usb
cd /sys/bus/usb/drivers/usbhid
echo -n "1-1.3:1.0" > unbind
#now the mouse is without driver, does not move, and
#/sys/class/input/event2/device/device is without driver
cd /sys/bus/usb/drivers/synaptics_usb
echo -n "1-1.3:1.0" > bind
#error: no such device, mouse does not work, nothing in dmesg
cd /sys/bus/usb/drivers/usbhid
echo -n "1-1.3:1.0" > bind
#mouse works again without middle button
Hi Stephan,
in this case, you definitively want to talk to HID (and input) folks.
Adding Jiri, the HID maintainer in the discussion.
Your mouse does not seem to be handled properly by the hid subsystem
and needs quirks, or fix.
Can you send us some hid-recorder[1] traces of your device? We should
then be able to check what's wrong and hopefully fix the problem.
Thanks a lot for the helping hand. I will try your suggestion tonight
and report back.
But please allow me to point out that I have doubts that HID or input is
at fault, because when sniffing on the USB bus with usbmon, I do *not*
see any information transported when pressing the middle button.
Therefore, I would suspect it is rather the base USB driver that somehow
needs a quirk to access the mouse properly.
Oh, then in this case it may be that your device needs to be put in a
special mode, and the report descriptors will show us some hints on
how to do it (maybe).
I strongly doubt that USB is in fault here. I can not see any reasons
why the USB or underlying driver would select which packets are
transmitted.
What you can also do is setup a windows virtual machine, assign the
usb device to it, and sniff through usbmon or wireshark what packets
are emitted from/to the mouse. Then, we will duplicate this behavior
in the hid driver, and you would be good to go. Still, having the
reports descriptors (which are provided by hid-recorder, or in
/sys/kernel/debug/hid/DEVICE/rdesc, or in lsusb -vv when the usbhid
driver is not bound) would help us to understand the mouse firmware.
Cheers,
Benjamin
From: Stephan Mueller <hidden> Date: 2014-01-30 03:48:16
Am Mittwoch, 29. Januar 2014, 10:07:40 schrieb Benjamin Tissoires:
Hi Benjamin,
On Wed, Jan 29, 2014 at 9:59 AM, Stephan Mueller [off-list ref]
wrote:
quoted
Am Mittwoch, 29. Januar 2014, 09:53:03 schrieb Benjamin Tissoires:
Hi Benjamin,
quoted
On Fri, Jan 24, 2014 at 11:51 PM, Stephan Mueller [off-list ref]
wrote:
quoted
quoted
Am Samstag, 25. Januar 2014, 12:17:13 schrieb Mattia Dongili:
Hi Mattia,
quoted
I'd try with the input subsystem and the synaptics_usb driver first
but it's just a wild guess. Your kernel log should give you more
hints about which driver is bound to the device and the sysfs tree
under
/sys/class/input/event*/device/* has all the capabilities and
identifiers.
The following did not help:
modprobe synaptics_usb
cd /sys/bus/usb/drivers/usbhid
echo -n "1-1.3:1.0" > unbind
#now the mouse is without driver, does not move, and
#/sys/class/input/event2/device/device is without driver
cd /sys/bus/usb/drivers/synaptics_usb
echo -n "1-1.3:1.0" > bind
#error: no such device, mouse does not work, nothing in dmesg
cd /sys/bus/usb/drivers/usbhid
echo -n "1-1.3:1.0" > bind
#mouse works again without middle button
Hi Stephan,
in this case, you definitively want to talk to HID (and input) folks.
Adding Jiri, the HID maintainer in the discussion.
Your mouse does not seem to be handled properly by the hid subsystem
and needs quirks, or fix.
Can you send us some hid-recorder[1] traces of your device? We should
then be able to check what's wrong and hopefully fix the problem.
Thanks a lot for the helping hand. I will try your suggestion tonight
and report back.
But please allow me to point out that I have doubts that HID or input is
at fault, because when sniffing on the USB bus with usbmon, I do *not*
see any information transported when pressing the middle button.
Therefore, I would suspect it is rather the base USB driver that somehow
needs a quirk to access the mouse properly.
Oh, then in this case it may be that your device needs to be put in a
special mode, and the report descriptors will show us some hints on
how to do it (maybe).
I strongly doubt that USB is in fault here. I can not see any reasons
why the USB or underlying driver would select which packets are
transmitted.
What you can also do is setup a windows virtual machine, assign the
usb device to it, and sniff through usbmon or wireshark what packets
are emitted from/to the mouse. Then, we will duplicate this behavior
in the hid driver, and you would be good to go. Still, having the
reports descriptors (which are provided by hid-recorder, or in
/sys/kernel/debug/hid/DEVICE/rdesc, or in lsusb -vv when the usbhid
driver is not bound) would help us to understand the mouse firmware.
Cheers,
Benjamin
From: Benjamin Tissoires <hidden> Date: 2014-01-30 21:44:02
Hi Stephan,
thanks for the traces.
Well, the device definitively presents an Output and an Input report
on the report ID 2. That means that the windows driver can send and
read configuration to the trackpoint through this report.
I think our best chance here is to capture the initialization protocol
from a Windows virtual machine, and then mimic the behavior under
Linux.
Cheers,
Benjamin
On Wed, Jan 29, 2014 at 10:48 PM, Stephan Mueller [off-list ref] wrote:
Am Mittwoch, 29. Januar 2014, 10:07:40 schrieb Benjamin Tissoires:
Hi Benjamin,
quoted
On Wed, Jan 29, 2014 at 9:59 AM, Stephan Mueller [off-list ref]
wrote:
quoted
quoted
Am Mittwoch, 29. Januar 2014, 09:53:03 schrieb Benjamin Tissoires:
Hi Benjamin,
quoted
On Fri, Jan 24, 2014 at 11:51 PM, Stephan Mueller [off-list ref]
wrote:
quoted
quoted
Am Samstag, 25. Januar 2014, 12:17:13 schrieb Mattia Dongili:
Hi Mattia,
quoted
I'd try with the input subsystem and the synaptics_usb driver first
but it's just a wild guess. Your kernel log should give you more
hints about which driver is bound to the device and the sysfs tree
under
/sys/class/input/event*/device/* has all the capabilities and
identifiers.
The following did not help:
modprobe synaptics_usb
cd /sys/bus/usb/drivers/usbhid
echo -n "1-1.3:1.0" > unbind
#now the mouse is without driver, does not move, and
#/sys/class/input/event2/device/device is without driver
cd /sys/bus/usb/drivers/synaptics_usb
echo -n "1-1.3:1.0" > bind
#error: no such device, mouse does not work, nothing in dmesg
cd /sys/bus/usb/drivers/usbhid
echo -n "1-1.3:1.0" > bind
#mouse works again without middle button
Hi Stephan,
in this case, you definitively want to talk to HID (and input) folks.
Adding Jiri, the HID maintainer in the discussion.
Your mouse does not seem to be handled properly by the hid subsystem
and needs quirks, or fix.
Can you send us some hid-recorder[1] traces of your device? We should
then be able to check what's wrong and hopefully fix the problem.
Thanks a lot for the helping hand. I will try your suggestion tonight
and report back.
But please allow me to point out that I have doubts that HID or input is
at fault, because when sniffing on the USB bus with usbmon, I do *not*
see any information transported when pressing the middle button.
Therefore, I would suspect it is rather the base USB driver that somehow
needs a quirk to access the mouse properly.
Oh, then in this case it may be that your device needs to be put in a
special mode, and the report descriptors will show us some hints on
how to do it (maybe).
I strongly doubt that USB is in fault here. I can not see any reasons
why the USB or underlying driver would select which packets are
transmitted.
What you can also do is setup a windows virtual machine, assign the
usb device to it, and sniff through usbmon or wireshark what packets
are emitted from/to the mouse. Then, we will duplicate this behavior
in the hid driver, and you would be good to go. Still, having the
reports descriptors (which are provided by hid-recorder, or in
/sys/kernel/debug/hid/DEVICE/rdesc, or in lsusb -vv when the usbhid
driver is not bound) would help us to understand the mouse firmware.
Cheers,
Benjamin
From: Stephan Mueller <hidden> Date: 2014-01-30 22:07:15
Am Donnerstag, 30. Januar 2014, 16:44:02 schrieb Benjamin Tissoires:
Hi Benjamin,
Hi Stephan,
thanks for the traces.
Well, the device definitively presents an Output and an Input report
on the report ID 2. That means that the windows driver can send and
read configuration to the trackpoint through this report.
I think our best chance here is to capture the initialization protocol
from a Windows virtual machine, and then mimic the behavior under
Linux.
Thanks.
Can you please help me how to do that? I install Windows in a KVM with
the mouse device as a USB-passthrough device -- shall I detach the Linux
USB driver?
Now, shall I use hid-recorder on that device or rather usbmon while
Windows is booting?
Thanks
Stephan
From: Benjamin Tissoires <hidden> Date: 2014-01-31 03:50:25
On Thu, Jan 30, 2014 at 5:07 PM, Stephan Mueller [off-list ref] wrote:
Am Donnerstag, 30. Januar 2014, 16:44:02 schrieb Benjamin Tissoires:
Hi Benjamin,
quoted
Hi Stephan,
thanks for the traces.
Well, the device definitively presents an Output and an Input report
on the report ID 2. That means that the windows driver can send and
read configuration to the trackpoint through this report.
I think our best chance here is to capture the initialization protocol
from a Windows virtual machine, and then mimic the behavior under
Linux.
Thanks.
Can you please help me how to do that? I install Windows in a KVM with
the mouse device as a USB-passthrough device -- shall I detach the Linux
USB driver?
No, you don't have to detach the Linux USB driver (it's done for you
by KVM IIRC).
Now, shall I use hid-recorder on that device or rather usbmon while
Windows is booting?
usbmon is the tool you need. hid-recorder will not work because the
hid subsystem will be disconnected as the device is used by Windows.
You can even use wireshark now. It gives you a nice interface and
interpretation of the USB packets :)
Cheers,
Benjamin
From: Stephan Mueller <hidden> Date: 2014-01-31 04:31:53
Am Donnerstag, 30. Januar 2014, 22:50:25 schrieb Benjamin Tissoires:
Hi Benjamin,
quoted
Can you please help me how to do that? I install Windows in a KVM with
the mouse device as a USB-passthrough device -- shall I detach the Linux
USB driver?
No, you don't have to detach the Linux USB driver (it's done for you
by KVM IIRC).
Correct, libvirtd is the one that detaches the driver when I start the VM.
quoted
Now, shall I use hid-recorder on that device or rather usbmon while
Windows is booting?
usbmon is the tool you need. hid-recorder will not work because the
hid subsystem will be disconnected as the device is used by Windows.
You can even use wireshark now. It gives you a nice interface and
interpretation of the USB packets :)
Please see attached for the USB sniffing on the USB bus with the Crucialtec
touch pad when Windows starts up and shuts down. To drive the device, Windows
uses the Crucialtec driver according to its device settings display.
The attached log contains the log information for the mouse (device 001:005)
and the USB bridge (device 001:002). I cut out the listing for the touch pad
which is also attached to that bridge.
The strange thing, however, is the following: the mouse works in Windows when
I do not sniff on the USB bus using usbmon. But as soon as I start sniffing,
it does not work any more.
Is that log helpful?
Ciao
Stephan
--
| Cui bono? |
From: Benjamin Tissoires <hidden> Date: 2014-01-31 16:20:10
On Thu, Jan 30, 2014 at 11:31 PM, Stephan Mueller [off-list ref] wrote:
Am Donnerstag, 30. Januar 2014, 22:50:25 schrieb Benjamin Tissoires:
Hi Benjamin,
quoted
quoted
Can you please help me how to do that? I install Windows in a KVM with
the mouse device as a USB-passthrough device -- shall I detach the Linux
USB driver?
No, you don't have to detach the Linux USB driver (it's done for you
by KVM IIRC).
Correct, libvirtd is the one that detaches the driver when I start the VM.
quoted
quoted
Now, shall I use hid-recorder on that device or rather usbmon while
Windows is booting?
usbmon is the tool you need. hid-recorder will not work because the
hid subsystem will be disconnected as the device is used by Windows.
You can even use wireshark now. It gives you a nice interface and
interpretation of the USB packets :)
Please see attached for the USB sniffing on the USB bus with the Crucialtec
touch pad when Windows starts up and shuts down. To drive the device, Windows
uses the Crucialtec driver according to its device settings display.
The attached log contains the log information for the mouse (device 001:005)
and the USB bridge (device 001:002). I cut out the listing for the touch pad
which is also attached to that bridge.
The strange thing, however, is the following: the mouse works in Windows when
I do not sniff on the USB bus using usbmon. But as soon as I start sniffing,
it does not work any more.
Is that log helpful?
Not really :(
I would have expected to see something like that:
XXXXXXXXXXXXXXXX XXXXXXXXXX S Co:1:XXX:0 s 21 09 0202 0002 0004 4 = XXXXXXXX
XXXXXXXXXXXXXXXX XXXXXXXXXX C Co:1:XXX:0 0 4 >
(SET_REPORT on the report ID 02 with a data length of 4)
The capture seems to confuse the windows driver and it is not
initialized correctly.
Long shot: maybe if you start the capture before attaching the device
to the Windows VM (or launching it) it will be in a better shape.
I would say that as long as the device do not work under the VM with
the capture, we are really screwed.
Cheers,
Benjamin
From: Stephan Mueller <hidden> Date: 2014-01-31 21:02:18
Am Freitag, 31. Januar 2014, 05:31:53 schrieb Stephan Mueller:
Hi,
The middle mouse button works in Linux, but very differently than you may
expect: I still do not see any events when only pressing the middle mouse
button.
Out of luck, I pressed the middle button and moved the mouse. And there you
see, the mouse returns button 4 and 5.That means that pressing the middle
mouse button seems to morph the mouse into an implicit wheel.
Thus, when I press the middle button and move my mouse, X11 applies the zoom
in and zoom out operations.
I think I can remap the button 4 / 5 to button 2 for the middle mouse. But
then, the button 2 would only work when hitting the middle mouse button and
move the mouse pointer.
This is not what I want. Do you see any other way of turning the middle mouse
button into a real useful button?
Ciao
Stephan
--
| Cui bono? |