make evtouch devices work with hal-input in intrepid

Bug #261873 reported by Oliver Grawert
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
xf86-input-evtouch (Ubuntu)
Fix Released
High
Unassigned

Bug Description

the currently used hal-input in intrepid doesnt recognize evtouch devices at all, this is a regression over hardy where at least teh xorg.conf device entries used to work, scope of this bug is to properly integrate evtouch support wit hal-input to
a) make xorg/hal detect the device as needing evtouch through an .fdi file
b) apply calibration data similar to what hal does for xkb devices at the moment

Revision history for this message
Oliver Grawert (ogra) wrote :

a script to apply calibration data based on teh xkb one we use:
cat ../hal-setup-touchscreen
#!/bin/sh
#
# borrowed from Fedora and modified to apply touchscreen calibration data
#

[ -x /usr/bin/hal-set-property ] || exit 0

. /etc/default/evtouch > /dev/null 2>&1 || exit 0

hal_set () {
    if [ -n "$2" ]; then
 /usr/bin/hal-set-property --direct --udi "$UDI" --key input.x11_options.$1 --string "$2"
    else
 /usr/bin/hal-set-property --direct --udi "$UDI" --key input.x11_options.$1 --remove
    fi
}

hal_set minx $MINX
hal_set miny $MINY
hal_set maxx $MAXX
hal_set maxy $MAXY
hal_set movelimit $MOVELIMIT

Revision history for this message
Oliver Grawert (ogra) wrote :

an .fdi file for an IDEACO touchscreen used in a CLEVO (nexoc osiris 621) notebook:
ogra@osiris:~$ cat /etc/hal/fdi/policy/10-ideaco.fdi
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">
  <device>
    <match key="info.product" contains="IDEACO">
      <match key="info.product" contains="IDC 6680">
        <match key="info.capabilities" contains="input.touchpad">
       <merge key="input.x11_driver" type="string">evtouch</merge>
       <merge key="input.x11_options.minx" type="string">116</merge>
       <merge key="input.x11_options.miny" type="string">268</merge>
       <merge key="input.x11_options.maxx" type="string">7940</merge>
       <merge key="input.x11_options.maxy" type="string">7828</merge>
       <merge key="input.x11_options.reportingmode" type="string">raw</merge>
       <merge key="input.x11_options.taptimer" type="string">50</merge>
       <merge key="input.x11_options.longtouchtimer" type="string">30</merge>
       <merge key="input.x11_options.movelimit" type="string">15</merge>
       <merge key="input.x11_options.emulate3buttons" type="string">true</merge>
       <merge key="input.x11_options.emulate3timeout" type="string">50</merge>
        </match>
      </match>
    </match>
  </device>
</deviceinfo>

Revision history for this message
Oliver Grawert (ogra) wrote :

a .fdi file for an eGalax touchscreen from a Samsung Q1 Ultra MID:
ogra@osiris:~$ cat /etc/hal/fdi/policy/10-eGalax.fdi
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">

  <device>
    <match key="info.product" contains="Touchkit Touch">
      <match key="info.capabilities" contains="input">
 <merge key="input.x11_driver" type="string">evtouch</merge>
 <merge key="input.x11_options.minx" type="string">130</merge>
 <merge key="input.x11_options.miny" type="string">197</merge>
 <merge key="input.x11_options.maxx" type="string">3945</merge>
 <merge key="input.x11_options.maxy" type="string">3894</merge>
 <merge key="input.x11_options.taptimer" type="string">30</merge>
 <merge key="input.x11_options.longtouchtimer" type="string">750</merge>
 <merge key="input.x11_options.longtouched_action" type="string">click</merge>
 <merge key="input.x11_options.longtouched_button" type="string">3</merge>
 <merge key="input.x11_options.oneandhalftap_button" type="string">2</merge>
 <merge key="input.x11_options.movelimit" type="string">40</merge>
 <merge key="input.x11_options.touched_drag" type="string">1</merge>
 <merge key="input.x11_options.maybetapped_action" type="string">click</merge>
 <merge key="input.x11_options.maybetapped_button" type="string">1</merge>
      </match>
    </match>
  </device>

</deviceinfo>

Bryce Harrington (bryce)
Changed in xf86-input-evtouch:
importance: Undecided → High
milestone: none → intrepid-alpha-6
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xf86-input-evtouch - 0.8.7-3ubuntu8

---------------
xf86-input-evtouch (0.8.7-3ubuntu8) intrepid; urgency=low

  * add 09_calibrate-script-halification.patch, adds hal functionallity to
    calibration tool, makes the script work under X and gives useful output
    through zenity dialogs
  * add 10_ev_calibrate_fixups.patch, fix ev_calibrate.c to use a useful font
    in calibration, make it write to /etc/evtouch/config in a format that can
    be parsed by the evtouch hal-set-property initscript
  * add calibrate.desktop and calibrate icon file (uuencoded), add sharutils
    to build-deps
  * make sure /etc/evtouch dir is created by the package so ev_calibrate can
    write its config there.
  * add hal to dependencies, zenity to suggests
  * add xserver-xorg-input-evtouch initscript to apply calibration data on
    system boot via hal-set-property
  * include .fdi files for ideaco and eGalax touchscreens (hopefully there
    will be more soon)
  * closes (LP: #261873)

 -- Oliver Grawert <email address hidden> Thu, 25 Sep 2008 00:54:44 +0200

Changed in xf86-input-evtouch:
status: Triaged → Fix Released
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

The bug is not fixed for me as hal gives the error "Wrong UDI" :

libhal.c 2016 : invalid udi: --key doesn't startwith '/org/freedesktop/Hal/devices/'.
error: libhal_device_remove_property: (null): (null)

And it doesn't work (or, at least, I still don't understand how to make it works)

Revision history for this message
Oliver Grawert (ogra) wrote :

what kind of touchscreen is that ? it will only work with devices that have a valid .fdi file, i made several calls on mailing lists and via planet.ubuntu.com to send me lshal output for devices known to have worked before with evtouch. if you own such a touchscreen, please attach your lshal output to the bug ...

i will also add better error checking to teh UDI retrieving code, in case your device isnt known by hal it shouldnt attempt to calibrate it...

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Sorry for being late but I have only access to this touchscreen since this week.

The touchscreen is a "Xernarc 7" 706 series."

In Hardy and in Intrepid, it's basically working well with evtouch except that it's very painful to calibrate and we still didn't succeed to have a good calibration. (The current one was done manually by trying/restarting X/modifying x.org)

I attach the lshal output. The touchscreen is on /dev/input/event2.

Also, as a side note : it seems from the documentation that we need to put the option Calibrate 1 in xorg.conf in order to make the calibration. Is it possible to add to the documentation an sample of a xorg.conf that is working with HAL,with the calibration line commented. It's indeed not really clear what should be in the xorg.conf and what will come from HAL. Do you want that I open a new bug for that ?

Thanks a lot for your work :-)

Revision history for this message
Oliver Grawert (ogra) wrote :

The Calibrate option is handled by hal on the fly now, with the last upload the evtouch calibration tool (which now has a menu entry in "System->Administration->Calibrate Touchscreen") will also notify users if their device isnt known by hal and instruct them how to generate useful lshal output and to send it to the ubuntu-mobile ML ... i will try to generate a .fdi file for your device during the day ... if it then works after calibration, can you please attach the /etc/evtouch/config file ? that way i can add a set of default values for it to the fdi as well so that it comes roughly preconfigured out of the box.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Just post a comment here once you uploaded the FDI. I will upgrade, calibrate and send you the config file. Thanks a lot :-)

Revision history for this message
Eric Drechsel (ericdrex) wrote :

I have a Panasonic "Let's Note" (Toughbook) T2. This FDI works for me. Great work with the new xinput integration guys, much better than the old "calibration by algebra" method I'd been using. I'm so excited I want to swear in text. No swearing on Launchpad right?

PS for those following along at home: I had to
  sudo /etc/init.d/hal restart
and restart X adding it to allow calibration.

Revision history for this message
Eric Drechsel (ericdrex) wrote :

I may have a better calibration after testing, but here's a first draft in case I drop the ball.

Revision history for this message
Eric Drechsel (ericdrex) wrote :

here is an excellent calibration for my Panasonic CF-T2.

Revision history for this message
Eric Drechsel (ericdrex) wrote :

lshal output in case the .fdi above needs to be made more selective. can this make it into intrepid?

udi = '/org/freedesktop/Hal/devices/usb_device_430_501_noserial_if0_logicaldev_input'
  info.capabilities = {'input', 'input.mouse'} (string list)
  info.category = 'input' (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_430_501_noserial_if0' (string)
  info.product = 'Fujitsu Takamisawa USB Touch Panel' (string)
  info.subsystem = 'input' (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_430_501_noserial_if0_logicaldev_input' (string)
  input.device = '/dev/input/event2' (string)
  input.originating_device = '/org/freedesktop/Hal/devices/usb_device_430_501_noserial_if0' (string)
  input.product = 'Fujitsu Takamisawa USB Touch Panel' (string)
  input.x11_driver = 'evtouch' (string)
  ....
  linux.device_file = '/dev/input/event2' (string)
  linux.hotplug_type = 2 (0x2) (int)
  linux.subsystem = 'input' (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.2/usb3/3-1/3-1:1.0/input/input2/event2' (string)

Revision history for this message
Eric Drechsel (ericdrex) wrote :

most (all?) evtouch devices require a lower value for Option MoveLimit as in https://bugs.launchpad.net/ubuntu/+source/xf86-input-evtouch/+bug/204633

Can a value for this option be included in .FDI files? Not clear from linked issue whether one generic value works for all devices.

Revision history for this message
Eric Drechsel (ericdrex) wrote :

Setting movelimit to 2 in 10-Panasonic.fdi above makes drawing smooth in karbon14 etc. Should be the same for Fujitsu since they are really the same device. Can match contain an OR or regex in .FDI files? If so these could be merged (they just have a slightly different manufacturer string)

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Here's a good .fdi file for my Lilliput 629GL. The CarPC people will be happy! This is an eGalax at heart, but actually has eGalax in the product, so the previous .fdi didn't work.

<?xml version="1.0" encoding="ISO-8859-1"?>

<deviceinfo version="0.2">

  <device>
    <match key="info.product" contains="eGalax Inc.">
      <match key="info.capabilities" contains="input">
        <merge key="input.x11_driver" type="string">evtouch</merge>
        <merge key="input.x11_options.SwapX" type="string">1</merge>
        <merge key="input.x11_options.SwapY" type="string">1</merge>
        <merge key="input.x11_options.minx" type="string">80</merge>
        <merge key="input.x11_options.miny" type="string">310</merge>
        <merge key="input.x11_options.maxx" type="string">1970</merge>
        <merge key="input.x11_options.maxy" type="string">1680</merge>
        <merge key="input.x11_options.ReportingMode" type="string">Raw</merge>
        <merge key="input.x11_options.Emulate3Buttons" type="bool">true</merge>
        <merge key="input.x11_options.Emulate3Timeout" type="string">50</merge>
        <merge key="input.x11_options.CorePointer" type="string">On</merge>
        <merge key="input.x11_options.Rotate" type="string">CCW</merge>
        <merge key="input.x11_options.movelimit" type="string">0</merge>
      </match>
    </match>
  </device>

</deviceinfo>

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Wow I'm sorry, ignore the last post and use this file (I was using a few double-negatives in that configuration, really stupid). Again, this is for lilliput 629GL 7-inch eGalax touchscreen.

<?xml version="1.0" encoding="ISO-8859-1"?>

<deviceinfo version="0.2">

  <device>
    <match key="info.product" contains="eGalax Inc.">
      <match key="info.capabilities" contains="input">
        <merge key="input.x11_driver" type="string">evtouch</merge>
        <merge key="input.x11_options.minx" type="string">80</merge>
        <merge key="input.x11_options.miny" type="string">310</merge>
        <merge key="input.x11_options.maxx" type="string">1970</merge>
        <merge key="input.x11_options.maxy" type="string">1680</merge>
        <merge key="input.x11_options.Rotate" type="string">CW</merge>
        <merge key="input.x11_options.ReportingMode" type="string">Raw</merge>
        <merge key="input.x11_options.Emulate3Buttons" type="bool">true</merge>
        <merge key="input.x11_options.Emulate3Timeout" type="string">50</merge>
        <merge key="input.x11_options.CorePointer" type="string">On</merge>
        <merge key="input.x11_options.movelimit" type="string">0</merge>
      </match>
    </match>
  </device>

</deviceinfo>

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Also. here's the lshal for that lilliput 629GL in case it helps.

Revision history for this message
Daniel Petty (mixmatch) wrote :

I have a Xenarc 700TSV. it responds to touch, however cannot be calibrated correctly.

Revision history for this message
Jaco Vosloo (jpvosloo) wrote :

This fdi file work ok for my LG L1730SF touch screen. I saved it as:
/etc/hal/fdi/policy/lgtouch.fdi

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
      <match key="info.product" contains="ITM Inc USB Touch Panel">
        <match key="info.capabilities" contains="input.touchpad">
          <merge key="input.x11_driver" type="string">evtouch</merge>
          <merge key="input.x11_options.reportingmode" type="string">raw</merge>
          <merge key="input.x11_options.emulate3buttons" type="string">true</merge>
          <merge key="input.x11_options.emulate3timeout" type="string">50</merge>
          <merge key="input.x11_options.sendcoreevents" type="string">on</merge>
   <merge key="input.x11_options.maxx" type="string">3815</merge>
   <merge key="input.x11_options.maxy" type="string">3948</merge>
   <merge key="input.x11_options.minx" type="string">295</merge>
   <merge key="input.x11_options.miny" type="string">200</merge>
   <merge key="input.x11_options.Rotate" type="string">CCW</merge>
   <merge key="input.x11_options.Swapx" type="string">true</merge>
   <merge key="input.x11_options.Swapy" type="string">false</merge>
        </match>
    </match>
  </device>
</deviceinfo>

Revision history for this message
Lance R. Vick (lrvick) wrote :

Evtouch on fully updated Karmic (or current lucid) does not see the NextWindow touchscreen on my HP TouchSmart 600-1050

See also: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/379313

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.