LCD 3.5 XPT2046 Touch screen does not work on Raspberry Pi 3 Model B+

Could you make it work ? Or is this still unsolved ?

I got myself a cheap 3.5" LCD display which looks exactly like this: http://www.lcdwiki.com/File:MPI3501-001.jpg

There are some similar looking products like those from waveshare: https://www.waveshare.com/product/modules/oleds-lcds/raspberry-pi-lcd/3.5inch-rpi-lcd-a.htm

Both provide some information how to set it up.

If you try to install the driver instead of using their ubuntu mate image with pre-installed driver, it may be somewhat tricky. I managed to bring it to live with an ubuntu-mate-18.04.2-beta1-desktop-armhf+raspi-ext4 image (32bit version, since 64bit is experimental).

I used: git clone https://github.com/waveshare/LCD-show.git

Since executing ./LCD35-show failed, i went through all single commands inside this file. There were a bunch of problems. I had to do things like:

  • Correct paths if necessary (absolute paths are used, if user is not "/home/pi" you have to modify):

    LCD-show -> rpi-fbcp -> build -> CMakeCache.txt
    LCD-show -> rpi-fbcp -> build -> Makefile

  • install g++ (was not installed)
  • install libraspberrypi-dev (otherwise bcm_host.h may be missed)
  • boot-image is now mounted in /boot/firmware/ instead of /boot/

    sudo cp ./waveshare35a-overlay.dtb /boot/firmware/overlays/waveshare35a.dtbo (instead of /boot/overlays)
    sudo cp ./waveshare35a-overlay.dtb /boot/firmware/overlays/

  • bootloader wasnt able to load kernel (i guess) if config-35c.txt is used as is. I deleted all comments in both files (original "config.txt" in boot partition and the provided one "config-35c.txt") and merged it manually.
  • to see ubuntu mate desktop on display, change Option "fbdev" "/dev/fb0" to Option "fbdev" "/dev/fb1" in "/usr/share/X11/xorg.conf.d/99-fbturbo.conf"

Better save your current raspberry image before trying this. LCD-show overrides some of your local files without backup, warning or anything.

Not sure if i did everything right, or every step is really necessary, but finally it worked.