Hi all,

This is related to thread on linuxwacom-discuss about older Bamboo's
PAD not working right with recent xf86-input-wacom's.  This device is
handled by Graphire driver in kernel.

The reason is related to interaction of multiple recent code
submissions.  But the root issue to me is a kernel side issue that
xf86-input-wacom was trying to hopelessly work around.

Take a look at this kernel code that is executed when either a) a PAD
device needs to send a button press or wheel movement or b) one last
time when buttons/wheel are released.

                if (prox || wacom->id[1]) {
                        wacom->id[1] = PAD_DEVICE_ID;
                        input_report_key(input, BTN_0, (data[7] & 0x08));
                        input_report_key(input, BTN_1, (data[7] & 0x20));
                        input_report_key(input, BTN_4, (data[7] & 0x10));
                        input_report_key(input, BTN_5, (data[7] & 0x40));
                        input_report_abs(input, ABS_WHEEL, (data[8] & 0x7f));
                        input_report_key(input, BTN_TOOL_FINGER, 0xf0);
                        if (!prox)
                                wacom->id[1] = 0;
                        input_report_abs(input, ABS_MISC, wacom->id[1]);
                        input_event(input, EV_MSC, MSC_SERIAL, 0xf0);
                }

Notice the important BTN_TOOL_FINGER and MSC_SERIAL are hardcoded.
This means upon module load they will likely be sent and never to be
seen by a working xf86-input-wacom.  Thats not so bad, I submitted a
patch to work around that part.

What is bad is ABS_MISC is not fixed in same way and confuses user
land really bad about what kernel is requesting to be updated.

Here is how we get confused:

[button press]
BTN_TOOL_FINGER=xf0
ABS_MISC=PAD_DEVICE_ID
MSC_SERIAL=0xf0
BTN_1=1
[xf86-input-wacom saw MSC_SERIAL=0xf0 and knows we are updating
channel 2.  It sets channel 2's device_id=PAD_DEVICE_ID]

[button release]
ABS_MISC=0
[still channel 2 since filtered data and resets device_id=0]

[stylus in prox ]
BTN_TOOL_PEN=1
ABS_MISC=STYLUS_DEVICE_ID
[xf86-input-wacom defaults to channel 0 when no MSC_SERIAL sent and
set device_id=STYLUS_DEVICE_ID]

[stylus out prox]
BTN_TOOL_PEN=0
ABS_MISC=0
[xf86-input-wacom sets channel 0's device_id=0]

[press button]
ABS_MISC=PAD_DEVICE_ID
[MSC_SERIAL is always fixed at 0xf0 and xf86-input-wacom gets confused
its filtered out and defaults to channel 0.  Updates wrong channel's
device_id=PAD_DEVICE_ID]

So thats two issues:

* Reset BTN_TOOL_FINGER=0 when PAD out of proximity to kick
xf86-input-wacom to setup device_id's right and
* Send MSC_SERIAL for non-PAD devices so xf86-input-wacom can known
when a channel change really occurred and stop putting PAD data in
channel 0.

I obviously need some help here since I'm flying blind without the
problem device.  I can make a kernel patch but can't test it.

Part of this email is also to make sure no one thinks we should try to
solve this purely on userland side.

Chris

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to