• I keep my fingers crossed for Touchscreen support with eGalax drivers... :rolleyes:
    Btw. good luck for you guys, good to see something evolving! :D

  • I'm wondering how much users are out there which would have benefit with this included...


  • I think for starters I will make community builds with this feature and later we can move forward.
    I have only two special LVDS displays which are working ootb and for all others some manual config must be made.


  • A community build with tslib Integration and egalax / EETI support would be awsome! And a step by step tutorial to integrate 3rd party touchscreen drivers into the source files also.

  • Good news everyone

    I've build a community image of LibreELEC 7.0.1 for egalax touchscreens with "vpeter's" tslib approach.

    I've also build a LibreELEC 7.0.1 image for Faytech touchscreens with integrated 3rd party drivers.

    First of all, I'm not a developer I've just followed a few tutorials and was successfull

    you can download the LibreELEC 7.0.1 image with egalax support and tslib integration here

    you can download the LibreELEC 7.0.1 image with egalax support and tslib integration for Faytech touchscreens here
    -> it should work out of the box, if there is a calibration problem just go to programm section and start the calibration addon and touch the five crosses (do not plug in any keybord or other USB device before Kodi is loaded, except WiFi)

    For installation of non Faytech touchscreens follow this tutorial after the building process at the line with the beginning "Start a ssh session with your Pi2"


  • Hi vpeter, I will try to describe every step from beginning:

    1.) First of all install Ubuntu Desktop LTS 16.04 beside Windows 7 for Cross-Compiling LibreELEC
    - Download and burn the Ubuntu Desktop LTS 16.04 Image -> download
    - Start from Ubuntu Desktop LTS 16.04 DVD in Live-Mode and open 'GParted' to downsize your Windows partition. For installing Ubuntu Desktop LTS 16.04 and Cross-
    Compiling LibreELEC we need ca. 50GB unused harddisk space.
    - Reboot, boot from Ubuntu Desktop LTS 16.04 DVD, Install Ubuntu.
    - When Ubuntu is successfully installed open a 'Terminal' to install the necessary building tools for Cross-Compiling LibreELEC:

    sudo apt update && sudo apt upgrade

    sudo apt-get install gcc make

    sudo apt-get install build-essential

    sudo apt-get install git

    sudo dpkg-reconfigure dash

    -> Select no, to install bash as the default
    -> Reboot

    2.) Preparing for Cross-Compiling:

    - Open a 'Terminal'

    git clone

    Now the source code files were copied to your home folder

    - Move into the source code directory

    cd ~/

    - Choose the version (Branch/Tag) of LibreELEC to Cross-Compile

    git checkout 7.0.1

    -> The possible versions of LibreELEC you can checkout are available on Github --> here
    I chose the latest stable version 7.0.1

    3.) Cross-Compile a clean build to check possible errors:

    - The building process takes a few hours, depending on your hardware. With my hardware (quad core 4x4Ghz) ca. 2 hours.
    - The following command is for building an image for Raspberry Pi 2 & 3

    PROJECT=RPi2 ARCH=arm make image

    - After this Cross-Compiling process you should have a working LibreELEC 7.0.1 Image in the target folder -> /
    - For a test you can unpack and install 'LibreELEC-RPi2.arm-7.0.1.img.gz' to your Rasberry Pi 2 or 3 SD-Card

    4.) In this step we intergate the 'tslib approach' from vpeter into LibreELEC to get egalax touchscreen support:

    - Download tslib --> here
    - Unzip the content and copy the tslib folder to
    - Now we have to edit the in to integrate tslib into the building process

    -> Open the file

    - Change the line:

    PKG_DEPENDS_TARGET="toolchain cpio:host kmod:host pciutils xz:host wireless-regdb keyutils"


    PKG_DEPENDS_TARGET="toolchain cpio:host kmod:host pciutils xz:host wireless-regdb keyutils tslib"

    -> Safe the file and exit

    5.) Changing kernel configuration (linux.arm.conf) to enable egalax touch support.

    - Open the file
    - To enable egalax touchscreen support to your kernel you have to uncomment and set to yes the following lines:


    -> Safe the file and exit

    6.) Cross-Compiling LibreELEC for Raspberry PI 2/3 with tslib integration and egalax touchscreen support from kernel:

    - Go to folder and delete the 'target' folder from the test building process before.
    - Open a 'Terminal'

    sudo apt update && sudo apt upgrade

    cd ~/

    PROJECT=RPi2 ARCH=arm make image

    -> This second Cross-Compiling process should just take ca 10-15 minutes
    -> Now you can find your image with egalax touchscreen support in the target folder -->

    7.1) Configuring and calibrate LibreELEC/Kodi for egalax touchscreens (except Faytech touchscreens, this will described in 7.2)

    - Unpack & install your created image to your SD-Card. I've made a bundle of the needed tools for Windows ->download
    - Format your SD-Card with SDFormatter
    - Install your image with Win32DiskImager
    - Plug your SD-Card into your Raspberry PI
    -> Don't plug in anything else than your WiFi-USB-Device/LAN-Cable, keyboard and touchscreen.
    - Start your Raspberry PI and install LibreELEC, within the installation enable SSH-Support and configure your network connection
    - Checkout & remember the IP-Adress from your Raspberry PI (SYSTEM-->System info)
    - Shutdown your Raspberry PI and unplug the keyboard
    - Start Raspberry PI again

    - Start in Windows with putty a SSH-Sesion to your Raspberry PI

    ->SSH-Login: root / SSH-Password: libreelec
    - If you got a tochscreen e.g with 4:3 ratio and a resolution of 1024x768 we change first the resulution in config.txt
    (a list with more hdmi_groups & hdmi_modes you can find here )

    mount -o remount,rw /flash
    nano /flash/config.txt

    - copy the following lines at the end of config.txt


    -> Exit with--> Ctrl+x
    -> Save with--> y
    -> Confirm with--> Enter

    mount -o remount,ro /flash

    - Start a new SSH-Session and run the following commands:

    systemctl stop kodi
    cd /storage/.config/ts
    cp ts.conf-generic ts.conf

    - Checkout the input/event number your touchscreen has got with 'evtest'


    -> Choose each number and touch your screen to see if there is a output. If you get an output from your touchscreen remember the input/event number.
    -> Exit or cancel 'evtest' with--> Ctrl+c

    - Integrate the input/event number into the script ''

    sed -i 's|export TSLIB_TSDEVICE=.*|export TSLIB_TSDEVICE=/dev/input/event1|'

    -> change the number from "event1" to your input/event number you have got from 'evtest'
    -> for example: sed -i 's|export TSLIB_TSDEVICE=.*|export TSLIB_TSDEVICE=/dev/input/event3|'

    - Integrate the Frame Buffer Device into the script ''

    ls /dev/fb*

    -> remember the output Frame Buffer Device, for example: /dev/fb0

    sed -i 's|export TSLIB_FBDEVICE=.*|export TSLIB_FBDEVICE=/dev/fb0|g' /storage/.config/ts/

    -> change the number from "/dev/fb0" to your Frame Buffer Device you have got from 'ls /dev/fb*'
    -> for example: sed -i 's|export TSLIB_FBDEVICE=.*|export TSLIB_FBDEVICE=/dev/fb3|g' /storage/.config/ts/

    - Creating

    nano /storage/.config/

    copy the following lines:

     (sleep 3; \
    . /usr/bin/;
    ts_uinput_touch -x 1024 -y 768

    --> If you have set a different resolution before in 'config.txt' (hdmi_group & hdmi_mode) you have to use it here.

    -> Exit with--> Ctrl+x
    -> Save with--> y
    -> Confirm with--> Enter

    - Calibration

    . /usr/bin/
    ts_uinput_touch -x 1024 -y 768

    -> If you have set a different resolution before in 'config.txt' (hdmi_group & hdmi_mode) you have to use it here.

    -> start with 'Putty' a second SSH-Session

    systemctl start kodi

    - Plug in your USB-Keyboard and navigate to: Programs-->Tslib/Kodi Touch Screen Calibration
    - Touch the five crosses, confirm with Enter
    - Shutdown your Raspberry PI & unplug your USB-Keyboard
    - Power on your Raspberry PI and your touchscreen should work

    7.2) Configuring and calibrate LibreELEC/Kodi for Faytech touchscreens

    (to be continued...)

    Edited once, last by Grruhn ().

  • There is no need of Instead edit file /storage/.config/ts/ and uncomment and set TSLIB_RES_X and TSLIB_RES_Y. Everything else is done automatically.

    Also calibration should be done from Kodi itself with calibration addon. If for some reason it fails then running from console could help.


  • @ Grruhn,
    Thank you for the detailed write-up.
    Followed the steps, with a bit of tweaking, managed to setup for eGalax touchscreen successfully!! =)

    Thank you. Have been following your guide since OpenElec..

  • @ Grruhn: also a big thank you from me! yesterday I compiled, today I installed Libreelec with Touchsupport on my Nuc's in the kitchen and in the bathroom - they are attached on egalax Touchscreens. everything went fine and now in every room is the same system like in the livingroom - no Kodibuntu anymore

  • It is nice to hear that

    Very thanks to Grruhn who step up and make instructions. We need more people like him...


  • _Jackson_ thats great to hear! Don't forget to thank vpeter, his work on the tslib approach and his great support to me made it possible for me to write this tutorial, in the past in openelec forum and nowerdays at this great LibreELEC project.

  • Hello,

    After a success on OE with this tslib method a few months ago, I tried it with LE.

    On the current LE master.

    There is an evtest conflict with an addon that I am not building, so I removed that extra package, keeping the one in tslib.

    I get through all the terminal motions and config without a problem.

    But when it comes to using the Program Addon for calibration... No addon is visible anywhere in Kodi.

    The calibration addon files are present in /usr/share/kodi/addons

    There is nothing about the addon in the kodi logs.

    Could it be an issue of addon incompatibility with Kodi 17?

    I can provide any requested testing and data!