10/11/2019 Egalax Touch Driver Linux Arm
Contents. Introduction This article assumes that your touchscreen device is supported by the kernel (e.g. By the usbtouchscreen module). That means there exists a /dev/input/event. node for your device. Check out less /proc/bus/input/devices to see if your device is listed or try cat /dev/input/event? With the event numbers for every of your event nodes while touching the display.
![]()
Egalax series Touchscreens. Used by many devices, some examples: UnyTouch 15' LCD TouchScreens; Skyport GmbH 12.1' TFT Touchscreen VGA Monitor; There is a egalax driver, but for usb you can also use the evtouch xorg input driver. Oct 23, 2018 - If you ever tried to set up a touchscreen device in linux, you might have. Drivers exist for some devices (e.g.: xf86-input-egalaxAUR), but it's.
If you found the corresponding node, it's likely that you will be able to get the device working. Available X11 drivers There are a lot of touchscreen input drivers for X11 out there. The most common ones are in the extra repository:. (likely the default driver if you plug in your touchscreen and it 'just works').; see also. Less common drivers, not contained in the repository, are:. xf86-input-magictouch.
xf86-input-mutouch. xf86-input-plpevtch. xf86-input-palmax Proprietary drivers exist for some devices (e.g.: AUR), but it's recommended to try the open source drivers first. Depending on your touchscreen device choose an appropriate driver. Again, evdev is likely to be the default if your touchscreen 'just works.' Evdev drivers Calibration Install AUR (AUR).
Then, run xinputcalibrator and follow the instructions. Using a touchscreen in a multi-head setup To use multiple displays (some of which are touchscreens), you need to tell Xorg the mapping between the touch surface and the screen. This can be achieved with xinput as follows.
Take for example the setup of having a wacom tablet and an external monitor; xrandr shows both displays: $ xrandr Screen 0: minimum 320 x 200, current 2944 x 1080, maximum 8192 x 8192 LVDS1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 1024x768 60.0.+ 800x600 60.3 56.2 640x480 59.9 VGA1 connected 1920x1080+1024+0 (normal left inverted right x axis y axis) 477mm x 268mm 1920x1080 60.0.+ 1600x1200 60.0 1680x1050 60.0 1680x945 60.0 You see we have two displays here. LVDS1 and VGA1.
LVDS1 is the display internal to the tablet, and VGA1 is the external monitor. We wish to map our stylus input to LVDS1. Reason: How to automate the map-to-output operation above? (Discuss in ) Touchegg is a multitouch gesture program, that runs as a user in the background, recognizes gestures, and translates them to more conventional events such as mouse wheel movements, so that you can for example use two fingers to scroll.
But it also interferes with applications or window managers which already do their own gesture recognition. If you have both a touchpad and a touchscreen, and if the touchpad driver (such as synaptics or libinput) has been configured not to recognize gestures itself, but to pass through the multi-touch events, then Touchegg will recognize gestures on both: this cannot be configured.
In fact it does a better job of recognizing gestures than either the synaptics or libinput touchpad drivers; but on the touchscreen, it's generally better for applications to respond to touch in their own unique ways. Some Qt and GTK applications do that, but they will not be able to if you have Touchegg 'eating' the touch events. So, Touchegg is useful when you are running mainly legacy applications which do not make their own use of touch events.
Lately I have tested OpenElec for Raspberry PI and found out that it is very very fast, very very small and also it has some great addons(wifi, bluetooth and more). Speed/size features on an 512MB RaspberryPI: - a complete boot is less than 25 seconds - cpu is around 30% load - memory used is 32% - total system size is less than 300MB Edit. You can download my build from (contains eGalax module and XBMC patches). Username is root and password is openelec. The touch screen calibration file should be put in /storage/touchscreenaxescalib. Next, I will guide you through the instructions for building(cross compile) latest OpenElec for Raspberry PI with touch screen support. For this tutorial let's assume that you have a Linux machine where you will work.
Get the latest OpenElec. Git clone git://github.com/OpenELEC/OpenELEC.tv.git 2.
Add kernel touch screen module support. Open the file OpenELEC.tv/projects/RPI/linux/linux.arm.conf and search for 'CONFIGINPUTTOUCHSCREEN'. Replace the whole text line with the following lines: CONFIGINPUTTOUCHSCREEN=y CONFIGTOUCHSCREENUSBCOMPOSITE=y CONFIGTOUCHSCREENUSBEGALAX=y 3. Fix ppl version in OpenElec. Open the file OpenELEC.tv/packages/toolchain/math/ppl/meta and change PKGVERSION from '1.1pre9' to '1.1pre10' 4. Put touch screen calibration file into the system.
Navigate to folder OpenELEC.tv/projects/RPI/ and create the file usr/share/eGalaxCalibration/touchscreenaxescalib. This file should have the following contents: calibxd=-21;calibxfact=0.658097686;calibyd=-50;calibyfact=0.408626561;swapaxes=0;clickconfines=8 To set up these values please visit (at section 4). This step is not needed any more, because you can use the calibration addon to calibrate your screen. Get the calibration addon from my folder and put it in /storage/.xbmc/addons/ 5. Put XBMC 12.3 patch.
Get my latest patches from and put them in the folder OpenELEC.tv/packages/mediacenter/xbmc/patches/ 6. Build OpenElec.
Navigate to OpenElec folder and type: PROJECT=RPi ARCH=arm make -j3 -j3 option is to use parallel build(if you have more than one cpu's set this number as nbcpus+1). This option will speed up the build process. The build process will take couple of hours, but you have to come back once(in the first 10 minutes) and press ENTER for the kernel touch screen modifications to be approved. Install or Update your OpenElec card.
Go to and follow the 'Install instructions' chapter. Hi Andrei, thanks for sharing this. I have a problem but it is not quite related with this tutorial.
I bought one Lilliput 7' screen that has an eGalax touch. With raspbian, it worked out of the box, except that the touchscreen is not calibrated. Then, following one other tutorial of you, I installed the xinputcalibrator but it can't calibrate because my axes are inverted, so it always 'misclick'. Then, I tried to put some values manually and ended up getting close but not good yet. The values I set on my xinput file are: Section 'InputClass' Identifier 'calibration' MatchProduct 'eGalax Inc.
USB TouchController' Option 'Calibration' '121 1917 317 1741' Option 'SwapAxes' '1' EndSection But this is still not good. Although the axes are not inverted, the point is not even close from where I put my finger. I have no idea how to solve this. So, my questions are the following: 1. Do I need to install other driver for eGalax? (since I didn't install anything, Raspbian recognized it) 2. Is there another way to calibrate it?
(I'm not gonna use it with XBMC) Please help me, I'm already getting crazy with this! Thank you very much and best regards, Sergio Soares (Brazil). Hi Andrei, I managed to make it work well (not ideal yet). I followed the instructions provided by 'aragats' in this forum post: First I changed my resolution to 720x480, then I changed my xinputcalibrator file with values similar to these ones: Section 'InputClass' Identifier 'calibration' MatchProduct 'eGalax Inc. USB TouchController' Option 'Calibration' '79 4012 3895 262' Option 'SwapAxes' '1' EndSection Now everything is fine! Sergio Soares.
Your posted build is working fine like a charm. But i have one big problem, due to the read-only system. I CAN NOT CHANGE THE 'eGalaxCalibration/touchscreenaxescalib' file. I have a 8 inch touchscreen and now the x/y is off. I followed the next link about the mathematics.
But there is a big initial problem: I CAN NOT CHANGE THE 'eGalaxCalibration/touchscreenaxescalib' file. CAN YOU RECOMPILE THIS IMAGE FOR MY 8 inch LCD. Touch working fine so far. Only x/y are offset. I HAVE NO LINUX MASCHINE AVAILABLE AND I AM A LINUX NOOB. My LCD Data: Resolution 1024x768 Physical: 1620 mm x 1220 mm With a big help shout Stefan.
Anonymous Hello out there! I had the same problems as you too, Stefan.
My eGalax wasnt calibrated in the right way. But with a short search on google I found a very interesting post. Maybe this will help you, as it did to me.:-) I like the fact, that the filesystem is readonly, u cant destroy it as easy as usual.:-) with this little trick, I can do my changes and everything works fine and save! @Andrei, I love the fact, that the Airplay works just great with your lastet openelec build! With the older Image from August I had my Problems, but your choice to switch to openelec was the right one, well at least for me!:-) I promised you that I will tell you about the airplay-function some weeks ago: And now, the Airplay works great and not quite a bit laggy with iTunes on Windows, on my iPad-Mini and my iPhone 5.:-) Greetings, Knut. Anonymous Whops, i made a little mistake here.
The documentation u need is the following: There is the descritption on how the addon 'should' work. But unfortunately it doesnt! Not out of the box.
MY steps where the following:. Download the zip.file that inherits the addon for openELEC:. Next, just use the openELEC onboard-script to install this, e.g. From a local NAS, like I did (over SMB, was the easiest way.). After reboot you can follow the documentation, until you get to the point where it says 'Now you can make your changes'.
After you did your changes, you need to fix the addon itself, otherwise you wont be able to run the packSYSTEM-script. First: Fix the config-Path in '/storage/.xbmc/addons/shell.squashfs-tools.mksquashfs/bin/mksquashfs' The path there doesnt point to the path as I just mentioned. It shows: 'shell.squashfs-tools/mksquashfs' but it used to show 'shell.squashfs-tools.mksquashfs'.
After that u have to replace the old, broken lib 'liblzma.so.5' with the newer version '.5.0.4'. The 5-ish file is just broken, at least on my download.:-) Luckily both of these libs are in the '/storage/.xbmc/addons/shell.squashfs-tools.mksquashfs/lib/'-directory.
Last but not least you have to 'mkdir /storage/update' so that the script works properly! With these small fixes i was able to run the packSYSTEM-script. But that took so long. Ok, so far so well. It is working. And it is really a fun way now, to manipulate the values and having it tested.
Really nice work and i am really thankfull!!! But there is a new problem: THE AXES ARE INVERTED (not swapped) and i have a problem to fix this in the egalax config file. As far as i know you can swap the axes but not invert them. (i read the posts above) may i ask of this small fix and everything is perfect! (my lcd does support axe-mirroring so i can still use inverted axes, but i have to display the lcd upside/down. That´s a bit nasty) Thank you for your great effort, its priceless and i honor you:).
By tweaking the values from the calibration file you can obtain any behaviour for the pointer movement regarding your finger. Now, to invert X axis, for example you have to multiply calibxfact with -1 and set calibxd equal to the screen width - some experimental displacement. For example, in my case I have calibxd=-21;calibxfact=0.658097686 in my calib file and a width of the screen equal to 1280. So if I want to invert X movement I have to set following values: calibxd=1301;calibxfact=-0.658097686 calibxd = 1280 - (-21) For Y you have to do the same as for X.
Regards, Andrei. Anonymous hi again, i used the openelec menu to set up the wlan.
I wonder because, it got an ip but i cant ping and ssh. The folder /etc/network/interfaces isnt there. OpenELEC: # cd /etc/ OpenELEC:/etc # ls LCDd.conf ld.so.preload rckeymaps arch lirc rcmaps.cfg avahi localtime release build machine-id resolv.conf connman mke2fs.conf rpc dbus-1 modprobe.d samba distribution modules sensors3.conf eventlircd.d modules-load.d services fonts moduli shadow fstab motd sshconfig gai.conf mtab sshdconfig gitrev netconfig suspend-modules.conf group nsswitch.conf sysctl.d host.conf openelec-release systemd hostname passwd tmpfiles.d hosts pki udev httpd.conf profile udevil inputrc profile.d version issue protocols xdg. Ok, so you are talking about the OpenElec image. I haven't tested wifi on it. It seems that there is a bug with this, but I haven't modified anything, just added touch support.
Maybe some kernel modules are missing?! You can install a working OpenElec from their website and then get the kernel configuration using: zcat /proc/config.gz config.
After this, you can use meld to see the difference between this config file and the one from OpenElec.tv git: OpenElec.tv/projects/RPI/linux/linux.arm.conf and update it with the new modules. After this you will have to build OpenElec on your PC. Regards, Andrei. Hi Andrei, Thanks for your post, very helpful. I write after read a lot of comment's without success. I use your compiled Openelec/Xbmc because i don't have any ubuntu VM to compile!
Xbmc work's fine, the Touchscreen too. But the Touch. Without any configuration, the touch work, but not with good calibration. So i create a touchscreenaxescalib under /storage. But when i have no file i can move the mouse with my finger, with bad calibration And with the file, i can't find anymore my mouse. I have try your raspbian to get the 'touch panel physical size frame' and configure the touchscreenaxescalib but i can't make it works fine.
So: Can i find anywhere the default touchscreenaxescalib configuration? Did you put any log writing on your code to follow the touch/mouse position? Thanks for your help. I am glad I can help a bit:) Now, In the image downloaded from this post, the touchscreenaxescalib file should already be in /storage/ if I remember corectly(I haven't used it in couple of months). If it is not, then putting the same file from a wheezy working xbmc version will work as well.
Now, if you want to put the default values, you need to know your xbmc screen width and height. After this, you have to set the file like this: calibxd=, calibyd=, calibxfact=calibyfact=1 I suggest you to use the formulas from the step 4 in the folowing post: If you don't succeed please contact me directly on Gtalk, Skype or YM. Anonymous ill get this: patching file xbmc/windows/GUIWindowSystemInfo.cpp APPLY PATCH (common) /home/dev/test/OpenELEC.tv/packages/mediacenter/xbmc/patches/xbmc-300-eGalaxPatch.patch patching file xbmc/input/linux/LinuxInputDevices.cpp Hunk #1 succeeded at 274 (offset -43 lines). Hunk #2 succeeded at 498 (offset -47 lines). Hunk #3 succeeded at 655 (offset -43 lines). Patching file xbmc/input/MouseStat.cpp Hunk #1 FAILED at 20. Hunk #2 succeeded at 49 (offset 11 lines).
Hunk #3 succeeded at 149 (offset 11 lines). 1 out of 3 hunks FAILED - saving rejects to file xbmc/input/MouseStat.cpp.rej patching file xbmc/input/MouseStat.h Hunk #1 succeeded at 125 (offset 2 lines).
Make:. system Fehler 1. Have you rebuilt your patch file for the newest version of OpenELEC? I am trying to get the touchscreen working but I am also getting an error when I add the patch file.
Patching file xbmc/windows/GUIWindowSystemInfo.cpp APPLY PATCH (common) /home/dev/test/OpenELEC.tv/packages/mediacenter/xbmc/patches/xbmc-300-eGalaxPatch.patch patching file xbmc/input/linux/LinuxInputDevices.cpp Hunk #1 succeeded at 274 (offset -43 lines). Hunk #2 succeeded at 498 (offset -47 lines). Hunk #3 succeeded at 655 (offset -43 lines). Patching file xbmc/input/MouseStat.cpp Hunk #1 FAILED at 20. Hunk #2 succeeded at 49 (offset 11 lines). Hunk #3 succeeded at 149 (offset 11 lines). 1 out of 3 hunks FAILED - saving rejects to file xbmc/input/MouseStat.cpp.rej patching file xbmc/input/MouseStat.h Hunk #1 succeeded at 125 (offset 2 lines).
Make:. system Fehler 1 I've never manually added patches before, so I was hoping you had the patch completed. Hello Andrei, i do all the things that you wrote in your HOW TO. I use the last version of the patches in der top right of this blog But when i start i have a problem with the xbmc-300-eGalaxPatch.patch I think it is a version problem. Here is the output from my terminal: APPLY PATCH (common) /home/steffen/OpenELEC.tv/packages/mediacenter/xbmc/patches/xbmc-300-eGalaxPatch.patch patching file xbmc/input/linux/LinuxInputDevices.cpp Hunk #1 succeeded at 293 with fuzz 2 (offset -24 lines).
Hunk #2 succeeded at 570 with fuzz 2 (offset 25 lines). Hunk #3 FAILED at 698. 1 out of 3 hunks FAILED - saving rejects to file xbmc/input/linux/LinuxInputDevices.cpp.rej patching file xbmc/input/MouseStat.cpp Hunk #1 FAILED at 20. Hunk #2 FAILED at 38. Hunk #3 FAILED at 101. 3 out of 3 hunks FAILED - saving rejects to file xbmc/input/MouseStat.cpp.rej patching file xbmc/input/MouseStat.h Reversed (or previously applied) patch detected! n What can i do?
Hello Netzmacht, thanks for your information. But it dose not work for me. I will explain what i do step by step: 1. Git clone git://github.com/OpenELEC/OpenELEC.tv.git - This is 13.2 Alpha 2.
Insert CONFIGINPUTTOUCHSCREEN=y CONFIGTOUCHSCREENUSBCOMPOSITE=y CONFIGTOUCHSCREENUSBEGALAX=y in OpenELEC.tv/projects/RPI/linux/linux.arm.conf 3. Navigate to folder OpenELEC.tv/projects/RPI/ and create the file usr/share/eGalaxCalibration/touchscreenaxescalib. This file should have the following contents: calibxd=-21;calibxfact=0.658097686;calibyd=-50;calibyfact=0.408626561;swapaxes=0;clickconfines=8 - but after build there is no file touchscreenaxescalib 4. Put the patch from you into, rename it to OpenELEC.tv/packages/mediacenter/xbmc/patches/ and rename it intoxbmc-300-eGalaxPatch.patch 5.
Navigate to OpenElec folder and type: PROJECT=RPi ARCH=arm make -j3 After install OpenELEC it starts, but the calibration is wrong and the is no touchscreenaxescalib file on the sd card. Thank for you support!
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |