Touchscreen issue on Apalis TK1

I have questioned previously this issue on Apalis TK1 touchscreen calibration issue - Toradex Community, but can’t find answer yet.

To sum up, my touchscreen has a problem on Apalis TK1, but I have confirmed that this is not hardware problem via using Imx6q apalis board.

To describe the problem and more update, with TK1 board, my touchscreen device get wrong cursor location and drag points even after xinput_calibrator.

With a command

xinput set-prop "Silicon Works Multi-touch Device" --type=float "Coordinate Transformation Matrix" 0.5 0 0 0 0.2 0 0 0 1 

I confirmed that the drag point and speed seems corrected, I found that 0.5 and 0.2 is need for width and height. However, when I try to click some space, it doesn’t show the correct location.

  1. With evtest, I found the different log.

TK1

Input driver version is 1.0.1                                                   
Input device ID: bus 0x3 vendor 0x2b7f product 0x2403 version 0x100             
Input device name: "Silicon Works Multi-touch Device"                           
Supported events: 
  Event type 0 (EV_SYN)                                                         
  Event type 1 (EV_KEY)                                                         
    Event code 272 (BTN_LEFT)                                                   
    Event code 273 (BTN_RIGHT)                                                  
    Event code 330 (BTN_TOUCH)                                                  
  Event type 3 (EV_ABS)                                                         
    Event code 0 (ABS_X)                                                        
      Value      0                                                              
      Min        0                                                              
      Max    32767                                                              
    Event code 1 (ABS_Y)                                                        
      Value      0                                                              
      Min        0                                                              
      Max    32767                                                              
    Event code 40 (ABS_MISC)                                                    
      Value      0                                                              
      Min        0                                                              
      Max        1                                                              
    Event code 41 (?)                                                           
      Value      0                                                              
      Min        0                                                              
      Max        1                                                              
    Event code 42 (?)                                                           
      Value      0                                                              
      Min        0                                                              
      Max        1                                                              
    Event code 43 (?)                                                           
      Value      0                                                              
      Min        0                                                              
      Max        1                                                              
    Event code 44 (?)                                                           
      Value      0                                                              
      Min        0                                                              
      Max        1                                                              
    Event code 45 (?)                                                           
      Value      0                                                              
      Min        0                                                              
      Max        1                                                              
    Event code 46 (?)                                                           
      Value      0                                                              
      Min        0                                                              
      Max        1                                                              
    Event code 47 (ABS_MT_SLOT)                                                 
      Value      0                                                              
      Min        0                                                              
      Max        1                                                              
    Event code 48 (ABS_MT_TOUCH_MAJOR)                                          
      Value      0                                                              
      Min        0                                                              
      Max        1                                                              
    Event code 49 (ABS_MT_TOUCH_MINOR)                                          
      Value      0                                                              
      Min        0                                                              
      Max        1                                                              
    Event code 50 (ABS_MT_WIDTH_MAJOR)                                          
      Value      0                                                              
      Min        0                                                              
      Max       10                                                              
    Event code 51 (ABS_MT_WIDTH_MINOR)                                          
      Value      0                                                              
      Min        0                                                              
      Max    65535                                                              
  Event type 4 (EV_MSC)                                                         
    Event code 4 (MSC_SCAN)

Imx6q

    Input driver version is 1.0.1                                                   
    Input device ID: bus 0x3 vendor 0x2b7f product 0x2403 version 0x100             
    Input device name: "Silicon Works Multi-touch Device"  
Supported events:                                                               
  Event type 0 (EV_SYN)                                                         
  Event type 1 (EV_KEY)                                                         
    Event code 330 (BTN_TOUCH)                                                  
  Event type 3 (EV_ABS)                                                         
    Event code 0 (ABS_X)                                                        
      Value      0                                                              
      Min        0                                                              
      Max    32767                                                              
      Resolution     118                                                        
    Event code 1 (ABS_Y)                                                        
      Value      0                                                              
      Min        0                                                              
      Max    32767                                                              
      Resolution     210                                                        
    Event code 47 (ABS_MT_SLOT)                                                 
      Value      0                                                              
      Min        0                                                              
      Max        9                                                              
    Event code 53 (ABS_MT_POSITION_X)                                           
      Value      0                                                              
      Min        0                                                              
      Max    32767                                                              
      Resolution     118                                                        
    Event code 54 (ABS_MT_POSITION_Y)                                           
      Value      0                                                              
      Min        0                                                              
      Max    32767                                                              
      Resolution     210                                                        
    Event code 57 (ABS_MT_TRACKING_ID)                                          
      Value      0                                                              
      Min        0                                                              
      Max    65535

I have no idea what do I have to do… Is it a problem of device driver?

I have no idea what do I have to do… Is it a problem of device driver?

I don’t think so.

To get some things straight. What you are talking about is not a resistive touch screen but rather a USB connected potentially multi-touch capable screen, right?

What exact display interfaces are you using?

By default the downstream Apalis TK1 uses a configuration where the desktop spawns across multiple screens. As there is no way knowing whether or not LVDS is connected it defaults to always connected with a VESA VGA resolution. HDMI as soon as it gets connected will negotiate the resolution using DDC/EDID plus become the primary visible screen. Most possibly what you are seeing is that the touch screen is relative to the combined resolution of both HDMI and LVDS. Depending on your screen configuration you probably would want to adjust that. What does e.g. xrandr output?

BTW: Just asking new questions won’t usually resolve anything…

  1. As you guess, I am using USB connected multi-touch capable screen with HDMI display connection.

  2. With xrandr in TK1

    Screen 0: minimum 320 x 200, current 1920 x 720, maximum 4096 x 4096
    HDMI-1 connected 1920x720+0+0 (normal left inverted right x axis y axis) 16mm x 9mm
    1920x720 60.00*+
    1920x1080 60.00
    640x480 59.94

And with Imx6q (It also uses the same display(HDMI) and touchscreen device)

Screen 0: minimum 240 x 240, current 1920 x 720, maximum 8192 x 8192
DISP3 BG connected primary 1920x720+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   D:1920x720p-59  60.00*+
   D:1920x1080p-60  60.00  
   V:640x480p-60  60.00  

I can’t find LVDS setup here though…

And with xinput list

��⎡ Virtual core pointer                        id=2    [master pointer  (3)]
��⎜   ��↳ Virtual core XTEST pointer                    id=4    [slave  pointer  (2)]
��⎜   ��↳ apalis-tk1-k20-ts                             id=6    [slave  pointer  (2)]
��⎜   ��↳ Silicon Works Multi-touch Device              id=7    [slave  pointer  (2)]
��⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
    ��↳ Virtual core XTEST keyboard                     id=5    [slave  keyboard (3)]
    ��↳ gpio-keys                                       id=8    [slave  keyboard (3)]

Ah, you’re on mainline, sorry. Then I would expect it to just work. Let me see…

Anyway, for a capacitive multi-touch panels such calibration does not make any much sense.

You probably just need to instruct xinput to use absolute vs. relative coordinates or vice vera. What does xinput query-state "Silicon Works Multi-touch Device" report? You may try either xinput set-mode "Silicon Works Multi-touch Device" ABSOLUTE or xinput set-mode "Silicon Works Multi-touch Device" RELATIVE.