Touchsupport

  • My touchscreen doesn't work, not even the top left "small area", nothing at all.

    It's a resistive "waveshare" touchscreen (it shows up as "d-wav..."). It works in Raspbian but not in LibreELEC.

    I've downloaded and installed Libreelec(version 8.0.3) since it doesn't need complied anymore. Then I searched for the Touchscreen service (service.touchscreen-8.1.100.100) & System Tools addon and installed them. I've copied ts.conf-waveshare to ts.conf and ts_env.sh-waveshare to ts_env.sh. I'm not sure exactly what directory to put these, I put them in /storage/.kodi/userdata/addon_data/service.touchscreen. Through tweaking, I've even got the Touchscreen addon to display (not just the loading spinner) but I can't press the cross-hairs because there's no touchscreen inputs. Running evtest does give me output when I touch the screen.

    I believe the problem is the service.touchscreen isn't running...probably because it's error-ed off.
    Where are the logs to see why the daemon isn't running?

    Please help.

  • I changed the PID=0001 (waveshare driver) in ts_env.sh to get the touchscreen calibration addon working. But again, I'm not getting any input on the touchscreen itself to calibrate it. How can I tell if the service.touchscreen is running?

  • i got it to finally work. For some reason my touchscreen lists 2 items. When I run evtest, this is what I get...

    Code
    No device specified, trying to scan all of /dev/input/event*
    Available devices:
    /dev/input/event0:    eGalax Inc. USB TouchController Pen
    /dev/input/event1:    eGalax Inc. USB TouchController
    /dev/input/event2:    tslib to uinput daemon
    Select the device event number [0-2]:

    I get touchscreen inputs only from /dev/input/event1. When I put the name from /dev/input/event1 into ts_env.sh as such...

    Code
     TOUCHSCREEN_NAME="eGalax Inc. USB TouchController"

    It didn't work. After a lot of experimenting, I saw this when I ran

    systemctl status service.touchscreen -l

    If you'll notice the second to last line, it's reading from /dev/input/event0, the wrong on. it was always picking up the previous input. I plugged in a bluetooth module which moved everything down but again, it was always off by the previous one. My guess is that there is something wrong with the comparison in the TSLIB_TSDEVICE= line in ts_env.sh.

    I got it to work by commenting out the line in ts_env.sh that tries to discover the device by name and added this line under it.

    Code
    TOUCHSCREEN_NAME="eGalax Inc. USB TouchController"
    
    # TSLIB_TSDEVICE=$(echo 999 | evtest 2>&1 >/dev/null | awk -F':' -v TS_NAME="$TOUCHSCREEN_NAME" '$0 ~ TS_NAME {print $1; exit}')
    TSLIB_TSDEVICE=/dev/input/event1

    I basically forced TSLIB_TSDEVICE for testing purposes and it worked. It's not a permanent fix because things move around depending what's plugged into the USB but at least it's a start.

  • You can try

    Code
    TOUCHSCREEN_NAME="eGalax Inc. USB TouchController$"

    Notice $ at the end meaning end of string.

    Or checking whole name with

    Code
    TOUCHSCREEN_NAME="^[\t ]*eGalax Inc. USB TouchController$"
    TSLIB_TSDEVICE=$(echo 999 | evtest 2>&1 >/dev/null | awk -F':' -v TS_NAME="$TOUCHSCREEN_NAME" '$2 ~ TS_NAME {print $1; exit}')
  • Btw: when waveshare touchscreen shows events with evtest then ts_env.sh-sample must be copied.

    ts_env.sh-waveshare is used only for waveshare displays which are using proprietary driver which is included in tslib (it uses raw data from

    /dev/hidrawX).

  • I originally tried the waveshare drivers because after reading here, that's what mine displayed as. However, I could never get it to work. I figured the device was simply displaying the wrong information even though it had 'eGalax' in the description.

    After much frustration, changing the PID in the waveshare driver and what not, I tried the 2 generic drivers, set the TOUCHSCREEN_NAME and noticed that the 'tslib to uinput daemon' was running when I did evtest. However, it was pointed to the wrong device(post #203) so I forced the device for testing purposes and the touchscreen worked! I then used your recommendation with the $ and all is good. Long story short, my touchscreen must not be a waveshare device. Got it from someone on eBay dealing straight from China, no documentation.

    Mod note: added hyperlink to post #93.

  • Hey,

    I've tried to use the image provided by Grruhn to calibrate my faytech touchscreen, but all that comes up when i try to open the calibration addon is a black box...

    How do I get the addon on the latest LibreELEC release? You said it's on the repository, but after looking to install it from within kodi, i couldnt find it listed anywhere. Do I need to add it outside of kodi?

  • Which display exactly? Does it work with evtest (when kodi is stopped)? IS the name of touchscreen correctly copied from evtest to ts_env.sh file? .......

    What does status show?

    Code
    systemctl status service.touchscreen.service
  • Its the faytech 10" capacitive touch monitor (FT10TMBCAP). Does work with evtest. By name do you mean the event name, if so yes.

    Status shows:

  • You are probably missing files ts.conf and ts_env.sh in folder /storage/.kodi/userdata/addon_data/service.touchscreen.

    Code
    cp /storage/.kodi/userdata/addon_data/service.touchscreen/ts_env.sh-sample /storage/.kodi/userdata/addon_data/service.touchscreen/ts_env.sh
    cp /storage/.kodi/userdata/addon_data/service.touchscreen/ts.conf-generic /storage/.kodi/userdata/addon_data/service.touchscreen/ts.conf

    Then change in ts_env.sh the line with your touchscreen name

    Quote

    TOUCHSCREEN_NAME="Goodix Capacitive TouchScreen"