Touch screen offset with Octopi 0.15

Been over it for several days, still cant find a solution.
Running a Pi2 with a waveshare 5" touch screen. Octoprint with a 0.15 image. Screen is turned 90 degrees CCW via display_rotate=3 in /boot/config.txt (the issue is the same in standard orientation). Touchui loads up and "operable" - the pointer only reacts touch in a 20x30mm zone of the screen in the upper left corner (bottom left if in normal orientation) even though during calibration, entire screen works. Ran the xinput calibrator several times, and set the results in /usr/share/X11/xorg.conf.d/99-calibration.conf. Tried setting the coordinates transformation matrix with no discernible effect.
Tried a number of googled fixes, such as changing the input driver from libinput to evdev, disabling AIGLX, glx and all.
xorg log https://justpaste.it/67hwv

Additional info:
Have done it multiple times with v0.13 and v0.14 no issues, but with v0.15 the original process doesnt seem to work, and while the TouchUi author's recommended setup works, it results in the aforementioned issue. v0.15 seems to be working without installing the screen's driver, and attempts to install it always result in a mid process reboot.

Would very much appreciate any and all suggestions to get it working right.

Well...

...v0.15.0 of OctoPi uses Stretch now and as of this version of Raspian, the standard TFT calibration program seems to be broken. More chatter here.

Adafruit is often on top of changes like this but I haven't verified their instructions but it was updated 3/28/2018 so that's a good sign.

This repository may help both of us. I've got a 3.5" TFT and the calibration is all wrong. It looks great; it's just that trying to poke anywhere on the screen is off by orientation, for example.

Going to school on this repository, I note that there are two things here of use to me: LCD35-show and the related 99-calibration.conf-35

99-calibration.conf-35:

Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "ADS7846 Touchscreen"
        Option  "Calibration"   "3936 227 268 3880"
        Option  "SwapAxes"      "1"
EndSection

So in theory, if I were to manually copy/overcopy this to my /etc/X11/xorg.conf.d subdirectory as 99-calibration.conf and reboot, this would be the TFT calibration used for the Desktop side of things.

But the other script seems to do other things. Oh... and you don't want to run this script since it will just overcopy your existing /boot/config.txt which is a bad practice. But you can go to school on this script and see what it's trying to do otherwise. This guy writes up a great description of his take on this. It's wordy but I'd agree with his sentiment.

Can't guaranty that it'll work for 5" screen, but, in previous attempts, the

Worked pretty well for me in Octopi 15. Although, I admit that I didn't try it on portrait, only landscape

Unfortunately running the LCD5-show script reboots the pi. The 99-calibration.conf seems to be set correctly. Will give adafruit guide a shot.

The script is intended to make the necessary changes to allow a 3.5" LCD to work. Review the contents of the script itself if you're interested in the changes it would/did make. The reboot is (would have been) necessary to make those changes felt.

Sorry should have clarified better - it reboots either right after the script launch, or in the middle. Some of the changes it should do, dont get done.

Hence my advice from earlier...

It might be better to review the script's intent and consider running it line by line yourself.

Allright, doing it all manually and selectively seems to have been the trick to get it work.

1 Like

Ok, so ive managed to get it work, and apparently the fix was obnoxiously simple. All was needed is to reorder the numbers from calibration in 99-calibration.conf But now there is a new issue (not a big one but annoying) the screen doesnt go into sleep mode.

1 Like

Please share the 99-calibration.conf file contents so that others might gain from the knowledge learned. Thanks.

The xinput calibration will provide you with this set of numbers (yours may vary a bit)
Option "Calibration" "3967 217 174 3998"
If you intend to use the screen turned 90 degrees counter clockwise, you will need to reorder the calibration results to this "217 3967 3998 174". You may or may not need to invert the axises as well, ie add Option "InvertY" "true" and Option "InvertX" "true" to 99-calibration.conf.

Now just need to figure out how to get the screen go into standby when un used.