<div dir="ltr">2014-08-19 10:02 GMT+03:00 Peter Hutterer <<a href="mailto:peter.hutterer@who-t.net">peter.hutterer@who-t.net</a>>:<br><br>> On Tue, Aug 19, 2014 at 06:29:40AM +0300, Leonid Borisenko wrote:<br>> > HID device 'USB HID v1.11 Mouse' provided by Microsoft Wireless Optical<br>
> > Desktop=C2=AE 2.20 (connected to USB and identified as vendor 0x45e, pr=<br>oduct<br>> > 0xe3, version 0x111) is reported as supporting EV_ABS event with<br>> ABS_MT_SLOT<br>> > code, but nevertheless libevdev_get_num_slots returns -1.<br>
><br>> yeah, that's intentional. libevdev detects those devices (through<br>> guesswork,<br>> but still...) and returns -1 as slot number.<br>><br>> > Furthermore, all connected devices (mouse and keyboard) don't produce a=<br>
ny<br>> > EV_ABS events for that HID Mouse device in tests with evtest.<br>> ><br>> > Before this fix mouse didn't work in Weston (but worked in X.Org).<br>> ><br>> > As partially explained by LKML message [1] (Message-Id [2]):<br>
> ><br>> > The root of the problem comes from hid-input, which maps unknown ax=<br>is<br>> > to ABS_MISC. However, when an event code is already in use, hid-inp=<br>ut<br>> > uses the one after, leading to uses of ABS_MISC + N, where N is the<br>
> > number of unknown axis.<br>> ><br>> > We are encountering a problem with the multitouch protocol here<br>> because<br>> > if a device has more than 7 unknown axis (which is the case for the<br>
> PS3<br>> > Sixaxis controller), then the unknown axis get maps to ABS_MT_SLOT<br>> and<br>> > beyond.<br>> ><br>> > [1] <a href="https://lkml.org/lkml/2013/11/20/515">https://lkml.org/lkml/2013/11/20/515</a><br>
> > [2] <a href="mailto:1384983141-31019-1-git-send-email-benjamin.tissoires@redhat.com">1384983141-31019-1-git-send-email-benjamin.tissoires@redhat.com</a><br>> ><br>> > [...]<br>><br>> so, as I said above the libevdev behaviour is intentional and our<br>
> indicator<br>> that this isn't a MT device after all. We should integrate that knowledge<br>> better so that we don't label a device as touch device when it isn't, and<br>> so<br>> that we process events from those axes as normal ABS events instead of MT<br>
> events.<br><div><br></div><div>Unfortunately, my device (that Wireless Optical Desktop) doesn't produce<br></div>any events with the questionable codes, so if I would try to change<br>libinput behavior for these events to produce visible reaction, I'll not be<br>
able to test changes for sanity.<br><br>I understand that my patch isn't general enough. It fixes my problem.<br>though, making mouse working in Weston. Current libinput code isn't<br>forgiving enough in handling of similar devices, so it cripples experience.<br>
I'm not complaining, it's v0.5, so missing functionality is acceptable, but<br>it's frustrating.<br><br>I will file a bug report in hope that someone will propose more general fix=<br>.<br>As a sidenote, cited LKML message says that "the axis currently mapped on<br>
ABS_MT_SLOT is a special case in the kernel,<br>and it is not updated", so I think processing axes as normal ABS events<br>will not work for the axis reported as ABS_MT_SLOT.<div><br></div><div>[Peter, sorry for spamming with this message in personal mail, it was my</div>
<div>unintentional mistake in using Gmail UI.]<br></div></div>