Panasonic CF-18 / touchscreen / evdev / calibration issue

John R. johnr at wowway.com
Sun Mar 21 18:01:05 PDT 2010


On 03/18/10 09:18, Tias wrote:

> Not sure, perhaps your starting calibration gives you a false start,
> leading to a wrong calibration ?

OK...I gout rid of that from xorg,conf:

Section "InputDevice"
        Identifier "Touchscreen"
        Driver "evdev"
        Option "Device" "/dev/input/event6"
        Option "DeviceName" "Touchscreen"
EndSection

Before running xinput_calibrator:

 xinput list-props Touchscreen
Device 'Touchscreen':
        Device Enabled (136):   1
        Device Accel Profile (244):     0
        Device Accel Constant Deceleration (245):       1.000000
        Device Accel Adaptive Deceleration (247):       1.000000
        Device Accel Velocity Scaling (248):    10.000000
        Evdev Reopen Attempts (253):    10
        Evdev Axis Inversion (254):     0, 0
        Evdev Axis Calibration (255):   <no items>
        Evdev Axes Swap (256):  0
        Axis Labels (257):      "Abs X" (251), "Abs Y" (252)
        Button Labels (258):    "Button Unknown" (250), "Button Unknown"
(250), "Button Unknown" (250), "Button Wheel Up" (140), "Button Wheel
Down" (141)
        Evdev Middle Button Emulation (259):    2
        Evdev Middle Button Timeout (260):      50
        Evdev Wheel Emulation (261):    0
        Evdev Wheel Emulation Axes (262):       0, 0, 4, 5
        Evdev Wheel Emulation Inertia (263):    10
        Evdev Wheel Emulation Timeout (264):    200
        Evdev Wheel Emulation Button (265):     4
        Evdev Drag Lock Buttons (266):  0


After running version 6.1:

xinput list-props Touchscreen
Device 'Touchscreen':
        Device Enabled (136):   1
        Device Accel Profile (244):     0
        Device Accel Constant Deceleration (245):       1.000000
        Device Accel Adaptive Deceleration (247):       1.000000
        Device Accel Velocity Scaling (248):    10.000000
        Evdev Reopen Attempts (253):    10
        Evdev Axis Inversion (254):     0, 0
        Evdev Axis Calibration (255):   -107, 761, -106, 761
        Evdev Axes Swap (256):  0
        Axis Labels (257):      "Abs X" (251), "Abs Y" (252)
        Button Labels (258):    "Button Unknown" (250), "Button Unknown"
(250), "Button Unknown" (250), "Button Wheel Up" (140), "Button Wheel
Down" (141)
        Evdev Middle Button Emulation (259):    2
        Evdev Middle Button Timeout (260):      50
        Evdev Wheel Emulation (261):    0
        Evdev Wheel Emulation Axes (262):       0, 0, 4, 5
        Evdev Wheel Emulation Inertia (263):    10
        Evdev Wheel Emulation Timeout (264):    200
        Evdev Wheel Emulation Button (265):     4
        Evdev Drag Lock Buttons (266):  0

After this, still issue with cursor not tracking where clicks occur on
touch screen.


> Try starting without any calibration set, or set it to smth safe like
> xinput set-int-prop "Touchscreen" "Evdev Axis Calibration" 32 0 1000 0 1000

With values above, then calibration:

xinput list-props Touchscreen                                    Device
'Touchscreen':
        Device Enabled (136):   1
        Device Accel Profile (244):     0
        Device Accel Constant Deceleration (245):       1.000000
        Device Accel Adaptive Deceleration (247):       1.000000
        Device Accel Velocity Scaling (248):    10.000000
        Evdev Reopen Attempts (253):    10
        Evdev Axis Inversion (254):     0, 0
        Evdev Axis Calibration (255):   -48, 800, 323, 1094
        Evdev Axes Swap (256):  0
        Axis Labels (257):      "Abs X" (251), "Abs Y" (252)
        Button Labels (258):    "Button Unknown" (250), "Button Unknown"
(250), "Button Unknown" (250), "Button Wheel Up" (140), "Button Wheel
Down" (141)
        Evdev Middle Button Emulation (259):    2
        Evdev Middle Button Timeout (260):      50
        Evdev Wheel Emulation (261):    0
        Evdev Wheel Emulation Axes (262):       0, 0, 4, 5
        Evdev Wheel Emulation Inertia (263):    10
        Evdev Wheel Emulation Timeout (264):    200
        Evdev Wheel Emulation Button (265):     4
        Evdev Drag Lock Buttons (266):  0

If I run calibration again (output of calibration is different):

xinput list-props Touchscreen
Device 'Touchscreen':
        Device Enabled (136):   1
        Device Accel Profile (244):     0
        Device Accel Constant Deceleration (245):       1.000000
        Device Accel Adaptive Deceleration (247):       1.000000
        Device Accel Velocity Scaling (248):    10.000000
        Evdev Reopen Attempts (253):    10
        Evdev Axis Inversion (254):     0, 0
        Evdev Axis Calibration (255):   -131, 601, 423, 1076
        Evdev Axes Swap (256):  0
        Axis Labels (257):      "Abs X" (251), "Abs Y" (252)
        Button Labels (258):    "Button Unknown" (250), "Button Unknown"
(250), "Button Unknown" (250), "Button Wheel Up" (140), "Button Wheel
Down" (141)
        Evdev Middle Button Emulation (259):    2
        Evdev Middle Button Timeout (260):      50
        Evdev Wheel Emulation (261):    0
        Evdev Wheel Emulation Axes (262):       0, 0, 4, 5
        Evdev Wheel Emulation Inertia (263):    10
        Evdev Wheel Emulation Timeout (264):    200
        Evdev Wheel Emulation Button (265):     4
        Evdev Drag Lock Buttons (266):  0


> 
> 
> If that does not help, then we should figure out why you get different
> calibration results with different runs.
> Try running running the calibrator a few times starting with the same
> base calibration values (eg 0 1000 0 1000) and check by adding the -v
> flag what clicks are registered and what calibraton is calculated.

Running calibration again starting with same base valies with -v:

./xinput_calibrator_x11 -v
DEBUG: XInputExtension version is 2.0
DEBUG: Skipping virtual master devices and devices without axis valuators.
DEBUG: Skipping device 'Virtual core XTEST pointer' id=4, does not
report Absolute events.
DEBUG: Skipping device 'Mouse0' id=6, does not report Absolute events.
DEBUG: Selected device: Touchscreen
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
DEBUG: Read axes swap value of 0.
Calibrating EVDEV driver for "Touchscreen" id=8
        current calibration values (from XInput): min_x=0, max_x=1000
and min_y=0, max_y=1000
DEBUG: Adding click 0 (X=15, Y=0)
DEBUG: Adding click 1 (X=670, Y=0)
DEBUG: Adding click 2 (X=18, Y=489)
DEBUG: Adding click 3 (X=672, Y=492)

Doing dynamic recalibration:
        Setting new calibration data: -90, 761, -106, 744
DEBUG: Succesfully applied axis calibration.


== Making the calibration permanent ==
If you have the 'xinput' tool installed, a simple way is to create a
script that starts with your X session, containing the following command(s):
    xinput set-int-prop "Touchscreen" "Evdev Axis Calibration" 32 -90
761 -106 744

If you have evdev version 2.3.0 or higher, there are 2 more ways: the
tranditional way (xorg.conf) and the new way (udev rule):
xorg.conf: edit /etc/X11/xorg.conf and add in the 'Section
"InputDevice"' of your device:
    Option      "Calibration"           "-90 761 -106 744"
udev rule: create the file '/etc/udev/rules.d/99_touchscreen.rules' with:
    ACTION!="add|change", GOTO="xorg_touchscreen_end"
    KERNEL!="event*", GOTO="xorg_touchscreen_end"
    ATTRS{product}!="Touchscreen", GOTO="xorg_touchscreen_end"
    ENV{x11_options.calibration}="-90 761 -106 744"
    LABEL="xorg_touchscreen_end"

Again:

./xinput_calibrator_x11 -v
DEBUG: XInputExtension version is 2.0
DEBUG: Skipping virtual master devices and devices without axis valuators.
DEBUG: Skipping device 'Virtual core XTEST pointer' id=4, does not
report Absolute events.
DEBUG: Skipping device 'Mouse0' id=6, does not report Absolute events.
DEBUG: Selected device: Touchscreen
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
DEBUG: Read axes swap value of 0.
Calibrating EVDEV driver for "Touchscreen" id=8
        current calibration values (from XInput): min_x=-90, max_x=761
and min_y=-106, max_y=744
DEBUG: Adding click 0 (X=0, Y=0)
DEBUG: Adding click 1 (X=658, Y=1)
DEBUG: Adding click 2 (X=6, Y=492)
DEBUG: Adding click 3 (X=655, Y=495)

Doing dynamic recalibration:
        Setting new calibration data: -177, 545, -195, 530
DEBUG: Succesfully applied axis calibration.

Again:

./xinput_calibrator_x11 -v
DEBUG: XInputExtension version is 2.0
DEBUG: Skipping virtual master devices and devices without axis valuators.
DEBUG: Skipping device 'Virtual core XTEST pointer' id=4, does not
report Absolute events.
DEBUG: Skipping device 'Mouse0' id=6, does not report Absolute events.
DEBUG: Selected device: Touchscreen
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
DEBUG: Read axes swap value of 0.
Calibrating EVDEV driver for "Touchscreen" id=8
        current calibration values (from XInput): min_x=-177, max_x=545
and min_y=-195, max_y=530
DEBUG: Adding click 0 (X=1, Y=0)
DEBUG: Adding click 1 (X=658, Y=0)
DEBUG: Adding click 2 (X=4, Y=490)
DEBUG: Adding click 3 (X=655, Y=490)

Doing dynamic recalibration:
        Setting new calibration data: -251, 361, -272, 344
DEBUG: Succesfully applied axis calibration.

Again:

./xinput_calibrator_x11 -v
DEBUG: XInputExtension version is 2.0
DEBUG: Skipping virtual master devices and devices without axis valuators.
DEBUG: Skipping device 'Virtual core XTEST pointer' id=4, does not
report Absolute events.
DEBUG: Skipping device 'Mouse0' id=6, does not report Absolute events.
DEBUG: Selected device: Touchscreen
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
DEBUG: Read axes swap value of 0.
Calibrating EVDEV driver for "Touchscreen" id=8
        current calibration values (from XInput): min_x=-251, max_x=361
and min_y=-272, max_y=344
DEBUG: Adding click 0 (X=0, Y=0)
DEBUG: Adding click 1 (X=653, Y=1)
DEBUG: Adding click 2 (X=4, Y=490)
DEBUG: Adding click 3 (X=656, Y=492)

Doing dynamic recalibration:
        Setting new calibration data: -313, 204, -336, 186
DEBUG: Succesfully applied axis calibration.

Again:

./xinput_calibrator_x11 -v
DEBUG: XInputExtension version is 2.0
DEBUG: Skipping virtual master devices and devices without axis valuators.
DEBUG: Skipping device 'Virtual core XTEST pointer' id=4, does not
report Absolute events.
DEBUG: Skipping device 'Mouse0' id=6, does not report Absolute events.
DEBUG: Selected device: Touchscreen
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
DEBUG: Read axes swap value of 0.
Calibrating EVDEV driver for "Touchscreen" id=8
        current calibration values (from XInput): min_x=-313, max_x=204
and min_y=-336, max_y=186
DEBUG: Adding click 0 (X=0, Y=0)
DEBUG: Adding click 1 (X=658, Y=5)
DEBUG: Adding click 2 (X=2, Y=499)
DEBUG: Adding click 3 (X=652, Y=502)

Doing dynamic recalibration:
        Setting new calibration data: -366, 71, -390, 60
DEBUG: Succesfully applied axis calibration.


> 
> This will at least show if the problem is on the calibration part or
> somewhere below : )

Let me know if you need more info

Thanks,

John



More information about the xorg mailing list