0

2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by ggalt on Sat Feb 18, 2017 2:04 pm

I've got the older version of the 2.8" capacitive touchscreen (#1983). I've been running the Adafruit Jessie Lite image for the capacitive touchscreen and installed a lite version of X and the openbox window manager. It has been working nicely for a few months. All of a sudden, however, no matter where I touch on the screen, the cursor jumps to the upper-left and stays there. It moves slightly as I trace around the entire screen, but only a few pixels up, down, left or right.

If I run sudo evtest /dev/input/touchscreen, here is a sample of the output:
Code: Select all | TOGGLE FULL SIZE
Event: time 1487440373.329114, ++++++++++++++ EV_REL ++++++++++++
Event: time 1487440373.329114, type 3 (EV_ABS), code 0 (ABS_X), value 80
Event: time 1487440373.329114, type 3 (EV_ABS), code 1 (ABS_Y), value 61
Event: time 1487440373.329114, -------------- EV_SYN ------------
Event: time 1487440373.341305, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 87
Event: time 1487440373.341305, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 59
Event: time 1487440373.341305, type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 127
Event: time 1487440373.341305, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 1487440373.341305, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 127
Event: time 1487440373.341305, ++++++++++++++ EV_REL ++++++++++++
Event: time 1487440373.341305, type 3 (EV_ABS), code 0 (ABS_X), value 87
Event: time 1487440373.341305, type 3 (EV_ABS), code 1 (ABS_Y), value 59
Event: time 1487440373.341305, -------------- EV_SYN ------------
Event: time 1487440373.353438, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 94
Event: time 1487440373.353438, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 57
Event: time 1487440373.353438, type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 127
Event: time 1487440373.353438, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 1487440373.353438, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 127
Event: time 1487440373.353438, ++++++++++++++ EV_REL ++++++++++++
Event: time 1487440373.353438, type 3 (EV_ABS), code 0 (ABS_X), value 94
Event: time 1487440373.353438, type 3 (EV_ABS), code 1 (ABS_Y), value 57
Event: time 1487440373.353438, -------------- EV_SYN ------------
Event: time 1487440373.365564, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 103
Event: time 1487440373.365564, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 57
Event: time 1487440373.365564, type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 127
Event: time 1487440373.365564, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 1487440373.365564, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 127
Event: time 1487440373.365564, ++++++++++++++ EV_REL ++++++++++++
Event: time 1487440373.365564, type 3 (EV_ABS), code 0 (ABS_X), value 103
Event: time 1487440373.365564, -------------- EV_SYN ------------
Event: time 1487440373.377726, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 111
Event: time 1487440373.377726, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 59
Event: time 1487440373.377726, type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 127
Event: time 1487440373.377726, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 1487440373.377726, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 127


As you can see, the x and y positions hardly move.

I have reinstalled the Adafruit kernel as suggested here (I realize that help page is for the resistive screen, but it seemed like a possibility anyway). I've also checked the connection of the flex cable, which looks fine.

Any thoughts? This had been working for several months without incident.

FYI, I'm using it on a Pi Zero.

ggalt
 
Posts: 16
Joined: Fri Dec 19, 2014 4:05 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by ggalt on Sun Feb 19, 2017 10:36 pm

Two additional data points:

-- I created a new image using Raspian Jessie Lite (from Adafruit so it supports the pitft capacitive touchscreen) and I get the same issue. Unfortunately, I wasn't thinking and did an apt-get upgrade before testing. I will now go back and try with just the plain vanilla Jessie.

-- I also tried the image on a Pi 1B+ and the same issue persists. I have a Pi 3 laying around that I may also try out, but so far it doesn't seem (pi) hardware related.

I would really appreciate any help or thoughts.

ggalt
 
Posts: 16
Joined: Fri Dec 19, 2014 4:05 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by ggalt on Thu Mar 09, 2017 10:03 pm

OK, I've done some hunting around. I started out with the plain vanilla Raspian Jessie image from Adafruit and a Pi 1B+ (note, this is using the full Jessie install, not Jessie Lite). All is good, touchscreen works and is calibrated successfully.

HOWEVER, upgrading is a problem. Here is what I have found (log of full upgrade process attached).

The initial apt-get update && apt-get upgrade are fine (though it looks like the install of the new non-root xserver or something related reinstalls 99-fbturbo.conf, so you have to get rid of it). After a reboot, the touchscreen still works.

Once you do a apt-get dist-upgrade (as predicted in the install page) the touchscreen no longer works (X still directs to it, though) due to having the Adafruit kernel blown away. I ran through re-installing the Adafruit 2.8c kernel, which DOES NOT fix the problem. I then used the DIY install script from the Adafruit github page (referenced on the easy install page) and it too does not fix the problem.

Something that was updated in February and only gets pulled in through apt-get dist-upgrade -- and is NOT overwritten by the DIY installer script is messing with the screen.

As noted, I've attached the output from the install, so someone at Adafruit (if they are interested) can see what was pulled in.

As it stands, DON'T DO DIST-UPGRADE!
output.txt
output from apt-get
(166.03 KiB) Downloaded 11 times

ggalt
 
Posts: 16
Joined: Fri Dec 19, 2014 4:05 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by kck on Sun Mar 12, 2017 12:14 am

Wish I had found you post sooner. I'm seeing the same issue. I was pulling out my few remaining hairs! This was a problem because I distribute an open source home automation tool whose install instructions just said to grab the latest image from the foundation and run my install scripts which asked about the screen in use. Suddenly started failing with exactly your syndrome. For now I changed the install to require grabbing the image from Adafruit but since users my do other things with those Pi's they will get screwed if they do upgrade. Hope the Adafruit folks take a look at what has broken.

kck
 
Posts: 22
Joined: Fri Dec 25, 2015 1:40 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by ggalt on Sun Mar 12, 2017 12:21 am

And here I thought I was done. Ah well!

I started with the "lite" version of Adafruit's jessie for the 2.8" capacitive screen (which has no X server). I installed a minimal X environment as described here, hoping that things would work. It didn't. The touchscreen keeps the mouse cursor in the upper-left corner regardless of where you touch.

I re-installed the "full" version of Jessie from Adafruit, which works nicely and I generated a list of installed packages and versions. I had already done the same with the minimal X version of the "lite" version of Jessie and looked for changes in packages. I've attached a full diff from the "full" version to the X-enabled "lite" version. But the changes appear to only be a few files:

Code: Select all | TOGGLE FULL SIZE
libcairo-gobject2:armhf1.14.0-2.1+deb8u1+rpi >deb8u2
libcairo2:armhf1.14.0-2.1+deb8u1 +rpi1>deb8u2
libdrm2:armhf2.4.65-3~bpo8+1>armhf2.4.71-1+rpi
libegl1-mesa:armhf11.1.0-1+rpi>armhf13.0.0-1
libgbm1:armhf11.1.0-1+rpi>armhf13.0
libgl1-mesa-glx: armhf11.1.0-1+rpi1> armhf13.0
libglapi-mesa: armhf11.1.0-1+rpi1> armhf13.0
libgudev-1.0-0:armhf215-17+deb8u5> deb8u6
(deleted) libinput-bin1.5.0-1
libinput10:armhf1.5.0-1 > (becomes) libimobiledevice4:armhf1.1.6+dfsg-3.1
libobrender293.5.2-8+rpi2 > rpi3
libobt23.5.2-8+rpi2 > rpi3
libpam-systemd:armhf215-17+deb8u5  > deb8u6
ibsystemd0:armhf215-17+deb8u5 > deb8u6
(deleted) libutempter01.1.5-4
(deleted) libwacom-common0.22-1
(deleted) libwacom2:armhf0.22
libwayland-client0:armhf1. 6.0-2 > 11.0-2
libwayland-cursor0:armhf1. 6.0-2 > 11.0-2
libwayland-server0:armhf1. 6.0-2 > 11.0-2
libxpm4:armhf1:3.5. 11-1 > 3.5.12-0+deb8u1
lightdm1.10.3-3+rpi > lightdm1.10.3-3
openbox3.5.2-8+rpi2 > openbox3.5.2-8+rpi3
systemd215-17+deb8u5 > deb8u6
systemd-sysv215-17+deb8u5 > deb8u6
x11-common1:7.7+7 > x11-common1:7.7+16
xserver-common2:1.17.2-1+rpi1 > xserver-common2:1.18.4-2+rpi1
xserver-xorg1:7.7+7+b1 > xserver-xorg1:7.7+16
xserver-xorg-core2:1.17.2-1+rpi1 > xserver-xorg-core2:1.18.4-2+rpi1
xserver-xorg-input-all1:7.7+7+b1 > xserver-xorg-input-all1:7.7+16
xserver-xorg-input-evdev1:2.9.2-1~bpo8+1 > xserver-xorg-input-libinput0.20.0-1
xserver-xorg-video-fbdev1:0.4.4-1+rpi1 > xserver-xorg-video-fbdev1:0.4.4-1+rpi2


My guess is that moving to the slightly newer xserver files or the new wayland files has upset something. I'm happy to dig further if anyone from Adafruit has any interest in solving this issue.
compare-full-2-lite.txt
diff of package list of functioning "full" Adafruit-Jessie-pi-c to "lite" Adafruit-Jessie-pi-c (with minimal X environment)
(23.53 KiB) Downloaded 5 times

ggalt
 
Posts: 16
Joined: Fri Dec 19, 2014 4:05 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by kck on Wed Mar 15, 2017 10:51 pm

I had actually been using a slightly different install for the tft because the Adafruit scripts had been broken a while back. I tracked down that source and found this comment in installation scripts for Kali:
The package “xserver-xorg-input-libinput” is very moody – meaning the last couple of updates break everything for no good reason. Lets hold version 0.19.0-1 for now:
apt-mark hold xserver-xorg-input-libinput


I think this was one of the packages you limited the changes to that was a suspect. To see the entire blog: https://whitedome.com.au/re4son/

kck
 
Posts: 22
Joined: Fri Dec 25, 2015 1:40 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by ggalt on Thu Mar 16, 2017 9:30 am

Yup, you've nailed it. You can see from the list of things that were updated that xserver-xorg-input-evdev1:2.9.2-1~bpo8+1 became xserver-xorg-input-libinput0.20.0-1 (which is post 19.0.1, obviously). Thanks for digging up the Kali Linux post! I may try to see if I can get a 19.0.1 version somewhere to see if that corrects things, or perhaps force Jessie to stay with input-evdev. I'll post results when I get a chance.

ggalt
 
Posts: 16
Joined: Fri Dec 19, 2014 4:05 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by kck on Fri Mar 17, 2017 2:22 pm

An interesting follow on to this. It turns out to be important to be able to run the latest Raspbian official release because it appears that the Adafruit releases do not support the Pi Zero W wlan. So one is left in the unfortunate position of either being able to use the pitft with the old release or a Pi0W with the new release but no pitft. Ugh. I'm not fluent enough to know how to find and install a back version of the suspect package. Trying to apt-get install the specific version doesn't work because the only version available in that release is the current one. I know that one can get the apt configuration to point a older releases of packages and specify them but I'm don't know how and given the time I had available I couldn't find that info on the web. If you figure out how to do that downgrade I'd be interested.

Meanwhile I do with the Adafruit guys would notice because this is now a real issue for products they are selling.

kck
 
Posts: 22
Joined: Fri Dec 25, 2015 1:40 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by ggalt on Fri Mar 17, 2017 3:44 pm

Yes, my hope is that Adafruit will update it's image soon. I have no clue if their support people are working on this issue. From my perspective, I prefer working off of the "lite" image and doing my own install of xserver, so I'll have to chart my own path -- probably rebuilding the problematic package from source :-(

ggalt
 
Posts: 16
Joined: Fri Dec 19, 2014 4:05 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by ggalt on Sat Mar 18, 2017 10:54 am

This is just to mark my progress up to this point. It's still not working :-(

I started with the "lite" version of Jessie from Adafruit (because I only want a limited X environment). I've installed a version of libinput 0.19.0-1 that I found from Ubuntu here: https://launchpad.net/ubuntu/+source/xserver-xorg-input-libinput/0.19.0-1/+build/9720389/+files/xserver-xorg-input-libinput_0.19.0-1_armhf.deb
using
Code: Select all | TOGGLE FULL SIZE
sudo dpkg -i ./xserver-xorg-input-libinput_0.19.0-1_armhf.deb

and
Code: Select all | TOGGLE FULL SIZE
sudo apt-get install -f

and finally
Code: Select all | TOGGLE FULL SIZE
apt-mark hold xserver-xorg-input-libinput

While all dependencies seem happy, I'm getting the following error on launching X:
Code: Select all | TOGGLE FULL SIZE
[   471.835] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[   471.910] (EE)
[   471.911] (EE) Backtrace:
[   471.911] (EE)
[   471.911] (EE) Illegal instruction at address 0xb2e54a7c
[   471.912] (EE)
Fatal server error:
[   471.912] (EE) Caught signal 4 (Illegal instruction). Server aborting
[   471.912] (EE)
[   471.913] (EE)


So something is clearly mismatched between libinput and the current X environment.

I **have not** yet tried to upgrade my installation, but I'll try that next -- hopefully not pulling in the wrong kernel.

ggalt
 
Posts: 16
Joined: Fri Dec 19, 2014 4:05 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by ggalt on Sat Mar 18, 2017 11:58 am

SWEET SUCCESS
At least for me . . .

Somewhere I remember seeing that xserver-xorg-input-libinput replaced xserver-xorg-input-synaptics and xserver-xorg-input-evdev (I wish I could remember where I saw it). I simply installed xserver-xorg-input-synaptics and xserver-xorg-input-evdev and removed my Ubuntu version of xserver-xorg-input-libinput. I now have a working cursor back!

I am holding my kernel and these two files with apt-mark hold, so hopefully I won't have to re-enter this particular hell again!

ggalt
 
Posts: 16
Joined: Fri Dec 19, 2014 4:05 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by adafruit2 on Sat Apr 15, 2017 8:35 pm

hiya just following up here that we are looking into this, and will go thru this thread. there's two issues with the pitft support right now - new pi zero / pi 2 and also this captouch thing :) please reply if you have any updates/suggestions :D

adafruit2
Site Admin
 
Posts: 15357
Joined: Fri Mar 11, 2005 7:36 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by hharms on Wed May 03, 2017 2:24 am

Has there been any progress with this? I have the same problem with cap touch screen cursor locked into the top left corner, movable by only a few pixels. Worked fine until reinstalled the OS about mid apil. I`ve been checking this post off and on since then to see i anything camfe of this issue.

I am truthfully too lazy to follow ggalt's solution.

hharms
 
Posts: 1
Joined: Sat Jan 28, 2017 3:38 am

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by bettinanuk on Wed Oct 18, 2017 1:58 pm

HI, I have the very same issue with the P3. After finally downgrading to the last available Jessie i got the #1983 display up and running by following all the instructions. Now my cursor is stuck. Please help!

bettinanuk
 
Posts: 6
Joined: Mon Oct 16, 2017 7:26 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by adafruit2 on Fri Nov 10, 2017 4:00 pm

ok so basically *everything* has changed with Stretch, so we redid the whole procedure to make it better/easier/faster! we've spend the last week working on it :)

if you can try it out it should solve all your issues (or, let us know if it doesnt work)
start with a fresh (or at least, apt-get upgrade'd) Stretch

run

# cd ~
# wget https://raw.githubusercontent.com/adafr ... helper2.sh
# chmod +x adafruit-pitft-helper2.sh
# sudo ./adafruit-pitft-helper2.sh

and answer the questions :)

adafruit2
Site Admin
 
Posts: 15357
Joined: Fri Mar 11, 2005 7:36 pm

Please be positive and constructive with your questions and comments.