The audio mixer responds very well to mouse control…
Indeed it works on touchscreen if you can get your head round the xy reverse…
IT does at least prove the screens.
The audio mixer responds very well to mouse control…
Indeed it works on touchscreen if you can get your head round the xy reverse…
IT does at least prove the screens.
With rotate=270
With rotate=90
dmesg
...
[ 3.176158] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[ 3.179282] fb_ili9486: module is from the staging directory, the quality is unknown, you have been warned.
[ 3.179649] fb_ili9486 spi0.0: fbtft_property_value: regwidth = 16
[ 3.179659] fb_ili9486 spi0.0: fbtft_property_value: buswidth = 8
[ 3.179671] fb_ili9486 spi0.0: fbtft_property_value: debug = 0
[ 3.179679] fb_ili9486 spi0.0: fbtft_property_value: rotate = 90
[ 3.179689] fb_ili9486 spi0.0: fbtft_property_value: fps = 30
[ 3.179698] fb_ili9486 spi0.0: fbtft_property_value: txbuflen = 32768
I have raised a ticket: Touchscreen calibration does not support rotated displays · Issue #635 · zynthian/zynthian-issue-tracking · GitHub and have a fix that I will submit as a PR later but first… diner.
is food all you lot ever think about? says a wyleu containing a nice ham, cauliflower cheese and mashed potatoes topped off with a couple of glasses of white wine…
Good news! I have a fully working screen config, input works as expected and XY alignment is correct, to replicate see below.
Webconf settings:
Create clean /etc/X11/xorg.conf.d/99-calibration.conf
apt-get install xinput-calibrator
export DISPLAY=:0.0
xinput_calibrator
#This will open a calibration tool on the screen, calibrate as per instructions on screen and then copy the output written to the terminal to your /etc/X11/xorg.conf.d/99-calibration.conf
Add the TransformationMatrix which was not output from the xinput_calibration tool, the complete file is as follows.
Section “InputClass”
Identifier “calibration”
MatchProduct “ADS7846 Touchscreen”
Option “MinX” “61530”
Option “MaxX” “2367”
Option “MinY” “61900”
Option “MaxY” “3328”
Option “SwapXY” “0” # unless it was already set to 1
Option “InvertX” “0” # unless it was already set
Option “InvertY” “0” # unless it was already set
Option “TransformationMatrix” “0 1 0 -1 0 1 0 0 1”
EndSection
Save the file and reboot.
I will follow shortly with the logic and approach.
Thanks everyone for your support!
Additional info.
Use of xinput really helped gain confidence in understanding what configurations were actually supported.
Commands:
xinput list (this reported devices and id’s)
⎡ Virtual core pointer | id=2 | [master pointer (3)] |
---|---|---|
⎜ ↳ Virtual core XTEST pointer | id=4 | [slave pointer (2)] |
⎜ ↳ ADS7846 Touchscreen | id=6 | [slave pointer (2)] |
⎜ ↳ Logitech K400 Plus | id=7 | [slave pointer (2)] |
⎣ Virtual core keyboard | id=3 | [master keyboard (2)] |
↳ Virtual core XTEST keyboard | id=5 | [slave keyboard (3)] |
↳ Logitech K400 Plus | id=8 | [slave keyboard (3)] |
xinput list-props 6 (list available properties for device and library e.g. libinput)
Device ‘ADS7846 Touchscreen’:
Device Enabled (113): 1
Coordinate Transformation Matrix (114): -1.131313, 0.000000, 1.055051, 0.000000, 1.108911, -0.061386, 0.000000, 0.000000, 1.000000
libinput Calibration Matrix (245): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Calibration Matrix Default (246): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Send Events Modes Available (247): 1, 0
libinput Send Events Mode Enabled (248): 0, 0
libinput Send Events Mode Enabled Default (249): 0, 0
Device Node (250): “/dev/input/event4”
Device Product ID (251): 0, 0
Send config directly in real time without need to reboot.
xinput set-prop 6 “libinput Calibration Matrix” 0 1 0 -1 0 1 0 0 1
NOTE: Although the test used ‘Calibration Matrix’ I converted this to TransformationMatrix in the config as I believe this is more commonly used and it worked.
In addition to all the fantastic support on this forum, this thread here also helped a lot.
Thanks again all!
And a quick vid.
We use Transformation Matrix in Zynthian. Your configuration may have offsets or scaling errors on other devices but is a good starting point. I have the touchscreen calibration working on my test Zynthian but still have to fine tune to avoid some small offsets. I am traveling for the next few days so it may not materialise for a few days but when it does I hope to apply a hot-fix for stable as this is a significant issue.
Thanks @riban.
I can confirm trying the Zynthian admin calibration after creating a working config did indeed revert the configuration to a broken one.
Cheers.
Yes it will - it is broken. My bad! I was trying to get the fix finished at the weekend but it involves multiple dimension arrays, scaling, offset, negation, etc. This bear’s brain hurts. I could have published something that mostly worked but world have to revisit so figured it could wait. It doesn’t impact many users and those it does are building bespoke systems so (should) expect challenges.
Finally I’ve got it fully working on a brand new burned SDcard with latest Zynthian stable.
overlay parameter (through webconf):
dtoverlay=tft35a:rotate=270,swapxy=1
Nothing special in /usr/share/X11/org.conf.d:
root@zynthian:~# ls /usr/share/X11/xorg.conf.d/
10-quirks.conf 70-wacom.conf
While in /etc/X11 :
root@zynthian:~# ls /etc/X11/xorg.conf.d/
40-libinput.conf 99-calibration.conf 99-fbdev.conf
with 40-libinput.conf:
root@zynthian:~# cat /etc/X11/xorg.conf.d/40-libinput.conf
# Match on all types of devices but tablet devices and joysticks
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
# Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"
Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput tablet catchall"
MatchIsTablet "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
and 99-calibration.conf:
root@zynthian:~# cat /etc/X11/xorg.conf.d/99-calibration.conf
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "MinX" "21879"
Option "MaxX" "22152"
Option "MinY" "49783"
Option "MaxY" "48827"
Option "SwapAxes" "1"
Option "InvertX" "1"
Option "InvertY" "1"
EndSection
Where do the Options MinX, MaxX, MinY, MaxY values in 99-calibration.conf come from: by running an
DISPLAY=:0 xinput_calibrator
command.
Great stuff @le51.
Not sure if you saw my post in this thread from yesterday, I have also managed to get a fully repeatable process to get these screens working correctly. The soundcard issues I raised in another post are also now sort of fixed.
As promised, I will be creating an end to end document with a repeatable process to build Zynthian on a RP4, however I’ll probably not post the doc for review until the weekend as I intend to put some of focus on making sounds.
Thanks again for your help!
Hi all,
As promised, please see reference notes of the installation here.
All feedback welcome, also happy to post this in a new thread.
Once again, thank you all for your support.
Cheers!
Hi @Buddhafiner , this is reaaly good.
It’s as good as some exclusive sound (do you know what I mean )
The touchscreen driver is ADS7846, while for display itself it is the ili9486 (see “dmesg”) wich is loaded at boot time by the “tft35a” overlay
And … what about a Github pull request with wich will add a new entry in the Zynthian configuration list options for these kind of display ?
Thanks for the quick feedback. I’ve updated the README.md
I’m hoping to be minimal on the PC over the next couple of days, but will look at getting that pull request submitted next week.
Cheers!
Actually probably best I tick off the pull request sooner, I’ll start on this and will post update.
Ta.
OK, I’ve forked zynthian-sys and created a folder ( Ili9486 3.5 (v1))with the overlay and config.
On attempting local testing, I’ve created a folder as advised on the Zynthian Wiki page in /zynthian/zynthian-sys/custom/display with the config and overlay however I am not seeing my display/folder name in the dropdown.
Also, the instructions advise to name the folder the same as what the display is named in the webconf, however my display in webconfig is configured under the name ‘Custom Display’.
As always, sorry if I’m missing the obvious.
Thanks.
Excellent.
You have to write a new entry in that file :
Great, thanks, I’m out now for this evening but will take a look ASAP.
Cheers!
Hi,
Pull requests below. I’m not a developer, so hope all is in order, happy to correct as needed.
See output of test from my local instance, I can confirm after reboot LCD calibration was working fine.