Volumio with 3.5" TFT Touch Screen (GPIO) RPi 3B+

I only have a small problem, every time after a reboot the alignment of the touch is incorrect, I first have to turn the touch plugin off and on and then it works fine again.

have already built in the touch screen reasonably, the finish has yet to be done.

If you have installed lightdm try to remove it (sudo apt-get purge --auto-remove lightdm). I think it is not needed and may interfere with the touch display plugin.

If you should have edited /etc/rc.local as proposed in the OP I think it needs to be removed as well, as it probably has the effect that two instances of the xserver and chromium are started (one by through rc.local and another when the touch display plugin starts).

ok i will try that tomorrow.
I also want to mention as soon as I enter 180 degrees in the touch plugin settings and in the 3.5 inch touchscreen file 270 degrees it works well every time, even after a reboot.

Hi,
What model of 3.5 tft works with this tutorial?
I am planning to buy one
Many thanks

Is my assumption correct that you normally don’t have the display rotated?

Could you please post the contents of 99-calibration.conf and 95-touch_display-plugin.conf when rotation is set to 0 deg.? 99-calibration.conf probably resides in /usr/share/X11/xorg.conf.d, 95-touch_display-plugin.conf you find in /etc/X11/xorg.conf.d.

I’ll will try that tomorrow too.

here the content.
and yes I have rotated the display, I can not install it otherwise.

99-calibration
Section “InputClass”
Identifier “calibration”
MatchProduct “ADS7846 Touchscreen”
Option “Calibration” “3936 227 268 3880”
Option “SwapAxes” “1”
Driver “evdev”
EndSection

95-touch_display-plugin

This file is managed by the Touch Display plugin: Do not alter!

It will be deleted when the Touch Display plugin gets uninstalled.

Section “InputClass”
Identifier “Touch rotation”
Option “TransformationMatrix” “-1 0 1 0 -1 1 0 0 1”
MatchIsTouchscreen “on”
MatchDevicePath “/dev/input/event*”
MatchDriver “libinput|evdev”
EndSection

If 99-calibration.conf should be located in /usr/share/X11/xorg.conf.d does it help to move it to /etc/X11/xorg.conf.d?

Your 99-calibration.conf contains settings that are proposed for a rotation of 90 deg. The “TransformationMatrix” setting in 95-touch_display-plugin.conf belongs to a rotation of 180 deg. set in the plugin’s UI. Do you use this together with dtoverlay=tft35a:rotate=270 in /boot/config.txt?

What is your desired orientation of the display?

by the way I have now turned the display 180 degrees.

yes i use 90 deg together with dtoverlay=tft35a:rotate=270 in /boot/config.txt

99-calibration.conf not located in /usr/share/X11/xorg.conf.d,see screenshot!
I’ll try that tonight, I’ll have to go out and do other things.

Where is 99-calibration.conf located?

99-calibration.conf is located at, /etc/X11/xorg.conf.d

Ok, good.

Looking forward to your findings.

sorry for the late response.

I tried to move or copy the 99-calibration.conf file to /usr/share/X11/xorg.conf.d but I get an error.
I use filezilla mac for that.
I also tried to change the file permissions, unfortunately without success.

copy

Opdracht: put “/Users/michelalofs/Downloads/99-calibration.conf” “99-calibration.conf”
Fout: /usr/share/X11/xorg.conf.d/99-calibration.conf: open for write: permission denied
Fout: Bestandsoverdracht mislukt
Status: Mappenlijst van “/usr/share/X11/xorg.conf.d” ophalen…
Status: Listing directory /usr/share/X11/xorg.conf.d
Status: Mappenlijst van “/usr/share/X11/xorg.conf.d” opmaken geslaagd
Status: Verbinding met server verbroken

move

Status: Hernoemen van ‘/etc/X11/xorg.conf.d/99-calibration.conf’ naar ‘/usr/share/X11/xorg.conf.d/99-calibration.conf’
Opsporen: CSftpChangeDirOpData::Send() in state 0
Opsporen: CControlSocket::ResetOperation(0)
Opsporen: CSftpChangeDirOpData::Reset(0) in state 0
Opsporen: CSftpRenameOpData::SubcommandResult(0) in state 1
Opsporen: CControlSocket::SendNextCommand()
Opsporen: CSftpRenameOpData::Send() in state 2
Opdracht: mv “99-calibration.conf” “/usr/share/X11/xorg.conf.d/99-calibration.conf”
Fout: mv /etc/X11/xorg.conf.d/99-calibration.conf /usr/share/X11/xorg.conf.d/99-calibration.conf: permission denied
Opsporen: CSftpRenameOpData::ParseResponse() in state 2
Opsporen: CControlSocket::ResetOperation(2)
Opsporen: CSftpRenameOpData::Reset(2) in state 2

Don’t move 99-calibration.conf for now. I just wanted to know where you have placed this file.

Please provide some more information on your display:
What is the brand and exact model name?
Is the default orientation of the display portrait (I guess so) or landscape?
If you don’t set any rotation neither to the display nor to the touchscreen does the touchscreen match the (visual) display orientation wise? If the touchscreen should not match the display’s orientation by what angle does it differ?

Regarding lightdm:
Did you already remove it? If not you could first try to disable a lightdm systemd service if present by executing sudo systemctl disable lightdm.service and then reboot Volumio.

the default orientation of the display portrait, I think!

I just removed lightdm and left the settings in volumio at 180 degrees and everything is exactly the same, then set to 270 degrees and then no response at all.

I’m going now set any rotation neither to the display nor to the touchscreen.

info touchscreen

volumio@volumio-touchscreen-usb:~$ cat /proc/bus/input/devices

I: Bus=0000 Vendor=0000 Product=0000 Version=0000

N: Name=“ADS7846 Touchscreen”

P: Phys=spi0.1/input0

S: Sysfs=/devices/platform/soc/fe204000.spi/spi_master/spi0/spi0.1/input/input0

U: Uniq=

H: Handlers=mouse0 event0

B: PROP=0

B: EV=b

B: KEY=400 0 0 0 0 0 0 0 0 0 0

B: ABS=1000003

volumio@volumio-touchscreen-usb:~$

I have now put 0 degrees in volumio and 0 degrees in the /boot/config.txt (screenshot) only now the touch does not match.
I think it is this touchscreen( http://www.lcdwiki.com/3.5inch_RPi_Display ) but I’m not sure, I got it from someone else and have no further information about the touch.

Is the GPIO connector of the display now on the bottom side of your case and does rotating the display by 90 degrees using dtoverlay=tft35a:rotate=90 get you to the desired landscape orientation or do you need to use dtoverlay=tft35a:rotate=270 as mentioned above?

Are you able to determine what the orientation of the (touchscreen) touch function is?

in the meantime I turned the screen over and now the conector is on the top, was a bit difficult to operate with such a small black piece on the right side.

I have now set the screen rotation to 0 degrees and dtoverlay = tft35a: rotate = 90 (Landscape)

and in the previous setup the connector was at the bottom and dtoverlay = tft35a: rotate = 270 and 180 degrees in volumio.

I really don’t know what the original orientation of the touchscreen is or how to find out.

Do you still have the issue you described earlier, i.e. do you still have to turn the touch plugin off and on to get the touchscreen matching the display?

I did a new installation and left lightdm installation and no problem anymore, even at the first start-up I no longer have to switch the plug-in off and on

I did the entire installation according to below tutorial.
And I don’t have edited /etc/rc.local