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

I used the instructions in MomFab1’s script to install the screen and the screen stayed black. However, I made one change:
I edited /usr/share/X11/xorg.conf.d/99-fbturbo.conf to change fb0 to fb1
Not sure if this is required. Anyway, leaving the Pi on for about 10 minutes and the screene eventually changes from black and starts displaying.

1 Like

I have this problem as well. The best I have managed to get is correct two diagonal corners, while the other two are reversed.

1 Like

I Have written the edited version of this tutorial. Here is the link

1 Like

Nice work mate will try your revision and will see if it does the work, anyways thanks.

Edit: Done working with related to this project and it was working. Thanks

1 Like

thanks, it works perfectly :ok_hand:

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

1 Like

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

1 Like

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?

1 Like

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:~$