Could this be the end of all touch screen calibration issues?

Well in fact, none, as the script doesn’t overwrite the existing configuration. But as I had some bad surprise in the past with some kind of “miraculous script or recipe”, I do not believe in miracle anymore :laughing:

Fun fact, after install from fresh image, there is no 99-calibration.conf file which could be overwritten :wink:

1 Like

Sure… You do well…

Ok lets see. . .

Step Action Result
1. SSH into zynthian (root/raspberry) Ok
2. > cd /etc/X11/xorg.conf.d Ok, files in there … 99-calibration.conf, 99-fbdev.conf
3. > cp 99-calibration.conf 99-calibration.conf.backup backup your current config
4. > apt-get install xserver-xorg-input-evdev This package provides the driver for input devices using evdev, the Linux kernel’s event delivery mechanism. This driver allows for multiple keyboards and mice to be treated as separate input devices.—I appear to already have this
5. > apt-get install -y xinput-calibrator A generic touchscreen calibration program for X.Org —I’ve already got it but I’ve played around a bit
6. > apt-get install -y bc GNU bc arbitrary precision calculator language, and I’ve got that :smiley:
7. 3. copy and paste bash script from link above, create this as “calib” script (using vi [grrrr]… nano is a much easier windows like tool for people who have issues with vi . . . :-). Type nano calib, cut and paste the code into it. Cntrl O to write it Cntrl X to exit …)add this as first line on script:
8. add export DISPLAY=:0.0 to script first line Easy withing nano . . . :slight_smile:
9. chmod 755 calib make it executable; I agree with @Baggypants
10. > ./calib 6. calibration will popup on screen, follow instructions and Play tap the dot :smiley:
11. nano 99-calibration.conf 7. calibration script will end up with output which should go into /etc/X11/xorg.conf.d/99-calibration.conf [BEWARE! script recommends different file names, IDK if will work then] i already had details for this in the file so I overwrote them

Directly after calibration all seems good !!!

echo setting up the touchscreen
export DISPLAY=:0.0
xinput set-prop ‘ADS7846 Touchscreen’ ‘Coordinate Transformation Matrix’ 1.06666775175377203405 0 -.04500398769511222513 0 -1.09588468420260530760 1.05137037842176552231 0 0 1

So I reboot …

Sadly E & W are still reversed . . .but I will retry with a clean build as this is a fairly corrupted zynthian-touch.local . . . .

same with calling the file 98-calibration.conf . . . sadly … :frowning:

My script fixes it but presumably renders up the not quite accurate scaling factors. . .
So I’ve copied these values into my touch script and they do renerder up a pretty accurate step sequence grid … :smiley: So from my perspective, it generates a decent matrix but I haven’t found where this should be applied.

Almost right :smiley:

So in my case it sets the mechanism u correctly but it’s getting it’s start up settings from somewhere else. . .

I will try with a clean image, as this is a zynthian-touch.local that has had a certain amount of ‘persuasion’ …

Blockquote

2 Likes

Wow, guide check nicely done. Configuration survive reboots on my box. Haven’t investigating further, but it seems there are at least two ways for x server input, libinput and evdev and those works on different values, properties and config files. Could it happen that during tinkering with it you have switched to evdev? Seems that image I have used (downloaded yesterday from nightlies) using libinput. Also those MinX, MaxY, SwapXY options are aplied with Transform matrix. My understanding is, with proper Transformation matrix these should be removed. Please post follow up after fresh image. Thanks.

I’ll write another clean image. Something is just not right here . . .

GOT IT !!!

The file the results need to be copied into is . . .

/usr/share/X11/xorg.conf.d/98-screen-calibration.conf

image

I’m using.

Which is default except for a rotate=270

I’ll delete a lot of the previous entries as being fairly irrelevant. Thanks so much for the help @sailort :smiley: Apologies if these deletions make you look as thou’ you are talking to yourself !!!

3 Likes

How did you figured out that location?

Too late! From the point of view of the thread it’s a little bit clearer as to what we were trying to achieve, which was proving your fix !! :smiley:

It’s one of the locations listed in the output from the script !!!

Yes, it is, but here it works in /etc/X11/xorg.conf.d/99-calibration.conf. That’s odd.

Yes peculiar, you’d have thought all zynths were created equal . . .

GUIDE UPDATE:

  1. place script output to

/etc/X11/xorg.conf.d/98-screen-calibration.conf

1 Like

Wonderful guys!! Really brave!!

We have this issue opened:

and it would be nice to close it.

Some volunteer to integrate this procedure in the UI’s admin menu? :wink:

Thanks!

1 Like

I will when I get a little time. Work has me in a bit of a death grip at the moment.

I have a strange feeling that I will not avoid :face_with_monocle: this time.

Makes note . . . .
opens wicker basket,
pulls out raven,
puts hood over it’s head marked https…,
attaches note to birds leg, badly …
it falls of…
reaches back into basket and takes out staple gun . . .
staples note to ravens leg a lets it flap off asymmetrical down the corridor. . .

1 Like

Have you read Iain Banks??? :rofl:

Do you wanna buy a wasp . … . ?

I’ll have to make it first . . .

A bit too much literary for a non English native speaker but maybe I catch the idea…

My point is not to put any pressure :slight_smile:
It is rather that seeing my name next to the “enhancement issue” and @wyleu raising his hand to fix it, I’m most likely to have to provide a sound sample soon or later :grin:

1 Like

I followed the ./calib procedure, created the
98-screen-calibration.conf as directed (tried both directories that where mentioned) but changes where not permanent. Anyone else observed this?
What worked for me was to replace the numbers after CoordinateTransformationMatrix in /zynthian/config/zynthian_custom_config.sh by the numbers generated from the calib script.

Edit: what I wrote still holds for latest zynthian image (https://os.zynthian.org/2020-05-25-zynthianos-buster-lite-1.0.0.zip). I have official Kit V2 and in webconf there is Piscreen 3.5 (V2) selected.

2nd edit: the file /zynthian/config/zynthian_custom_config.sh survives reboot, but when I do a software update, then it’s reset / overwritten to default values and calibration is lost again.