[Debian R2] Getting an LCD with touchscreen working on the A20

Started by tlhingan, August 19, 2013, 09:42:44 PM

Previous topic - Next topic

tlhingan

Everybody knows about this link.
Unfortunately, an update to the libraries an/or packages last month made this procedure officially broken.

Many people probably found this link with a patch to accommodate the updated libraries and/or packages.
Unfortunately, there's 2 serious things wrong with the procedure:
modprobe loads a module that doesn't exist (the makefile produces the module in question with a different name)
and the link to the 3rd patch file is wrong (the link is to the webpage talking about the patchfile, not to the patchfile itself)

Here is the complete and correct (on my system) procedure with those 2 corrections:
===================================================================================
aptitude install xorg-dev xserver-xorg-dev x11proto-core-dev git automake make
git clone https://github.com/kergoth/tslib.git
cd tslib
wget https://raw.github.com/webconn/OLINUXINO/master/SOFTWARE/A13/TOUCHSCREEN/tslib.patch
patch -p0 < tslib.patch
autoreconf -vi
./configure --prefix=/usr
make
make install
modprobe sunxi-ts
dmesg | grep sunxi-ts

/* manually add sunxi-ts to /etc/modules */

export TSLIB_TSEVENTTYPE=raw
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event# /* manually replace # by input number discovered by dmesg command */
export TSLIB_CALIBFILE=/usr/etc/pointercal
export TSLIB_CONFFILE=/usr/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts

/* manually uncomment "module_raw_input" line from /usr/etc/ts.conf */

ts_calibrate
ts_test

git clone git://git.debian.org/git/collab-maint/xf86-input-tslib
cd xf86-input-tslib
wget https://raw.github.com/webconn/OLINUXINO/master/SOFTWARE/A13/TOUCHSCREEN/1-xf86tslib-sigfault.patch https://raw.github.com/webconn/OLINUXINO/master/SOFTWARE/A13/TOUCHSCREEN/xf86-input-tslib-port-ABI-12-r48.patch https://raw.github.com/webconn/OLINUXINO/master/SOFTWARE/A13/TOUCHSCREEN/xf86tslib-xorg-update.patch
patch -p0 < 1-xf86tslib-sigfault.patch
patch -p0 < xf86-input-tslib-port-ABI-12-r48.patch
patch -p0 < xf86tslib-xorg-update.patch
./configure --prefix=/usr
make
make install
startx

woodward

Thank you so much for this. I am following the instructions. I'm running the debian that came on the sd card, on A20-olinuxino-micro with the A13-LCD10TS. I made it through the "make install" line (although I had to apt-get libtool for the autoreconf line), without errors, but when I run "modprobe sunxi-ts" I get "Module sunxi-ts not found".

Are there other steps that I should be doing first from the vanilla olimex debian build?

thank you

Mouchon

The touch screen modules is not present in the first image provided by olimex but in the second one yes
so may be try this one https://docs.google.com/file/d/0B-bAEPML8fwlc0xGVUdqa1lFQ28/edit?usp=sharing
kr

woodward

#3
Thank you. That image works great after ts_calibrate. With "startx app" the pointer is accurate. Just fyi, lightdm does not seem to use the calibration data. Not a problem for me, just those using lightdm may run into that.

martinayotte

I had similar issue with lightdm on my a10s, but I figured it out that lightdm has some hardcoded paths and don't rely on envvar like TSLIB_CALIBFILE="/etc/pointercal", it is looking in /usr/local/etc/pointercal, same thing for the ts.conf, so I've simply put some symlinks there. Maybe it is the same on A20 ...

woodward

#5
Thank you. I just tried putting the sym links in /usr/local/etc/ and then started lightdm (/etc/init.d/lightdm start), but same problem.

I am thinking that maybe the steps in the original post solve this problem :D. We could hold off for the moment on this lightdm issue until someone who has gone through those steps still experiences it. I am satisfied with the "startx myapp" touch screen working. Thanks again

woodward

AHA! For release-2 of the a20 pre-built debian image, there are duplicate ts.conf and pointercal files located in /usr/etc/. ts_calibrate updates /etc/pointercal, not /usr/etc/pointercal. Looks like "startx app" uses one set, while "/etc/init.d/lightdm start" uses another. So I replaced the files in /usr/etc/ with symbolic links to the files in /etc/. With this change to the vanilla release-2 pre-built a20 debian image, the touchscreen works perfectly for me. Thank you martinayotte for this suggestion.

tlhingan

The new image, Debian R3, has touchscreen support built-in and working out of the box.
These instructions were for Debian R2.