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

Hi all
I'm running Ubuntu Mate 18.04.2 on Raspberry Pi 3 Model B+ and it works like a charm. I'm trying to get the drivers to work for my 3.5 LCD screen and there are no procedures.
The screen works on the current version of Raspbian but I prefer Ubuntu Mate it's amazing. Has anyone managed to get this screen type working and if so what were the steps please?

There is a procedure for Ubuntu mate 16.04.2 but it doesn't support the new hardware for the Raspberry Pi 3 Model B+ so no luck there.

The Touch screen is 3.5 inch RPi Display 480x320 Pixel XPT2046 Touch controller

2 Likes

What do you have to do to get this screen working with Raspbian?

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.

Thank you for your info, i was able to install my LCD.
Later i realised that fbcp was a program that duplicate the screen on the hdmi to the lcd.
So i download the git https://github.com/tasanakorn/rpi-fbcp (couldn't install the fbcp included in the waveshare git), i install it and then in ubuntu mate i add a program to the startup which launch "/usr/local/bin/fbcp &". Now i can see the desktop through the hdmi and the lcd at the same time. In /boot/config.txt i can configure the resolution in the line hdmi_cvt. i'm using 1024x768, and i can see that resolution on the lcd. If i start the pi with no hdmi connection i see the desktop also on the lcd.
The lcd screen is a bit slow, but it is usable.

Sorry for my english.

Hi, i am having the same issue with a LCD 5' touch screen.

I follow this steps: https://www.elecrow.com/wiki/index.php?title=HDMI_Interface_5_Inch_800x480_TFT_Display

What drivers did you use or what did you do?

Thanks in advance

1 Like

This sounds great and I might try it myself but I'd be curious to know more about why each step is necessary and what it does.

Thanks very much.