Usb touchscreen unter Linux

Aus Primatenwiki
Zur Navigation springen Zur Suche springen
  1. Get the latest 2.6 kernel source (from http://kernel.org) or as distribution packet.
  2. Extract the kernel source
  3. Do a 'make menuconfig', and enable the following options in the
 kernel source:
       Device Drivers --->
               Input device support --->
                       <*> Event interface
                        [Other options may be added. The "Touchscreen
                         interface" only adds Compaq touchscreen protocol
                         support on /dev/input/ts*, so you may enable if you
                         want however it has no effect on /dev/input/event*,
                         which is what this HOWTO covers.]
               USB support --->
                       <*> USB Human Interface Device (full HID) support
                       [*] HID input layer support
                       ...
                       <*> MicroTouch USB Touchscreen Driver
                        [This may be built as a module as well]
  1. Finally install the kernel, reboot, etc.
  2. Once the kernel is installed, and if you plug in the controller, you should see something similar to the following in your 'dmesg' output:
drivers/usb/core/usb.c: registered new driver mtouchusb
  -and-
  input: MicroTouch Systems, Inc. MicroTouch USB Touchscreen on usb-0000:00:01.3-2.1


  1. To see which /dev/input/event to reference, type
       'cat /proc/bus/input/devices'
  and you should see something similar to the following in the output:
       I: Bus=0003 Vendor=0596 Product=0001 Version=0200
       N: Name="MicroTouch Systems, Inc. MicroTouch USB Touchscreen"
       P: Phys=usb-0000:00:01.3-2.1/input0
       H: Handlers=mouse1 event2
       B: EV=b
       B: KEY=400 0 0 0 0 0 0 0 0 0 0
       B: ABS=3
  [The handler ts1 may appear if you added the Touchscreen interface]
  1. Assuming the results are the same, the event handler would be:
       /dev/input/event2

8. For X, you will need a driver that is capable of reading the Event

  Interface's absolute data. The generic "mouse" driver will not work
  since it expects to se relative data. For the X11 driver you can download
  an excellent precompiled binary (or the source) from:
       http://www.conan.de/lifebook/lifebook-2.6.html
  (There are similar install instructions on the link above for the
   Lifebook B series, but seem to adapt to any touchscreen there is
   a Linux Input driver for)

9. Install the X11 driver in:

       /usr/X11R6/lib/modules/input

10. The following is what I use for my XF86Config: (For X 4.3.0)

       Section "InputDevice"
              Identifier "touchscreen0"
              Driver "evtouch"
              Option "Device" "/dev/input/event3"
              Option "DeviceName" "touchscreen"
              Option "MinX" "2300"
              Option "MinY" "2300"
              Option "MaxX" "14000"
              Option "MaxY" "14000"
              Option "DragTimer" "200"
              Option "MoveLimit" "600"
              Option "ReportingMode" "Raw"
       EndSection
       Section "ServerLayout"
              ...
              InputDevice "touchscreen0"
              ...
       EndSection
       [For additional configuration details, please review the web site
        referenced above.]

11. Fire up X, and you should be up and running!