Subject: Re: Wacom tablets and NetBSD?
To: Michael van Elst <mlelstv@serpens.de>
From: Geert Hendrickx <ghen@telenet.be>
List: netbsd-users
Date: 01/22/2007 22:07:44
On Mon, Jan 22, 2007 at 09:21:12PM +0100, Michael van Elst wrote:
> With patch:
> 
> ehci0: handing over low speed device on port 3 to uhci1
> uhub4: port 3, device disappeared after reset
> uhidev0 at uhub1 port 1 configuration 1 interface 0
> uhidev0: WACOM CTE-430-UV3.1-4, rev 1.10/3.14, addr 2, iclass 3/1
> uhidev0: 3 report ids
> ums0 at uhidev0 reportid 1: 3 buttons and Z dir.
> wsmouse1 at ums0 mux 0
> uhid0 at uhidev0 reportid 2: input=7, output=0, feature=2
> uhid1 at uhidev0 reportid 3: input=0, output=0, feature=2
> 
> usbhidctl -r shows:
> 
> Report descriptor:
> Collection page=Digitizer usage=Digitizer
> Collection page=Digitizer usage=Digitizer
> Input   size=1 count=1 page=Digitizer usage=Touch, logical range 0..1
> Input   size=1 count=1 page=Digitizer usage=Barrel_Switch, logical range 0..1
> Input   size=1 count=1 page=Digitizer usage=Barrel_Switch, logical range 0..1
> Input   size=1 count=1 page=Digitizer usage=Invert, logical range 0..1
> Input   size=1 count=1 page=Digitizer usage=Transducer_Index, logical range 0..1
> Input   size=1 count=1 page=Digitizer usage=In_Range, logical range 0..1
> Input   size=16 count=1 page=Generic_Desktop usage=X, logical range 0..10206
> Input   size=16 count=1 page=Generic_Desktop usage=Y, logical range 0..7422
> Input   size=16 count=1 page=Digitizer usage=Tip_Pressure, logical range 0..511
> End collection
> Feature size=16 count=1 page=Digitizer usage=Undefined, logical range 0..511
> Total   input size 7 bytes
> Total  output size 0 bytes
> Total feature size 2 bytes
> 
> Now /dev/uhid0 works together with the usbtablet driver. wsmouse
> doesn't return any events. This is because all events are
> sent with reportid 2.
> 
> 
> Without patch:
> 
> ehci0: handing over low speed device on port 4 to uhci1
> uhub4: port 4, device disappeared after reset
> uhidev0 at uhub1 port 2 configuration 1 interface 0
> uhidev0: WACOM CTE-430-UV3.1-4, rev 1.10/3.14, addr 2, iclass 3/1
> uhidev0: 3 report ids
> ums0 at uhidev0 reportid 1: 3 buttons and Z dir.
> wsmouse1 at ums0 mux 0
> uhid0 at uhidev0 reportid 2: input=7, output=0, feature=1
> uhid1 at uhidev0 reportid 3: input=0, output=0, feature=1
> 
> usbhidctl -r shows:
> 
> Report descriptor:
> Collection page=Digitizer usage=Digitizer
> Collection page=0x0000 usage=0x0000
> Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
> Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
> Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
> Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
> Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
> Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
> Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
> End collection
> Feature size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
> Total   input size 7 bytes
> Total  output size 0 bytes
> Total feature size 1 bytes
> 
> Now /dev/uhid0 does nothing but wsmouse returns regular mouse events. And
> obviously all events are sent with reportid 1.

I see similar output in dmesg and usbhidctl after patching the kernel to
support my Graphire4.

> > > In my experience the X server will abort when uhid0 is detached, but that
> > > was in XFree 4.2 days. Maybe current XFree or X.org handle such errors
> > > more gracefully.
> > 
> > My X server doesn't mind pluggin or unplugging a mouse...
> 
> Do you use /dev/uhid0 (with usbtablet driver) or /dev/wsmouse?

When using wsmouse, I can unplug the mouse and/or the tablet without problems.
Plugging in works for /dev/wsmouse but not for the invididual /dev/wsmouse* (X
keeps working but the newly added device is not detected, it works only after
restarting X).
 
I'm currently backporting the usbtablet to the netbsd-3 branch so I can use
the tablet in absolute mode (wsmouse is in relative mode).

	Geert