Docs/Howto/Touchscreen

From Mandriva Community Wiki

Jump to: navigation, search

Contents

[edit] Dependencies

  • Mandriva 2008.0 Powerpack installed
  • LG Flatron L1510SF installed
  • touch-functionality active, but not correct configured

[edit] Steps

[edit] Problem

When playing with the system, you may notice that the mousepointer is moving up & down when you're tapping right & left.

Solution

I edited the file /etc/modprobe.conf and added the line

options usbtouchscreen swap_xy=1

[edit] Installing the X-driver

  • Download the evtouch module from Conans Website. There are a lot of good instructions on this site. You should follow the majority of them.
  • Unpack the downloaded file
  • Copy evtouch_drv.so to /usr/lib/xorg/modules/input

[edit] Edit xorg.conf (first time)

[edit] Determine Event Handler

Take a look at /proc/bus/input/devices. In that file I found the following information:

I: Bus=0003 Vendor=0403 Product=f9e9 Version=0100
N: Name="ITM Inc USB Touch Panel"
P: Phys=/input0
S: Sysfs=/class/input/input1
U: Uniq=
H: Handlers=mouse0 event1 ts0
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=1000003


The line starting with 'H' interests us, more particular the event1 (might be another eventX for you) entry. This is the entry we'll need to use in xorg.conf. Pay attention! This information might change when you attach other input devices (mice) to your computer. I have no idea how to prohibit that.

[edit] Edit xorg.conf

Add the following information to /etc/X11/xorg.conf

Section "InputDevice"
  Identifier "touchscreen1"
  Driver "evtouch"
  Option "Device" "/dev/input/event1"
  Option "Emulate3Buttons"
  Option "Emulate3Timeout" "50"
  Option "ReportingMode" "Raw"
  Option "Calibrate" "1"
  Option "DeviceName" "touchscreen"
  Option "SendCoreEvents" "On"
  Option "SwapX" "1"
EndSection

Notice

  • You might notice that the horizontal or vertical axis are oriented in the opposite direction. In the above case, I added the option SwapX because the horizontal axis was directed in the opposite direction. There's a similar option SwapY you might or might not need.
  • Notice also that the driver is configured for calibration. You'll have to add this line for calibrating, and remove this line for normal use.

Add to your ServerLayout section:

InputDevice "touchscreen1" "CorePointer"


[edit] Calibrate the screen

  • Make sure you're in no graphical shell. Should you be in a graphical shell, go to the command prompt by pressing <Alt>-<N> on the logon-screen. Login as root.
  • Run the command calibrate.sh from the directory where you unpacked the driver.
  • Follow the instructions you find in the corresponding README.calibration

I had two problems doing that:

  • At first, there were some complaints about Helvetica-fonts not installed. I installed them using the Mandriva Configuration Center.
  • Secondly, it came complaining about 'empty_cursor.xbm' not beeing found. You need to copy that file to the root directory (you can find it in the same directory you unpacked the driver).

When the calibration finishes, it generates out.txt, a file you need to merge with the xorg.conf file.

Notice I had to find out that, because of using SwapX, I had to point the crosses in the calibration exercise from right to left (iso from left to right). This means you can't look at the red-colored crosses.

[edit] Edit xorg.conf (second time)

The option Calibrate should be commented out, and you need to merge the contents of 'out.txt'. As an example, I've added my final section.

Section "InputDevice"
  Identifier "touchscreen1"
  Driver "evtouch"
  Option "Device" "/dev/input/event1"
  Option "Emulate3Buttons"
  Option "Emulate3Timeout" "50"
  Option "ReportingMode" "Raw"
  # Option "Calibrate" "1"
  Option "DeviceName" "touchscreen"
  Option "SendCoreEvents" "On"
  Option "SwapX" "1"

  # Calibration Parameters

  Option "MinX" "169"
  Option "MinY" "273"
  Option "MaxX" "3949"
  Option "MaxY" "3867"
  Option "x0" "-2"
  Option "y0" "-2"
  Option "x1" "-8"
  Option "y1" "-3"
  Option "x2" "-12"
  Option "y2" "-3"
  Option "x3" "-9"
  Option "y3" "7"
  Option "x4" "-9"
  Option "y4" "1"
  Option "x5" "-9"
  Option "y5" "0"
  Option "x6" "-4"
  Option "y6" "9"
  Option "x7" "-4"
  Option "y7" "6"
  Option "x8" "-7"
  Option "y8" "3"
EndSection


[edit] Finishing remarks

  • I had to do quite some iterations 'calibrate' - adapt 'xorg.conf' - test before everything ran smoothly.
  • I also did some finetuning on the options (xn and yn from out.txt).
  • I still see that the left border cannot be reached
Personal tools