evdev, hal, and calibrating my touchscreen

Clarke Wixon cwixon at usa.net
Thu Nov 13 15:56:09 PST 2008


This has me stumped.

How can I set touchscreen calibration limits using evdev?  This is on x.org 7.4
with hal input device autoconfiguration (specifically, Ubuntu 8.10 with the
packages from the default repositories).

I can see evdev does know SOMETHING about calibration, because the command
"xinput list" gives this output:

. . .

"Touchkit HID-USB Touchscreen"    id=4    [XExtensionPointer]
    Num_buttons is 32
    Num_axes is 2
    Mode is Absolute
    Motion_buffer is 256
    Axis 0 :
        Min_value is 42
        Max_value is 4029
        Resolution is 10000
    Axis 1 :
        Min_value is 42
        Max_value is 4029
        Resolution is 10000

. . .

Ah, so close.  It knows it's a 12-bit device and has provided some cushion at
both edges.  So far so good.

But the default X-axis range is 42-4029, while the calibrated range is really
80-3975. The Y-axis range is also 42-4029 by default, and in reality 135-3935
are the values that work. The screen is mostly usable, but off a bit, maybe 5mm
in the corners.

Calibration does not seem to be an xinput settable property.  "xinput
list-props" for the device gives:

. . .

Device 'Touchkit HID-USB Touchscreen':
    Device Enabled:        1
    Middle Button Emulation:        2
    Middle Button Timeout:        50
    Wheel Emulation Inertia:        10
    Wheel Emulation:        0
    Wheel Emulation X Axis:        0, 0
    Wheel Emulation Y Axis:        4, 5
    Wheel Emulation Timeout:        200
    Wheel Emulation Button:        4
    Drag Lock Buttons:    0

. . .

Nothing there about calibration.

In the bad ol' days, I set up the evtouch driver in xorg.conf, and if I want to
recreate that exact same scenario, I can configure it in a hal fdi file.  This
works, but I don't really like evtouch -- it's not as responsive to tapping as
evdev, so it misses taps, particularly when using the onscreen keyboard.
Annoying. Evdev is much better at this, but the calibration is off.

I don't care about rotation or changing the settings at runtime, so I would be
happy to set these calibration values somewhere in a configuration file.  But
where?

Thanks!

-C




More information about the xorg mailing list