New build black screen

I had to modify 99-calibration.conf and set option SwapAxes to 0 to get the pointer working in the right directions

Do document carefully. Cos it’s very easy to get a working rig and then simply forget all the details of how this was achieved. Sometime in the past my working touchscreen zynth just stopped working on an update and got gently place ( yeah right…) at the back of the projects to look at box.

It is always worth perceviering on this stuff cos it does work and you always learn something from the process.

I’ve stripped the device down so there is no screen protector on the screen and removed the case, and it is still demonstrating an inability to move the cursor from the top line. Pressing the down arrow on vnc moves it down one selected item but it then moves back up to the top element again. Pressing the mouse (vnc & screen ) still selects the top item. Use of the wheel on either mouse (vnc & screen) clears down the red selected item but does move the screen down so you can see admin, moving the touch screen (by a ballet of non intuitative left and right, up and down manipulations ) does make the cursor appear and it can be navigated to the admin item but pressing still selects the new engine ( the top item in the list) .

I have seen this behaviour before, but it cleared on an update. Ihave done several updates ( selecting update_zynthian.sh from /zynthian/zynthian-sys/scripts) but it does seem quite resolute.

Sorry for not producing a more positive answer…
I’m running testing.

a seperate observation firefox seems considerably more compliant than chromium. Chromium seems a bit flakey particluarly on anything that involves asgi type comms.

I also seem to get more consistant behaviour if I leave the zynth off for five or ten minutes between reboots

@le51 Are you able to post your 99-calibration.conf including the path, I’m keen to ensure I’m replicating exactly.

I had previous tried the SwapAxes and some other options, none of which worked, is the decompiled device tree file a new / modified file I need to install?

See my config below.

cat /etc/X11/xorg.conf.d/99-calibration.conf
Section “InputClass” # Created 2022-03-26 18:33:46.943034
Identifier “calibration”
MatchProduct “ADS7846 Touchscreen”
Option “TransformationMatrix” “1.154639 0.000000 -0.090550 0.000000 -1.114428 1.069403 0.000000 0.000000 1.000000”
Option “SwapAxes” “1”

@wyleu - completely agree re: documenting all steps. I’ve also seen some differences of behaviour after leaving Pi off for a while and wondered if this was temperature related.

Thanks all.

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

Yeah, I’m burning a fresh new stable image and will do the setup again.

maybe because it lets you the time to drink a beer. I will do the test too :wink:

I’ve moved audio problems here.

Tried it with another identical screen. Same effect.
The orientation of the touchscreen seems to be the component that doesn’t respond to configuration.

Is there a quick and dirty way (command line) of running the touchscreen config?

Lot’s of useful info in this post here

I’m currently going through different configs 1 by 1 and writing down results. The post includes the ‘quick and dirty’ using xinput set-prop.

We have discovered before that the location of the 99-calibration.conf file isn’t consistent ( for no apparent reason)

But it does not work. Whatever you pass to this driver it will always implement rotate=90. It seems to be hardcoded.

I have found the issue with Zynthian’s touchscreen calibration and testing a fix. This will mean you don’t need to faff around with axis swapping and manual configuration. You will just need to navigate to the admin/touchscreen calibrate menu, e.g. using VNC then calibrate. It is working very well with this screen (rotated through 90 degrees). I just need to check the other orientations.

Not managed to find a way to navigate to admin screen on two different screens using either touch, mouse or vnc…

Could you post your git hashes?

Thanks @riban

I tried the dtoverlay=tft35a:rotate=90 + calibration in UI and reboot, but it didn’t work for me. I tried again just now with same results.

Cheers.

@wyleu - regarding the quick and dirty, I will include this in my write up, for now, see the below.

via remote ssh run the following.

#export display to console.
export DISPLAY=:0.0

#list devices
xinput list
⎡ 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)]

#list properties for device
xinput list-props 6
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

#to set via command line
xinput set-prop 6 “<property”

I have a few ideas based on the output, I need to make a quick call and eat, will continue looking at this later, thanks again all.

Images linked here

Are with rotate=270 parameter, so it works at least for me

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.

1 Like

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…

2 Likes

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!