3.5 inch GPIO display - Black Screen

Hello everybody!

I’ve installed Volumio in my Raspberry Pi 2 Model B with a non-branded 3.5 inch GPIO display (XPT2046) . After first boot, initial config and Touch Display installed and enabled, I’ve followed the steps here and alternatively here. In that process apparently there’s no errors but when I reboot and Volumio starts the display keeps in black (white initially and black when it starts).

The Volumio web shows this errors:

  • Error connecting to the Xserver
  • Error modifying /etc/X11/xorg.conf.d/95-touch_display-plugin.conf: Error: Command failed: /bin/echo volumio | /usr/bin/sudo -S /bin/sed -i -e ‘/Option “TransformationMatrix”/d’ /etc/X11/xorg.conf.d/95-touch_display-plugin.conf [sudo] password for volumio: /bin/sed: can’t read /etc/X11/xorg.conf.d/95-touch_display-plugin.conf: No such file or directory

I’ve tried the same process with various Volumio versions (latest, lower than 1.55,…) and the same weird final. In some of the attempts, I connect the RPI to an external monitor via HDMI and I can see the Volumio interface (even with the tactile feedback when I touch the GPIO screen).

The screen works perfectly with other OS (Raspbian) but I can’t get it to work with Volumio.

What am I missing?

Thanks in advance.

maybe you can take a look at the link below there is pretty much everything about a 3.5 inch touchscreen and volumio.

or watch the tutorial, and to my knowledge you can skip (sudo apt install lightdm) as a penultimate line.

did you try the touch display plugin?

If you followed the instructions you have linked to, you probably have installed lightdm which is not only unneeded but probably the cause of the error messages you described.

I suggest to start from scratch with a fresh Volumio install. Then try the following steps:

  1. Install the Touch Display plugin.

  2. Connect to Volumio via SSH.

  3. Download the display specific overlay:

wget https://github.com/goodtft/LCD-show/raw/master/usr/tft35a-overlay.dtb

Be aware that I can only guess what overlay could be needed as long as I don’t have more information on your display. :wink:

  1. Copy the overlay to “/boot/overlays/tft35a.dtbo”:

sudo cp tft35a.dtb /boot/overlays/tft35a.dtbo

  1. Open “boot/userconfig.txt”:

nano /boot/userconfig.txt

  1. Add the following lines:
dtparam=spi=on
dtoverlay=tft35a

It could be necessary to add a rotation value to the overlay later on.

  1. Save “/boot/userconfig.txt” by typing Ctrl+x then y and Enter.

  2. Download “99-calibration.conf-35-0” as it might be necessary to calibrate the screen:

wget https://raw.githubusercontent.com/goodtft/LCD-show/master/usr/99-calibration.conf-35-0

Again the data in these kind of files depends on the particular screen and without having more details of your display the values might fit your screen… or not :wink:

  1. Copy “99-calibration.conf-35-0” to “/etc/X11/xorg.conf.d/99-calibration.conf”:

sudo cp 99-calibration.conf-35-0 /etc/X11/xorg.conf.d/99-calibration.conf

  1. Reboot.

  2. If the display should not have the orientation you are looking for, add a rotation parameter to the overlay in “/boot/userconfig.txt” so it looks something like this:

dtoverlay=tft35a:rotate=90

This would rotate the display (not touch) by 90 degrees clockwise.

  1. Reboot once again.

  2. If the display rotation appears to be correct now, check if the touch function is already properly aligned to the display. If this should not the be case try to find out by what amount touch has to be rotated. Then head over to the Touch Display’s configuration page and set this value in the rotation setting.

  3. Reboot and check if touch is properly aligned to the display now. It is possible that setting the rotation in the prior step does not suffice. This would be the case if the touch axes are inverted or swapped which is not uncommon on these kind of screens… Then you would have to find out how the axes inverted or swapped. Report back with your findings so we could try to find the right values to correct that.

After a lot of testing I finally managed to get it to work. Apparently the solution was to uninstall and reinstall the Touch Display plugin at the end of the whole process.

However, it seems that the RPi 2+ isn’t powerful enough to handle Volumio smoothly so it’s not very operational…

Thank you very much for the answers.