evdev and Trust TB-5300 tablet: wrong axis labels
matt.helsley at gmail.com
Sun Dec 13 18:35:03 PST 2009
2009/12/13 Daniil V. Kolpakov <dan at riga.lv>:
> Matthew, thanks for the info!
You're quite welcome!
> В сообщении от 13 декабря 2009 Matthew Helsley написал(a):
>> What does /proc/bus/input/devices say about your tablet? I've got a
>> UC-LOGIC "Genius Pensketch 12x9" which had (and still has) some USB
>> quirks. The worst was it reported the X axis as the Z axis. It turned
>> out that the hid descriptor was bad and thus the kernel hid parser got
>> confused. Specifying the "MULTI" quirk seemed to fix the axis
>> labelling problem. You can test it and other quirks out by writing to
>> a sysfs file -- though I'm looking and can't seem to find it on my
>> 2.6.31 distro kernel :(.
> /proc/bus/input/devices says pretty much the same as it does in your case:
> I: Bus=0003 Vendor=5543 Product=0004 Version=0100
> N: Name="UC-LOGIC Tablet WP5540U"
Looks like they may have re-branded the "Genius MousePen 5x4 Tablet"
to your "Trust TB-5300". Here's the usb.ids section which suggests
5543 UC-Logic Technology Corp.
0002 SuperPen WP3325U Tablet
0003 Genius MousePen 4x3 Tablet/Aquila L1 Tablet
0004 Genius MousePen 5x4 Tablet
0005 Genius MousePen 8x6 Tablet
0041 Genius PenSketch 6x8 Tablet
0042 Genius PenSketch 12x9 Tablet
If you search for "Genius MousePen 5x4 Tablet" or something like it
then perhaps you'll find more ideas for fixing your tablet. Of course
this could be misleading -- I believe there are examples of vendors
re-using USB vendor:product pairs for different products.
> P: Phys=usb-0000:03:00.0-2/input0
> U: Uniq=
> H: Handlers=mouse2 event6
To decode the following you can use /usr/include/linux/input.h
(assuming you have a libc devel package installed. I've decoded it
> B: EV=1f
> B: KEY=c01 3f0001 0 0 0 0
> B: REL=303
This is: 001100000011
which says it reports REL_MISC, REL_WHEEL, REL_Y, and REL_X events.
> B: ABS=100000f
This one says it reports ABS_X, ABS_Y, ABS_Z, ABS_RX and ABS_PRESSURE.
So, as you can see, the evdev driver properly decoded what the kernel
told it about the device. It seems like the events produced by the
kernel are wrong because the hid descriptor is probably broken.
Incidentally, you can get a copy of that too.
This isn't what I used -- it looks even more helpful:
With the example, decoded HID descriptor printed here:
Which suggests (running as root user):
user at localhost: ~/$ less /proc/bus/input/devices
I: Bus=0003 Vendor=5543 Product=0042 Version=0100
N: Name=" Tablet PF1209"
root at localhost: ~/# echo '6-2:1.0' > /sys/bus/usb/drivers/usbhid/unbind
root at localhost: ~/# lsusb -vvv -d '5543:0042'
Bus 006 Device 002: ID 5543:0042 UC-Logic Technology Corp. Genius
PenSketch 12x9 Tablet
bDeviceClass 0 (Defined at Interface level)
idVendor 0x5543 UC-Logic Technology Corp.
idProduct 0x0042 Genius PenSketch 12x9 Tablet
iProduct 2 Tablet PF1209
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 2 Tablet PF1209
** UNRECOGNIZED: 09 21 00 01 00 01 22 ea 00
bEndpointAddress 0x81 EP 1 IN
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
Device Status: 0x0000
Apparently it should have output a section entitled: "HID Device
Descriptor:" and instead I got "** UNRECOGNIZED: 09 21 00 01 00 01 22
ea 00". Do you get the same?
I recompiled my kernel to enable HID debugging which, I think, dumped
the raw table as a series of hexadecimal values. I decoded it to the
attached file using some utility I've long since forgotten. Manual
decoding requires reading the USB, HID, and HID Usage Tables standards
:(. I did some rudimentary hand decoding of my own which suggested the
table was broken but I can't recall the details.
For me, being unfamiliar with the details of the USB, HID, and kernel
input subsystems (not to mention the standards), the tiny amount of
work I managed to accomplish to get minimal support of my tablet was
still quite a learning experience.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12693 bytes
Desc: not available
More information about the xorg