Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72591 - wacom penpartner pressure sensitivity not working in xorg-x11
Summary: wacom penpartner pressure sensitivity not working in xorg-x11
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: X11 External Driver Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-26 17:52 UTC by Michael
Modified: 2006-08-25 20:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael 2004-11-26 17:52:06 UTC
The pressure sensitivity of a serial penpartner tablet using the wacom driver in xorg-x11 [xorg-x11-6.8.0-r3, maybe other versions] doesn't work in applications like the gimp.

The patch below fixes it. There are a lot of code paths
in this file checking for == 255, so although they work with this change
it's possible, if the hardware really has a MaxZ of 256 that the real bug is elsewhere, although with this patch the hardware functions without problems.

--- /usr/tmp/portage/xorg-x11-6.8.0-r3/work/xc/programs/Xserver/hw/xfree86/input/wacom/xf86Wacom.c      2004-04-23 20:54:06.000000000 +0100
+++ /usr/tmp/portage/xorg-x11-6.8.0-r3.sav/work/xc/programs/Xserver/hw/xfree86/input/wacom/xf86Wacom.c  2004-11-25 20:14:58.000000000 +0000
@@ -1939,7 +1939,7 @@ static void serialInitPenPartner(WacomCo
     common->wcmPktLength = 7;
     common->wcmVersion = version;

-    common->wcmMaxZ = 256;
+    common->wcmMaxZ = 255;
     common->wcmResolX = 1000; /* tablet X resolution in points/inch */
     common->wcmResolY = 1000; /* tablet Y resolution in points/inch */
 }

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Michael 2004-11-26 18:01:43 UTC
>There are a lot of code paths
>in this file checking for == 255, so although they work with this change
>it's possible, if the hardware really has a MaxZ of 256 that the real bug is 
>elsewhere

Sorry for the double comment, but having read this it's not very clear what I mean.

Let me try again.

In the patch for xf86wacom.c there are numerous checks if MaxZ equals 255.

Depending on whether MaxZ is 255 or not affects the way the file calculates the pressure value it reads from the hardware.

So, although patching it to make MaxZ equal 255, makes it work, it could just be hiding a bug in those else statements.

But the loss of 1 bit of resolution probably makes no difference anyway.
Comment 2 Bryan Stine (RETIRED) gentoo-dev 2004-11-27 11:32:53 UTC
Is this applicable for x11-misc/linuxwacom as well?
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2004-11-27 17:38:44 UTC
I'd prefer that people didn't even try to use the wacom driver included in xorg-x11 for now, since it's so out of date. Bryan's suggestion is the way to go.

I'll probably stop building it altogether, which will more strongly encourage people to use the modular one (x11-misc/linuxwacom).
Comment 4 Willie Sippel 2004-11-27 19:54:41 UTC
I would suggest ripping out the current Wacom driver in xorg-x11 and replace it with the xf86Wacom.c from linuxwacom-0.4.1, as this drivers is the only one definitely working on AMD64 (while supporting some more recent tablets) - at least until linuxwacom-0.6.x is fixed to work on AMD64 systems. 
Comment 5 Michael 2004-11-27 20:48:15 UTC
Bryan, yes it's buggy there too.

[The file in linuxwacom with the code is wcmSerial.c]

static void serialInitPenPartner(WacomCommonPtr common, int fd,
        const char* id, float version)
{
        DBG(2, ErrorF("detected a PenPartner model\n"));

        common->wcmProtocolLevel = 4;
        common->wcmPktLength = 7;
        common->wcmVersion = version;

        common->wcmMaxZ = 256;
        common->wcmResolX = 1000; /* tablet X resolution in points/inch */
        common->wcmResolY = 1000; /* tablet Y resolution in points/inch */
}


So, whatever you decide w.r.t rearranging how you build X, copying files or whatever - please look at the code first and fix the bug :o)
Comment 6 Donnie Berkholz (RETIRED) gentoo-dev 2004-11-27 20:53:38 UTC
Could you please (1) check whether that's been reported upstream and (2) if needed, report it upstream at http://sourceforge.net/tracker/?group_id=69596&atid=525124 (direct link to their bug tracker)?

Please post the URL here once you do, so we can track it there.
Comment 7 Bryan Stine (RETIRED) gentoo-dev 2004-11-27 21:37:07 UTC
As far as linuxwacom and x86-64, I've got hardware for both so I'll see what I can do with it.
Comment 8 Willie Sippel 2004-12-05 02:46:42 UTC
OK, I found out how to get a working Xorg driver for AMD64 systems (used linuxwacom 0.6.6):

The Makefile has hardcoded settings for x86, that's obviously wrong. But the gentoo 
linuxwacom-0.6.4-nonx86.patch doesn't fix the problem, it just removes -D__i386__ from
the flags. That's not sufficient - remove -D__i386__ and add -D__amd64__ and -D_XSERVER64,
and it should work. 

Anyway, I'm going back to linuxwacom 0.4.1 now, since the 0.6.x drivers are broken by design.
The 4DMouse throttle doesn't generate scroll (button 4/5) events, so it's completely useless,
and it stops working as soon as I lift it off the tablet...
Comment 9 Michael 2005-02-22 15:46:04 UTC
I tagged a comment onto an existing bug - it looks like they are fixing this upstream in the next release now, so you can probably close this bug.

http://sourceforge.net/tracker/index.php?func=detail&aid=1037032&group_id=69596&atid=525124

Cheers.
Comment 10 Hal Engel 2005-08-15 15:45:52 UTC
I have been following this bug
https://sourceforge.net/tracker/?func=detail&atid=525124&aid=980777&group_id=69596
upstream which is the bug that covers the problems with amd64.  The bug has been
closed as fixed and supposedly 0.6.9 has the fix. 
Comment 11 Hanno Böck gentoo-dev 2006-08-25 20:07:29 UTC
Seems to be very outdated and should have been fixed for a long time.