Quantcast

OpenBSD (X41) Tablet Support (linuxwacom)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

OpenBSD (X41) Tablet Support (linuxwacom)

Michael-392
Hi,

I am trying to get the tablet screen working on the X41. After googling
I found that it once worked with OpenBSD 4.4 and linuxwacom-0.8.2:

http://webcache.googleusercontent.com/search?q=cache:2ywAxrd95GIJ:https://osuny.co.uk/~azure/txt/openbsd_thinkpad_x41_tablet.txt

However, a lot has changed since then. 0.8.2 doesn't work anymore with
the -current OpenBSD X11 version and I also don't get any newer version
of linxuwacom to compile for other reasons (seems to have something todo
with LINUX_INPUT).

Anyone got more luck and/or porting experience? ;-)

Michael

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD (X41) Tablet Support (linuxwacom)

Stuart Henderson
On 2010/04/29 12:35, Michael wrote:
> Hi,
>
> I am trying to get the tablet screen working on the X41. After googling
> I found that it once worked with OpenBSD 4.4 and linuxwacom-0.8.2:
>
> http://webcache.googleusercontent.com/search?q=cache:2ywAxrd95GIJ:https://osuny.co.uk/~azure/txt/openbsd_thinkpad_x41_tablet.txt
>
> However, a lot has changed since then. 0.8.2 doesn't work anymore with
> the -current OpenBSD X11 version

You could look at the compatibility changes made to usbtablet and
see if you can port them across.

http://www.openbsd.org/cgi-bin/cvsweb/xenocara/driver/openbsd-input-usbtablet/src/Attic/usbtablet.c

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD (X41) Tablet Support (linuxwacom)

Michael-392
Hi,

>> I am trying to get the tablet screen working on the X41. After googling
>> I found that it once worked with OpenBSD 4.4 and linuxwacom-0.8.2:
>>
>> http://webcache.googleusercontent.com/search?q=cache:2ywAxrd95GIJ:https://osuny.co.uk/~azure/txt/openbsd_thinkpad_x41_tablet.txt
>>
>> However, a lot has changed since then. 0.8.2 doesn't work anymore with
>> the -current OpenBSD X11 version
>
> You could look at the compatibility changes made to usbtablet and
> see if you can port them across.
>
> http://www.openbsd.org/cgi-bin/cvsweb/xenocara/driver/openbsd-input-usbtablet/src/Attic/usbtablet.c

Thanks, but I am not good enough at C for things like that. :-(


Michael


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD (X41) Tablet Support (linuxwacom)

stanleylieber
In reply to this post by Michael-392
Michael-392 wrote:

>
> Hi,
>
> I am trying to get the tablet screen working on the X41. After googling
> I found that it once worked with OpenBSD 4.4 and linuxwacom-0.8.2:
>
> http://webcache.googleusercontent.com/search?q=cache:2ywAxrd95GIJ:https://osuny.co.uk/~azure/txt/openbsd_thinkpad_x41_tablet.txt
>
> However, a lot has changed since then. 0.8.2 doesn't work anymore with
> the -current OpenBSD X11 version and I also don't get any newer version
> of linxuwacom to compile for other reasons (seems to have something todo
> with LINUX_INPUT).
>
> Anyone got more luck and/or porting experience? ;-)
>
> Michael


I helped test the original howto you linked above. Pen functions fully
worked under 4.4-RELEASE.

I played around with this a bit tonight (running the 05/29/10 snapshot of
4.7-CURRENT) and after some patching I got linuxwacom-0.8.2 to compile and
install (see patch below).

The next problem was calibrating the pen. After I setup xorg.conf
and restarted, things were way out of whack. Moving the pen to the
upper-left corner brought the cursor almost in line with the pen point.
Moving the pen away from the upper-left corner of the screen resulted in an
increasing distance between the cursor and the pen point.

I wasn't sure where to proceed from there. It is possible my patch messes
up something important for pen calibration. The
InitValuatorClassDeviceStruct function  was being called with too many
arguments (I removed only what I believed to be bounds checking, but
that seemed to satisfy the compiler). Removing OutOfProximity is a
change from versions of linuxwacom that came after 0.8.2 and shouldn't
hurt anything (especially since we specify Absolute in xorg.conf
anyway).

None of the calibration tools I've found so far seem to work with OpenBSD.
The bundled utility wacomcpl will launch, but doesn't recognize any devices.
I found another perl script someone wrote to make calibration easier, but it
requires Glib2 and GTK+ perl modules, which are marked as broken in ports.

I'll post here if I make any more progress.

-sl



--- begin patch ---

--- src/xdrv/xf86Wacom.c.old    Sun May 30 22:46:45 2010
+++ src/xdrv/xf86Wacom.c        Sun May 30 22:48:57 2010
@@ -582,14 +582,11 @@
       if (InitValuatorClassDeviceStruct(local->dev, nbaxes,
 #if WCM_XINPUTABI_MAJOR == 0
                                         xf86GetMotionEvents,
-                                         local->history_size,
 #else
                                         GetMotionHistory,
-                                         GetMotionHistorySize(),
 #endif
                                         ((priv->flags & ABSOLUTE_FLAG) ?
-                                         Absolute : Relative) |
-                                         OutOfProximity ) == FALSE)
+                                         Absolute : Relative)) == FALSE)
       {
               ErrorF("unable to allocate Valuator class device\n");
               return FALSE;
@@ -925,18 +922,6 @@
               }
               pos += cnt;

-               if (common->wcmDevCls != &gWacomUSBDevice)
-               {
-                       common->wcmPktLength = 9;
-                       data = common->buffer + pos;
-                       if ( data[0] & 0x18 )
-                       {
-                               if (common->wcmMaxCapacity)
-                                       common->wcmPktLength = 7;
-                               else
-                                       common->wcmPktLength = 5;
-                       }
-               }
       }

       if (pos)

--- end patch ---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD (X41) Tablet Support (linuxwacom)

Oliver Peter-6
On Mon, 31 May 2010 01:05:51 -0600
Stanley Lieber <[hidden email]> wrote:

> Michael-392 wrote:
> >
> > Hi,
> >
> > I am trying to get the tablet screen working on the X41. After
> > googling I found that it once worked with OpenBSD 4.4 and
> > linuxwacom-0.8.2:
> >
> > http://webcache.googleusercontent.com/search?q=cache:2ywAxrd95GIJ:https://osuny.co.uk/~azure/txt/openbsd_thinkpad_x41_tablet.txt
> >
> > However, a lot has changed since then. 0.8.2 doesn't work anymore
> > with the -current OpenBSD X11 version and I also don't get any
> > newer version of linxuwacom to compile for other reasons (seems to
> > have something todo with LINUX_INPUT).
> >
> > Anyone got more luck and/or porting experience? ;-)
> >
> > Michael  
>
>
> I helped test the original howto you linked above. Pen functions fully
> worked under 4.4-RELEASE.
>
> I played around with this a bit tonight (running the 05/29/10
> snapshot of 4.7-CURRENT) and after some patching I got
> linuxwacom-0.8.2 to compile and install (see patch below).
>
> The next problem was calibrating the pen. After I setup xorg.conf
> and restarted, things were way out of whack. Moving the pen to the
> upper-left corner brought the cursor almost in line with the pen
> point. Moving the pen away from the upper-left corner of the screen
> resulted in an increasing distance between the cursor and the pen
> point.
>
> I wasn't sure where to proceed from there. It is possible my patch
> messes up something important for pen calibration. The
> InitValuatorClassDeviceStruct function  was being called with too many
> arguments (I removed only what I believed to be bounds checking, but
> that seemed to satisfy the compiler). Removing OutOfProximity is a
> change from versions of linuxwacom that came after 0.8.2 and shouldn't
> hurt anything (especially since we specify Absolute in xorg.conf
> anyway).

I have a X41 Tablet here as well and tried to apply your patch - I also
had to modify some of the header files to include xorgVersion.h and
xorg-server.h instead of the XF86 stuff.

It compiled fine but after modifying the kernel (nasty stuff in the
howto) and starting X, the machine crashed immediately after the pen
hits the display for the first time.

I would be happy to help out and test code - but my C knowledge is
reduced to the easy modifications mentioned above...

--
Oliver PETER     email: [hidden email]     ICQ# 113969174
"I'm just a simple man trying to make my way in the universe."
                                                -- Jango Fett

Loading...