This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x touchscreen issues with Linux SDK v2.00.00.00

Other Parts Discussed in Thread: AM3358

Thank you very much for your help. The Matrix issue has been solved, but there are new problems.

I am able to successfully calibrate my touchscreen using ts_calibrate and then I test it with ts_test and everything is fine: the crosshair pointer on the screen exactly follows my finger.

But when I run the matrix,touch points and crosshair pointer always not coincide.

we try to set environment variables QT_QPA_GENERIC_PLUGINS to tslib:/dev/input/event0 then run Matrix still does not work

the error message is as follows:

No such plugin for spec  "tslib:/dev/input/event0"

And we have not  found libqtslibplugin.so in v2.00.00.00 filesystem.

so, here are one problem need TI help:

   On RSB4221(AM3358), how to successfully calibrate touchscreen when runing the matrix and Qt demo


Looking forward TI reply, thanks advance.

  • I've split this thread since you are now discussing a different issue altogether. Which touch screen controller are you using? Is this the integrated resistive touch controller (TSC_ADC) that is part of the AM335x, or are you using an external controller (e.g. cap touch, etc.)?

    I did some debugging of a captouch controller that wasn't working properly here:

    e2e.ti.com/.../1828953

    I recommend that you try to utilize some of the same techniques as I was using (debug variables, evtest, etc).
  • Thanks for your response. we used external controller which is a resistive touch controller but not TSC_ADC. We add a touch screen driver according to the document (EETI eGTouch Linux Programming Guide v2.5h). We found the touch screen driver is normal. Use tslib calibrate the touch screen is normal. However, when we run the matrix,feeling tslib calibration is not used. So how should we use tslib in the matrix?
  • Qt as delivered in the more recent Proc SDK releases is *not* using tslib.  It uses evdevtouch which provides multi-touch support.

    From Qt documentation: "tslib support can be enabled by setting the environment variable QT_QPA_EGLFS_TSLIB or QT_QPA_FB_TSLIB to 1":

    http://doc.qt.io/qt-5/embedded-linux.html#touch

  • I have the following questions:
    1、Our touch screens are supported multi-touch, but we use evdevtouch not had any effect.
    The following debug info:
    root@am335x-evm:/etc# /etc/init.d/matrix-gui-2.0 stop
    Stopping Matrix GUI applicationqt.qpa.input: evdevkeyboard: Using device discovery
    qt.qpa.input: udev device discovery for type QFlags(0x8)
    qt.qpa.input: Found matching devices ()
    qt.qpa.input: evdevmouse: Using device discovery
    qt.qpa.input: udev device discovery for type QFlags(0x1|0x2)
    qt.qpa.input: Found matching devices ("/dev/input/event1")
    qt.qpa.input: Adding mouse at "/dev/input/event1"
    qt.qpa.input: create mouse handler for "/dev/input/event1" ""
    qt.qpa.input: evdevtouch: Using device discovery
    qt.qpa.input: udev device discovery for type QFlags(0x2|0x4)
    qt.qpa.input: Found matching devices ("/dev/input/event0")
    qt.qpa.input: Adding device at "/dev/input/event0"
    qt.qpa.input: evdevtouch: Using device /dev/input/event0
    qt.qpa.input: evdevtouch: /dev/input/event0: Protocol type B (multi)
    qt.qpa.input: evdevtouch: /dev/input/event0: min X: 0 max X: 2047
    qt.qpa.input: evdevtouch: /dev/input/event0: min Y: 0 max Y: 2047
    qt.qpa.input: evdevtouch: /dev/input/event0: min pressure: 0 max pressure: 1
    qt.qpa.input: evdevtouch: /dev/input/event0: device name: eGalaxTouch Virtual Device for Multi
    No such plugin for spec "Auto"

    It seems that he has loaded properly but has no effect.

    2、As you said : "qt as delivered in the more recent Proc SDK releases is *not* using tslib". I set QT_QPA_EGLFS_TSLIB and TSLIB_DEVICE in environment but tslib still can't use. However, I rebuild qt with tslib support and set QT_QPA_EGLFS_TSLIB and TSLIB_DEVICE in environment, I found touch screen can be normal use! (Our touch screens is set to multi-touch. if our touch screens is set to single-touch, it will appears two cursor, one has been calibrated, one has not been calibrated ).So I don't know whether it is reasonable .And whether we can use your SDK with tslib calibration
  • xiao dai said:
    qt.qpa.input: evdevtouch: /dev/input/event0: min X: 0 max X: 2047
    qt.qpa.input: evdevtouch: /dev/input/event0: min Y: 0 max Y: 2047

    Can you also run this command:

    evtest /dev/input/touchscreen0

    The touchscreen should report coordinate data through the console any time you touch the screen.  Please touch each corner of your screen and report back the approximate coordinates reported for each.  I know you won't be able to precisely hit the corner pixel.  That's fine.  Just get close.  I'm looking for an answer along the lines of:

    1. Upper left: X=__, Y=___
    2. Upper right: X=__, Y=___
    3. Lower left: X=__, Y=___
    4. Lower right: X=__, Y=___

  • Do you means ABS_X and ABS_Y ? The results are as follows:
    Upper left: X=11, Y=0
    Upper right: X=24, Y=2047
    Lower left: X=2047, Y=7
    Lower right: X=2046, Y=2017
  • Looks like you are 90 degrees off. Have you set

    QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=rotate=90

    I'm not sure if it should be 90 or 270. Perhaps try both.

  • Originally I set is 180. Just I try to modify for 90 or 270 or 0, but still without any change.
    The mouse is shown at the top left corner of the screen, but it will not move when I click on the touch screen. When I click, it occasionally produces the click event in an uncertain position, but the mouse didn't move
  • Relating to the mouse:

    1. On my board, I only see the mouse cursor if I have a USB mouse plugged into the board.  Is that true for you as well, or have you configured Qt to show the mouse all the time?
    2. My mouse cursor only moves in response to movement of the USB mouse.  Touches do not move the mouse cursor.

    I think you need a different way of gauging where your touch is being received.  Please start the following demo from the command line:

    /usr/share/qt5/examples/quick/touchinteraction/touchinteraction

    Then use your mouse to select "Multipoint Flames".  Slowly, and I mean VERY slowly, move your finger across the screen.  Where are the corresponding flames registering?  If you have a rotation issue, it should be very apparent from this demo. 

    Also, please share your device tree setup for your touchscreen controller.

  • Thank you very much for your help. According to your prompt, found that is truly touch screen configuration problem. I tried to invert both X and Y, then the problem solved. Thank you again!
  • Dear Brad,

    Our touch screen can be normal use, but the cursor question still need to confirm with you. When you don't insert the USB mouse whether can you see the mouse cursor.
    we can see the mouse cursor even if there is no insert the mouse.The mouse cursor also only moves in response to movement of the USB mouse. Touches do not move the mouse cursor. Although he doesn't affect the use of the touch screen, but the feeling is very strange

    Thanks ,
    Xiao dai
  • Dear Brad,

    Our touch screen can be normal use, but the cursor question still need to confirm with you. When you don't insert the USB mouse whether can you see the mouse cursor.
    we can see the mouse cursor even if there is no insert the mouse.The mouse cursor also only moves in response to movement of the USB mouse. Touches do not move the mouse cursor. Although he doesn't affect the use of the touch screen, but the feeling is very strange

    Thanks ,
    Xiao dai
  • xiao dai said:
    When you don't insert the USB mouse whether can you see the mouse cursor.

    There is no cursor without a USB mouse plugged in.

    xiao dai said:
    we can see the mouse cursor even if there is no insert the mouse.

    That's odd.  Can you post the output of the "env" command?  Did you rebuild Qt or are you using it as packaged in the SDK?  What precise version of the SDK are you using?  (I think you are possibly on a different version than the person who posted this thread.)