Comment 123 for bug 549447

Revision history for this message
In , Chris (chris-redhat-bugs) wrote :

I was able to get my eGalax touchscreen working with following work around. I don't know best fix to hid-input.c yet so instead I added a hack. I chose to hack xf86-input-evdev since its updated less then kernel and also hid-input is NOT a kernel module in Fedora and so harder to replace.

First, I created the file /etc/hal/fdi/policy/11-evdev.fdi with contents listed in comment #42 so that xf86-input-evdev is used.

Next, I also downloaded and applied below patch to xf86-input-evdev so that Z/RX were treated same as X/Y.

And finally, I came up with following calibration values by using "evtest /dev/input/event7", tracing around border of screen, and monitoring min/max values reports for Z/RX values and used those as X/Y values instead:

xinput --set-int prop 9 "Evdev Axis calibration" 32 48 3990 95 3990

*** evdev.c.orig 2010-01-28 21:13:58.153740219 -0600
--- evdev.c 2010-01-28 21:15:25.928480429 -0600
***************
*** 590,595 ****
--- 590,603 ----
      if (ev->code > ABS_MAX)
          return;

+ /* Hack to work around but in hid-input.c were double X/Y
+ * inputs cause second set to be mapped to Y/RX.
+ */
+ if (ev->code == ABS_Z)
+ ev->code = ABS_X;
+ if (ev->code == ABS_RX)
+ ev->code = ABS_Y;
+
      pEvdev->vals[pEvdev->axis_map[ev->code]] = value;
      if (ev->code == ABS_X)
          pEvdev->abs |= ABS_X_VALUE;