You are not logged in.
Pages: 1
I have a generaltouch touchscreen, which was working in ubuntu 10.04. Now I'm trying to get it working in Arch, and it doesn't work. Symptoms are very interesting:
1) mouse cursor doesn't move when I try using touchscreen, but button press and release events are processed correctly
2) "lsusb" doesn't show device name, just vendor id: "Bus 001 Device 005: ID 1ddb:0001"
3) "xinput" lists touchscreen as "HID TOUCH HID Touch Panel id=10 [slave pointer (2)]" in virtual core pointer section
4) "xinput test 10" correctly shows button press, release and motion events, all of which look quite sane
The most strange part is that although mouse cursor doesn't move, xinput test does show correct motion events. I feel that it could be easily fixed, but I cannot find config/manual to look into. Any help would be very welcome.
PS. Relevant output from Xorg.log is as follows:
[ 10.460] (II) config/udev: Adding input device HID TOUCH HID Touch Panel (/dev/input/event2)
[ 10.460] (**) HID TOUCH HID Touch Panel: Applying InputClass "evdev tablet catchall"
[ 10.460] (II) Using input driver 'evdev' for 'HID TOUCH HID Touch Panel'
[ 10.460] (**) HID TOUCH HID Touch Panel: always reports core events
[ 10.460] (**) evdev: HID TOUCH HID Touch Panel: Device: "/dev/input/event2"
[ 10.460] (--) evdev: HID TOUCH HID Touch Panel: Vendor 0x1ddb Product 0x1
[ 10.460] (--) evdev: HID TOUCH HID Touch Panel: Found 3 mouse buttons
[ 10.460] (--) evdev: HID TOUCH HID Touch Panel: Found absolute axes
[ 10.460] (--) evdev: HID TOUCH HID Touch Panel: Found x and y absolute axes
[ 10.460] (--) evdev: HID TOUCH HID Touch Panel: Found absolute tablet.
[ 10.460] (II) evdev: HID TOUCH HID Touch Panel: Configuring as tablet
[ 10.460] (**) evdev: HID TOUCH HID Touch Panel: YAxisMapping: buttons 4 and 5
[ 10.460] (**) evdev: HID TOUCH HID Touch Panel: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[ 10.460] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/input/input2/event2"
[ 10.460] (II) XINPUT: Adding extended input device "HID TOUCH HID Touch Panel" (type: TABLET, id 10)
[ 10.461] (II) evdev: HID TOUCH HID Touch Panel: initialized for absolute axes.
[ 10.461] (**) HID TOUCH HID Touch Panel: (accel) keeping acceleration scheme 1
[ 10.461] (**) HID TOUCH HID Touch Panel: (accel) acceleration profile 0
[ 10.461] (**) HID TOUCH HID Touch Panel: (accel) acceleration factor: 2.000
[ 10.461] (**) HID TOUCH HID Touch Panel: (accel) acceleration threshold: 4
[ 10.461] (II) config/udev: Adding input device HID TOUCH HID Touch Panel (/dev/input/mouse1)
Last edited by xop (2012-11-24 12:41:18)
Offline
It seems I've narrowed problem a bit. "xinput test 10" output is the following:
motion a[2]=2958 a[3]=1814
motion a[2]=2943 a[3]=1831
And "xinput list-props 10" shows, that my touchscreen has the following axis:
"Axis Labels (268): "Abs X" (282), "Abs Y" (283), "Abs Z" (284), "Abs Rotary X" (285)"
It seems like motion events are sent for AbsZ and AbsRotaryX axis instead of AbsX and AbsY, which is why they have no effect on mouse movement. So the new questions are:
1) Is it a driver bug, and if it is - where is the best place to report?
2) Is it possible to remap axes?
Also, looking at Xorg.0.log it's apparent that touchscreen is detected as tablet instead of touchscreen, and using udevadm I've found that it is indeed detected by udev as tablet and usbhid kernel modules is used instead of usbtouchscreen. Is it normal?
Full log of "udevadm info --name=/dev/input/event2":
P: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/input/input2/event2
N: input/event2
S: input/by-id/usb-HID_TOUCH_HID_Touch_Panel-event-mouse
S: input/by-path/pci-0000:00:1a.0-usb-0:1.6:1.0-event-mouse
E: DEVLINKS=/dev/input/by-id/usb-HID_TOUCH_HID_Touch_Panel-event-mouse /dev/input/by-path/pci-0000:00:1a.0-usb-0:1.6:1.0-event-mouse
E: DEVNAME=/dev/input/event2
E: DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/input/input2/event2
E: ID_BUS=usb
E: ID_INPUT=1
E: ID_INPUT_TABLET=1
E: ID_MODEL=HID_Touch_Panel
E: ID_MODEL_ENC=HID\x20Touch\x20Panel
E: ID_MODEL_ID=0001
E: ID_PATH=pci-0000:00:1a.0-usb-0:1.6:1.0
E: ID_PATH_TAG=pci-0000_00_1a_0-usb-0_1_6_1_0
E: ID_REVISION=0000
E: ID_SERIAL=HID_TOUCH_HID_Touch_Panel
E: ID_TYPE=hid
E: ID_USB_DRIVER=usbhid
E: ID_USB_INTERFACES=:030000:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=HID_TOUCH
E: ID_VENDOR_ENC=HID\x20TOUCH
E: ID_VENDOR_ID=1ddb
E: MAJOR=13
E: MINOR=66
E: SUBSYSTEM=input
E: USEC_INITIALIZED=97692
Offline
I've made a patch to solve this problem, attaching it here in case somebody needs it. I'll open bug at bugzilla.kernel.org and try to make it upstream.
diff -crB linux-3.6/drivers/hid/hid-ids.h linux-3.6-patched/drivers/hid/hid-ids.h
*** linux-3.6/drivers/hid/hid-ids.h 2012-10-01 03:47:46.000000000 +0400
--- linux-3.6-patched/drivers/hid/hid-ids.h 2012-11-24 14:39:04.775148213 +0400
***************
*** 306,311 ****
--- 306,314 ----
#define USB_VENDOR_ID_GENERAL_TOUCH 0x0dfc
#define USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS 0x0003
+ #define USB_VENDOR_ID_GENERAL_TOUCH_2 0x1ddb
+ #define USB_DEVICE_ID_GENERAL_TOUCH_2_UNKNOWN 0x0001
+
#define USB_VENDOR_ID_GLAB 0x06c2
#define USB_DEVICE_ID_4_PHIDGETSERVO_30 0x0038
#define USB_DEVICE_ID_1_PHIDGETSERVO_30 0x0039
diff -crB linux-3.6/drivers/hid/usbhid/hid-quirks.c linux-3.6-patched/drivers/hid/usbhid/hid-quirks.c
*** linux-3.6/drivers/hid/usbhid/hid-quirks.c 2012-10-01 03:47:46.000000000 +0400
--- linux-3.6-patched/drivers/hid/usbhid/hid-quirks.c 2012-11-24 14:44:51.468546301 +0400
***************
*** 36,41 ****
--- 36,42 ----
{ USB_VENDOR_ID_CHIC, USB_DEVICE_ID_CHIC_GAMEPAD, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_DWAV, USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER, HID_QUIRK_MULTI_INPUT | HID_QUIRK_NOGET },
{ USB_VENDOR_ID_MOJO, USB_DEVICE_ID_RETRO_ADAPTER, HID_QUIRK_MULTI_INPUT },
+ { USB_VENDOR_ID_GENERAL_TOUCH_2, USB_DEVICE_ID_GENERAL_TOUCH_2_UNKNOWN, HID_QUIRK_MULTI_INPUT },
{ USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
{ USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
{ USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
Offline
Hi. Thanks to your post i was able to solve mine.
If anyone is wondering, here's what i believe to be an explanation, based on third party sources and searching.
Symptom: touchscreen always clicks at the same place (e.g. top-left corner).
1) the touchscreen manufacturer id (0x1ddb) and product id (0x1) are currently not into the usb vendors database (even after update-usbids)
lsusb -v:
Bus 002 Device 005: ID 1ddb:0001
iManufacturer 1 HID TOUCH
iProduct 2 HID Touch Panel
2) as such, the kernel (through udev) tried to discover the nature of it blind folded (i'd be interested to know on what basis), and ends up thinking that's a tablet device (and not a touchscreen)
dmesg:
[ 2.298156] usb 2-1.7: new full speed USB device using ehci_hcd and address 5
[ 2.391784] usb 2-1.7: configuration #1 chosen from 1 choice
[ 2.394379] input: HID TOUCH HID Touch Panel as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7/2-1.7:1.0/input/input7
[ 2.394442] generic-usb 0003:1DDB:0001.0005: input,hiddev96,hidraw4: USB HID v1.01 Mouse [HID TOUCH HID Touch Panel] on usb-0000:00:1d.0-1.7/input0
3) tablets (e.g. wacom) have 4 axis: X, Y, Z (because the pen can be detected when closing up to the surface, or somtimes will send out pressure information) and Rotary X (i would guess the angle of the pen)
xinput list-props 12:
Device 'HID TOUCH HID Touch Panel':
Axis Labels (271): "Abs X" (281), "Abs Y" (282), "Abs Z" (283), "Abs Rotary X" (284)
Button Labels (272): "Button Left" (143), "Button Middle" (144), "Button Right" (145), "Button Wheel Up" (146), "Button Wheel Down" (147)
4) because the driver is generic, it fails associating the correct data to the correct axis; by testing the device (xinput test 12 -- where 12 is the id of the HID Touch Panel found through xinput list), you can see that it's actually putting the X and Y coordinates to the Z and Rotary X axis; and that's exactly why when touching the screen, the cursor will always go to the top left corner (0,0).
xinput test 12:
motion a[0]=0 a[1]=0 a[2]=668 a[3]=900
motion a[0]=0 a[1]=0 a[2]=669 a[3]=912
motion a[0]=0 a[1]=0 a[2]=672 a[3]=928
a[0] and a[1] are obviously the 2 first axes X and Y, a[2] and a[3] the others (Z and Rotary X)
5) now for the solution, what we want is force the usbhid kernel module to consider the device as a 2 axis touchscreen, not a tablet.
Given the large number of unknown/OEM/slightly differring USB devices out there, the Linux kernel already has some tweaks to force some behaviours, called quircks (list of quircks in hid.h), and there is one especially for this: HID_QUIRK_MULTI_INPUT. The hid.h file will give you the hex code for the quirck.
Syntax is quirks=vendorid:productid:quirckhexcode
modinfo usbhid
parm: quirks:Add/modify USB HID quirks by specifying quirks=vendorID:productID:quirks where vendorID, productID, and quirks are all in 0x-prefixed hex (array of charp)
You can set quircks either directly into the kernel like you did (into the hid blacklist), or at module loading time (modprobe usbhid quirks=1ddb:0x1:0x40), or at boot time by adding usbhid.quirks=0x1ddb:0x1:0x40 to the kernel boot line.
After rebooting/reloading, there is a new xinput device available (with the same name), but only 2 axes, and it works, and can be calibrated.
However, i'd be curious about:
* what exactly is the HID_QUIRK_MULTI_INPUT doing ? From third party sources, i think it will break the device into 2 devices, explaining why xinput -list shows a new device; i guess that the first one has X and Y, and the other Z and Rotary X
* since the device does not actually have 4 axes, any way to remove/disable the 2nd device permanently ?
* why did usbhid fallback to tablet mode ?
* is forcing the use of quirks the right way to go inside the blacklist ? Shouldn't the new vendor id and product id be added to the product database, and set the device to touchscreen type, and not force by using quircks ?
Thanks for any follow up...
Offline
Pages: 1