0

2.8" Capacitative PiTFT - X configuration ignored [SOLVED]
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

2.8" Capacitative PiTFT - X configuration ignored [SOLVED]

by cerebrate on Wed Feb 01, 2017 12:08 pm

I'm using the 2.8" capacitative PiTFT for the first time (as a control panel for my home automation server), and while getting most of its features (display, extra switches, etc.) haven't been any trouble to get to work, and while it receives touch events just fine (per evtest), I can't seem to get the touchscreen calibration recognized in X.

I have the following in /etc/X11/xorg.conf.d/99-calibration.conf, as sudo adafruit-pitft-touch-cal produced it:

Code: Select all | TOGGLE FULL SIZE
Section "InputClass"
    Identifier "captouch"
    MatchProduct "ft6x06_ts"
    Option "SwapAxes" "1"
    Option "InvertY" "0"
    Option "InvertX" "1"
    Option "Calibration" "0 320 0 240"
EndSection


...to match the 270 degree rotation I have the PiTFT configured for, but this configuration never appears to be picked up. When I use the touchscreen, the pointer appears confined to a very small area at the top left of the screen, and moves on touch-drag in the wrong directions (i.e., as if the screen were not rotated/these options not applied).

I suspect this may be because I've installed X myself on top of Jessie Lite to keep my server image small - is there a particular package I need to install to make this configuration work? Or, if not, does anyone have any other thoughts as to what my issue might be?

Thanks in advance,

Alistair
Last edited by cerebrate on Fri Feb 03, 2017 11:49 pm, edited 1 time in total.

cerebrate
 
Posts: 9
Joined: Wed Jan 18, 2017 3:54 pm

Re: 2.8" Capacitative PiTFT - X configuration ignored

by adafruit_support_mike on Thu Feb 02, 2017 4:09 am

Check to see if you have a file named /etc/X11/xorg.conf

That takes priority over the 99-calibration.conf file, so if it exists and contains the wrong setting, redoing the calibration file won't help.

adafruit_support_mike
 
Posts: 37362
Joined: Thu Feb 11, 2010 2:51 pm

Re: 2.8" Capacitative PiTFT - X configuration ignored

by cerebrate on Thu Feb 02, 2017 9:07 am

I checked - haven't got that file, alas, so it must be something else.

Thanks,

Alistair

cerebrate
 
Posts: 9
Joined: Wed Jan 18, 2017 3:54 pm

Re: 2.8" Capacitative PiTFT - X configuration ignored

by adafruit_support_mike on Fri Feb 03, 2017 2:35 am

I'm afraid I don't know where else to check. The X system is pretty involved.

adafruit_support_mike
 
Posts: 37362
Joined: Thu Feb 11, 2010 2:51 pm

Re: 2.8" Capacitative PiTFT - X configuration ignored

by cerebrate on Fri Feb 03, 2017 9:00 am

Ok, I found the problem...

For anyone else having this issue, the problem I was having is that X was using libinput, rather than evdev, to drive the touchscreen, and having your calibration handled requires evdev.

So if you don't see a 10-evdev.conf in /usr/share/X11/xorg.conf.d:

1. You need to apt-get install xsserver-xorg-input-evdev, and then;
2. If you do have a 40-libinput.conf in that same directory, you must remove it even if/once evdev is installed, since it will override the 10-evdev.conf otherwise.

Having done those two things, my touchscreen works properly and I hope yours will too.

Alistair

cerebrate
 
Posts: 9
Joined: Wed Jan 18, 2017 3:54 pm

Re: 2.8" Capacitative PiTFT - X configuration ignored [SOLVE

by adafruit_support_mike on Sat Feb 04, 2017 4:50 am

Good find.. I'm glad to hear you got it working, and thank you for posting the solution!

In fact, send a note containing a link to this thread to support@adafruit.com. That piece of detective work will be useful to us.

adafruit_support_mike
 
Posts: 37362
Joined: Thu Feb 11, 2010 2:51 pm

Re: 2.8" Capacitative PiTFT - X configuration ignored [SOLVE

by ryan2345 on Sat Mar 18, 2017 7:12 pm

I have the exact same issue (everything working fine including TSLIB ts_test and evtest, but X treats the touches as rotated and scaled down by a factor of about 20X so that the cursor is confined to the small area in the upper left corner of the screen).

I have a Pi 3. I installed Raspbian using the latest Jessie NOOBS just a few days ago (uname -a Linux rpts1 4.4.27-v7+ #2 SMP Wed Oct 26 19:09:12 UTC 2016 armv7l GNU/Linux). I did the 2.8" Capacitive "DIY Installer Script" on the "Easy Installer" page.

I have done various other installations and changes, too many to list.

When I try "sudo apt-get install xsserver-xorg-input-evdev" I get "E: Unable to locate package xsserver-xorg-input-evdev". I am not sure how to find that package. What am I doing wrong?

ryan2345
 
Posts: 2
Joined: Thu Mar 02, 2017 8:58 pm

Re: 2.8" Capacitative PiTFT - X configuration ignored [SOLVE

by ryan2345 on Sat Mar 18, 2017 9:51 pm

I have mine working now, not by installing that package, but by modifying /boot/config.txt. Here is what it used to have ("added by adafruit-pitft-helper"):
dtoverlay=pitft28c,rotate=90,speed=32000000,fps=20

And I replaced that line with these:
dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,fps=20
dtoverlay=pitft28-capacitive,touch-swapxy,touch-invx

Note the "pitft28c" to "pitft28-capacitive" change. The /boot/overlays/README has info about "pitft28-capacitive" not "pitftc".

ryan2345
 
Posts: 2
Joined: Thu Mar 02, 2017 8:58 pm

Re: 2.8" Capacitative PiTFT - X configuration ignored [SOLVE

by cerebrate on Sat Mar 18, 2017 9:54 pm

Oops. I made a typo in the package name. Try "xserver-xorg-input-evdev".

Alistair

cerebrate
 
Posts: 9
Joined: Wed Jan 18, 2017 3:54 pm

Please be positive and constructive with your questions and comments.