Touchsupport

  • and systemctl status service.touchscreen.service

    while evtest whith shutting down KODI will provide touchdata like this:

    Code
    Event: time 1521898950.552704, -------------- SYN_REPORT ------------
    Event: time 1521898950.562717, type 3 (EV_ABS), code 0 (ABS_X), value 987
    Event: time 1521898950.562717, type 3 (EV_ABS), code 1 (ABS_Y), value 2411
    Event: time 1521898950.562717, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 64902

    I now have some data of the touch:

    Code
    110, 3960 (x) 300, 3800 (y)

    and i've tried the advancedsettings.xml advancedsettings.xml - Official Kodi Wiki, but stretch_factor don't work. Even tested

    Code
    <window>
        <width>800</width>
        <height>460</height>
    </window>

    don't do anything. I am unsure if the advancedsettings.xml is working, path /storage/.kodi/userdata/ and XML with NotePad++

    (i.e. splash false does not work)

  • You don't need to modify advancedsettings.xml. OR just use that and not this addon.

    Stop kodi and start evtest. Make short presses on top/left, top/right, bottom/right, bottom/left and put result on pastebin page.

  • Data seems fine to me. At least all the four values.

    But orientation is off or maybe you just didn't follow order correctly.

    Anyway, from what I see it should work. I mean moving mouse cursor all over the screen.

  • Thank you again for your support!

    with "orientation is off" I do not quite understand how I can change that. You do not mean xyswap?

    I have made a video, so you can see how shifted is the touch sensitivity to the display

    External Content youtu.be
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

  • Ok, picture is better but video is even more :)

    I do not understand your problem actually. Run calibration and tap on those points. After that screen will be calibrated. Ignore mouse cursor at this point.

  • Run calibration and tap on those points.

    but I ca'nt do that, because the touch does not react to the first point. Neither in Kodi, nor with selected calibration before the start of Kodi

    I make another very fresh installation and try again.

  • OK, with the fresh installation only with waveshare and touchservice i get with evtest this:

    /event2 the Waveshare but also event3 ? I'm confused!

    This is the config.txt

    Everything is the same as before. Don't be able to calibrate.

  • And if you tap somewhere else on the screen then it moves to next point?

    Or it stays on first point indefinitely?

    Don't do anything. Just get the first point and nothing else.

    Just while the screensaver in Kodi is working, any touch at the display brings Kodi on.

    This says to me: Touch sends data

  • Your touchscreen: /dev/input/event2: ADS7846 Touchscreen

    New input device created by addon /dev/input/event3: tslib to uinput daemon and used by kodi

    Frankly I don't know what is wrong. Your touchscreen works fine according to evtest. Maybe there is something wrong with addon itself. I don't have any such touchscreen to actually test it.

    You can try to stop kodi (systemctl stop kodi) and select /dev/input/event3: tslib to uinput daemon with evtest. And again tap top/left, top/right, bottom/right, bottom/left and put result on pastebin page to see if daemon works correctly. I assume no.

  • Finaly... I've got a solution. see below. I'll explain what I've tried before.

    Because the touch works, but the data was wrong, I took the image of Waveshare here: Waveshare 5inch HDMI LCD

    then configured everything under X11 and got an interesting result 99-calibration.conf after install:

    Code
    Section "InputClass"
            Identifier      "calibration"
            MatchProduct    "ADS7846 Touchscreen"
            Option  "Calibration"   "208 3905 288 3910"
            Option  "SwapAxes"      "0"
    EndSection

    The basic setup was quite good with these parameters in the config.txt at the image from waveshare,

    Code
    dtparam=i2c_arm=on
    dtparam=spi=on
    enable_uart=1
    
    hdmi_group=2
    hdmi_mode=1
    hdmi_mode=87
    hdmi_cvt 800 480 60 6 0 0 0
    dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900

    but I had to calibrate so that I could use the touch exactly.

    The values of the calibration may be informative. This is 99-calibration.conf after first calibration:

    Funny thing is that with each calibration different values have come and I could bring it at least with four attempts to no exact functioning touch. Other results of calibration:

    I thought to use these values above in a config file for service.touchscreen/pointercal, but since I have none and their structure does not know, I have rejected that.

    Back to the Libreelec I took the config.txt settings from the image of Waveshare and then tried again with the advancedsettings.xml.

    Now it has worked so far successful that I have a perfectly calibrated touch under Kodi. The calibration from the addon still does not work because of the offset.

    This is the config.txt:

    and this the advancedsettings.xml I found these parameters here: Waveshare 5 Inch Touchscreen funktioniert unter Kodi nicht richtig

    Code
    <advancedsettings>
      <touchscreen>
        <x_offset>-32</x_offset>
        <y_offset>-35</y_offset>
        <x_stretch_factor>0.209</x_stretch_factor>
        <y_stretch_factor>0.131</y_stretch_factor>
      </touchscreen>
    </advancedsettings>

    If you get me the structure of the pointercal of you, I can test it, whether it works without advancedsettings.xml.

    Thanks again for your support vpeter!

  • Henne: I think I know what is your problem.
    Waveshare files are used only when hidraw device is used for such displays. But your is not like that.

    That's why you need to copy ts_env.sh-sample to ts_env.sh (and change TOUCHSCREEN_NAME) and copy ts.conf-generic to ts.conf. I think then you could calibrate and everything will be fine.

    Let me know the result.

  • Dear all,

    I use an old egalax touchscreen (resistive, via HDMI->VGA, 1024x768) and install + calibration worked rather well. Now I have a problem with all skins on LE Krypton:

    If a menu has more entries (e.g. main menu) vertically, I can manage to scroll down to see what is at the bottom, but it is impossible to scroll up again. There is no place where touching results in upwards scrolling. Instead, the touch results in some selection of a menu that is just there where the touch is placed. For downwards scrolling it is sufficient to go to the bottom. Is there any possibility to fix that? If e.g. a file is selected for playing (which can be a long list, at least longer than the vertical resolution of the screen), this is no problem, because there are small vertical bars at the side to scroll down and up. But for the main menu(s), there is no such scroll bar.

    Can such bars be added (at least on demand) or is there another possibility?

    Thanks for any hints.

    best,

    lcg

  • lcgh: addon emulates mouse which means it should work the same. If you can scroll down also scroll up should work.

    I don't have any system currently to check this. But last time it was working as expected.

  • Thanks vpeter,

    any additional info "how" to try this out? Yes, touch itself works, selection works, too, but moving the finger or the pen (which came with the resistive touchscreen) does not result in real scrolling. In case of bars it works. Using keyboard arrows the navigation is without any problems. It seems to me that this is a problem of the skin(s) per se.

    Example: just tried under PC/Windows with mouse (Leia Alpha build, but I expect this to be the same as I use Krypton with the RPi) as you pointed out that the addon emulates mouse:

    • scrolling is only possible downwards in main menu (estuary) while just moving the mouse and doing nothing else
    • scrolling is not possible with mouse upwards if not the mouse wheel is used
    • mouse wheel works as expected (scrolling up and down)

    So if it works not for the mouse, it won't work for the touch unless the touch emulates also the mouse wheel. Is it that way?

    thanks and best.

    lcg

  • This has nothing to do with mouse wheel.

    And I think I'm starting to understand the problem. Maybe only scroll bars works.

    That's why there is Estouchy skin which is more useful with touchscreen.

    It was some time when I checked addon last time. Maybe something become broken (and as I wrote I don't have any hw anymore to check).