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.

1 Like

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:

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:


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.

Tried it several times but still without any luck.
It’s so frustrating…

Anyone willing to share a working image file?

Some more information could be helpful :wink:

For a start:

What’s your Volumio version?

What’s the brand and exact model name of your display?

You’re right about that.

Latest version of Volumio installed on a RasPi 3b and the xpt2046 3,5 touchscreen.

Managed to get it to work on a “normal” pi image so screen is ok.

Using the Volumio image starts with a white screen and ends with a black and nothing showing on the screen.

Got an error about not being able to connect to the xserver.

Latest version means 3.179?

What’s the brand and model name of the screen?

Please post the results of

ls -al /usr/share/X11/xorg.conf.d


cat /var/log/Xorg.0.log

Starting all over again with the steps mentioned in the april '21 post based on Volumio-3.179 image.

Step 4 brings error: cp: cannot stat ‘tft35a.dtb’: No such file or directory
changed it to sudo cp tft35a-overlay.dtb /boot/overlays/tft35a.dtbo and looked OK now.

Uptill step 10 no problems so far.
Touch Display disabled.

After reboot screen starts white, turns to black and that’s it.

ls -al /usr/share/X11/xorg.conf.d
total 13
drwxr-xr-x 2 root root 1024 Jan 12 19:16 .
drwxr-xr-x 1 root root 1024 Jan 12 19:16 …
-rw-r–r-- 1 root root 92 Feb 7 2019 10-amdgpu.conf
-rw-r–r-- 1 root root 1350 Apr 19 2021 10-quirks.conf
-rw-r–r-- 1 root root 92 Apr 6 2019 10-radeon.conf
-rw-r–r-- 1 root root 1429 Mar 31 2019 40-libinput.conf
-rw-r–r-- 1 root root 2747 Jun 26 2017 70-wacom.conf

My post from april '21 was for Volumio 2.

For Volumio 3 you additionally need to download a file named “99-fbturbo.conf”:

sudo wget https://raw.githubusercontent.com/goodtft/LCD-show/master/usr/99-fbturbo.conf -P /usr/share/X11/xorg.conf.d

Then open “/usr/share/X11/xorg.conf.d/99-fbturbo.conf” with

sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf

and change

Driver "fbturbo"


Driver "fbdev"

Save the file hitting Ctrl-x, y and Enter.

Disable and re-enable the Touch Display plugin. Maybe reboot Volumio.

OMG :blush: it’s working!!!

Screen is upside down :upside_down_face:
what value should I use? dtoverlay=tft35a:rotate=??


Probably “180”:


Trial and error… :wink: dtoverlay=tft35a:rotate=270
Looks like touchscreen calibration isn’t wright, how to fix it so it works in landscape mode?

So the display’s orientattion is correct now, but touch is not aligned to the display? Or do touch events happen where you didn’t touch the screen?

For easier checking you could enable the mouse pointer to be shown on the config page of the Touch Display plugin.

moving left pointer goes up
moving right pointer goes down
moving up pointer goes right
moving down pointer goes left

Is this configured in /etc/X11/xorg.conf.d/99-calibration.conf?

Axes seem to be swapped. Let’s try the following (first):

Create a file “/etc/X11/xorg.conf.d/99-swapxy.conf” with

sudo nano /etc/X11/xorg.conf.d/99-swapxy.conf

and fill it with

Section "InputClass"
        Identifier "SwapXY"
        Option "TransformationMatrix" "0 1 0 1 0 0 0 0 1"
        MatchIsTouchscreen "on"

Save the file and restart the plugin or maybe reboot Volumio.

Nearly there, left en right are OK, up and down mixed up

Swapping axes can be done in “/etc/X11/xorg.conf.d/99-calibration.conf” if evdev is installed. From what I have seen from your Xorg.0.log this is currently not the case. If my first suggestion shouldn’t work this would be the next option.