3,5 TFT TouchUI issues when roated 270 and 0 degrees

Hello,

I use OctoPrint 1.4.0 on a Raspberry 3B+ (OctoPi 0.17.0) with a 3,5" GPIO connected touchscreen (320x480, XPT2046, ILI9486) and the latest TouchUI-autostart script.

The problem is that I have to rotate the screen to 270 degrees and if I do that I have two offset TouchUI logos when TouchUI is starting and also duplicated menu bars (on the top and on the bottom of TouchUI). If I scroll on the screen I will also get duplicated elements all over the screen, so that I am not able to use TouchUI.
If I rotate 90 or 180 degrees I don't have these two TouchUI logos at startup process and no duplicated menu bars or other elements, so in this case I can use TouchUI without any problems.
I only have these problems when rotating the LCD to 270 or 0 degrees.

As drivers I tested the following ones, all with the same problems:



Does anyone know about this issue and perhaps how to fix it?

Thank you very much and kind regards,
Bobo.

Why don't you share the contents of your /boot/config.txt file?

Sorry, no problem, here is the content of my /boot/config.txt after the installation of the elecrow driver.
The commented lines before were the entries of the goodtft and the waveshare driver which cause the same problem if the screen is rotated 270 or 0 degrees.

dtparam=i2c_arm=on
dtparam=spi=on
dtparam=audio=on
enable_uart=1

hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 480 320 60 6 0 0 0
hdmi_drive=2

#dtoverlay=tft35a:rotate=270
#dtoverlay=waveshare35b:rotate=270
# --- added by elecrow-pitft-setup Fr 31. Jul 23:24:02 CEST 2020 ---
dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
dtoverlay=elecrow35a,rotate=270,speed=22000000,fps=60
# --- end elecrow-pitft-setup Fr 31. Jul 23:24:02 CEST 2020 ---

You have two active dtoverlay's. Which one is the real McCoy, so to speak?

Interesting and possibly pertinent discussion with Lady Ada

These two "dtoverlay" entries were made automatically by the elecrow driver installation.
Now I commented out the first one because the second dtoverlay statement contains the driver name.

From the discussion provided by your link I also added the same speed and fps settings but I have the same problems with TouchUI autostart via chromium. If I rotate 90 or 180 degrees then everything is working ok, if I rotate 270 or 0 degrees I have duplicated elements/menus on the screen...

So this one is the only dtoverlay statement in the /boot/config.txt now:

dtoverlay=elecrow35a,rotate=270,speed=64000000,fps=30

Basically, there are two complete systems. There's the console-based system at this level with the config.txt and then there is the completely-separate configuration for the X11 windows system as seen in the Desktop.

If your TouchUI instructions had you install the GUI-based windowing system then it's possible that there is some redundancy perhaps in all these drivers. The conversation that I had with Lady Ada on that issue highlight this fact. I guess we would need to know if you also installed the Desktop as part of your TouchUI setup.

I installed lightdm on the octopi system before installing "TouchUI autostart" because with the working drivers I used for this tft there is only the "xinput_calibrator" calibration tool available which only works if a X11 system is installed.
I didn't use the option to boot on the X11 window system I only booted to the console.

What I also noticed is that at booting to the console - if I rotate the tft by 270 or 0 degrees - the cursor is blinking on the top left of the tft and at login status I have a "octopi login:" line at the bottom without a blinking cursor and one on the top with a blinking cursor.
If I rotate the screen by 90 or 180 degrees then the cursor stays on the bottom line and I don't have a duplicated login line.

I installed TouchUI-autostart with the install script from the helpers directory but I think then it will be using the X11 window system if it is installed/available?