# USB TouchScreen [SOLVED]

## Aonoa

I have a LG L1730SF I'm trying to get working with Gentoo and hope someone can help me out. I've compiled gentoo-sources 2.6.17-r8 with the usbtouchscreen drivers:

```
CONFIG_USB_TOUCHSCREEN=y

CONFIG_USB_TOUCHSCREEN_EGALAX=y

CONFIG_USB_TOUCHSCREEN_PANJIT=y

CONFIG_USB_TOUCHSCREEN_3M=y

CONFIG_USB_TOUCHSCREEN_ITM=y
```

and

```
CONFIG_INPUT_EVDEV=y
```

Do I need this? :

```
# CONFIG_INPUT_TOUCHSCREEN is not set
```

I know the LG usb device uses the ITM driver, but I'm not certain how to configure modular Xorg 7.1 to use it as a pointer device. Which Xorg driver should I use? evdev?

I tried the following in a few different configurations but nothing worked 100%.

```
Section "InputDevice"

        Identifier "touchscreen0"

        Driver "evdev"

        Option "Device" "/dev/input/event3"

        Option "DeviceName" "touchscreen"

        Option "MinX" "62"

        Option "MinY" "1910"

        Option "MaxX" "1966"

        Option "MaxY" "45"

        Option "ReportingMode" "Raw"

        Option "SendCoreEvents"

EndSection
```

cat /proc/bus/input/devices gave me the following:

```
I: Bus=0003 Vendor=0403 Product=f9e9 Version=0100

N: Name="ITM Inc USB Touch Panel"

P: Phys=/input0

S: Sysfs=/class/input/input5

H: Handlers=mouse2 event3 

B: EV=b

B: KEY=400 0 0 0 0 0 0 0 0 0 0

B: ABS=1000003
```

/var/log/Xorg.0.log gives me this error while trying the above configuration:

```
(**) touchscreen0: always reports core events

(**) touchscreen0: Device: "/dev/input/event3"

(WW) touchscreen0: Don't know how to use device

(EE) PreInit failed for input device "touchscreen0"

(II) UnloadModule: "evdev"

(II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD)

   *** If unresolved symbols were reported above, they might not

   *** be the reason for the server aborting.

Backtrace:

0: X(xf86SigHandler+0xa0) [0x80a84da]

1: [0xffffe420]

2: /lib/libc.so.6(malloc+0x81) [0xb7d90491]

3: X(Xalloc+0x24) [0x8168fef]

4: X(AssignTypeAndName+0x2f) [0x8126b3e]

5: X(xf86ActivateDevice+0x5f) [0x80bc79a]

6: X(InitInput+0x19d) [0x809557a]

7: X(main+0x3ba) [0x806eba9]

8: /lib/libc.so.6(__libc_start_main+0xd4) [0xb7d40f24]

9: X(FontFileCompleteXLFD+0x99) [0x806e2a1]

Fatal server error:

Caught signal 11.  Server aborting
```

All help is welcome.  :Smile: Last edited by Aonoa on Sat Sep 30, 2006 4:25 pm; edited 1 time in total

----------

## Aonoa

I think I am somewhat closer to a working solution. I found the following page: 

```
http://www.ubuntuforums.org/archive/index.php/t-216047.html
```

Where someone also had a L1730SF and made it work with Debian using a driver-patch he posted. I've used the patch and changed my xorg.conf to match his and now I don't get any errors in Xorg.0.log anylonger. The only thing is, the touchscreen is not responding and 

```
cat /dev/input/event3
```

does not output anything when I touch/use the touchscreen. What could be wrong?

----------

## Aonoa

Still not working, I originally thought it would be easy to get this screen working with Linux. No one configured touchscreens before?

This is the current xorg section I'm using now. 

```
Section "InputDevice"

        Identifier "touchscreen"

        Driver "evtouch"

        Option "Device" "/dev/input/event3"

        Option "DeviceName" "touchscreen"

        Option "MinX" "200"

        Option "MinY" "300"

        Option "MaxX" "3850"

        Option "MaxY" "3800"

        Option "ReportingMode" "Raw"

        Option "Emulate3Buttons"

        Option "Emulate3Timeout" "50"

        Option "SendCoreEvents"

EndSection
```

EDIT: For some weird reason it seems that compiling itmtouch.c and using itmtouch.ko was much better than using the unified usbtouchscreen.ko driver that's in the newer kernels. Using itmtouch.ko I'm actually getting output from /dev/input/eventX and am able to move the cursor about, albeit it just jumps randomly.

EDIT: Playing around with the calibrate.sh accompanying the evtouch driver I've almost got a completely accurate touchscreen, finally.  :Smile:  I'll play around some more with the values and hopefully attune it even better. Considering this solved.

----------

## madisonicus

 *Heion wrote:*   

> EDIT: Playing around with the calibrate.sh accompanying the evtouch driver I've almost got a completely accurate touchscreen, finally.  I'll play around some more with the values and hopefully attune it even better. Considering this solved.

 Would love to see your final configuration for this if you don't mind.

Thanks,

m

----------

