How to Set Up and Use the 3.5 Inch LCD Display on Raspberry Pi 3B+This guide will walk you through the steps to set up and use the 3.5 inch LCD display on a Raspberry Pi 3B+ using the LCD-show repository. Prerequisites- A Raspberry Pi 3B+- A 3.5 inch LCD display designed for the Raspberry Pi - MicroSD card with Raspberry Pi OS installed- Internet connectionSteps1. Prepare Your Raspberry Pi1. Insert the MicroSD card into your Raspberry Pi 3B+.2. Connect the 3.5 inch LCD display to the GPIO pins on the Raspberry Pi.3. Power on your Raspberry Pi and ensure it is connected to the internet.2. Download the LCD-show RepositoryClone the LCD-show repository from GitHub:git clone https://github.com/goodtft/LCD-show.git3. Change to the LCD-show DirectoryNavigate to the LCD-show directory:cd LCD-show/4. Install the LCD DriverRun the script corresponding to your LCD model. For the 3.5 inch LCD, use:sudo ./LCD35-show5. Create a Kill-fbcp ServiceTo ensure fbcp does not interfere with lightdm, create a service to kill fbcp after lightdm starts:1. Create the service file:sudo nano /etc/systemd/system/kill-fbcp.service2. Add the following content:[Unit]Description=Kill fbcp after lightdm startsAfter=lightdm.service[Service]ExecStart=/usr/bin/pkill -f fbcp[Install]WantedBy=multi-user.target3. Save and close the file, then enable and start the service:sudo systemctl daemon-reloadsudo systemctl enable kill-fbcp.servicesudo systemctl start kill-fbcp.service6. Check Framebuffer DevicesTo ensure the framebuffer devices are correctly set up, check for fb0 and fb1:ls /dev/fb*You should see output similar to:/dev/fb0/dev/fb17. Add Xorg ConfigurationTo ensure the display works correctly, add a configuration file to /etc/X11/xorg.conf.d/:1. Create the configuration file:sudo nano /etc/X11/xorg.conf.d/99-fbdev.conf2. Add the following content:Section "Device" Identifier "LCD" Driver "fbdev" Option "fbdev" "/dev/fb1"EndSectionSection "Screen" Identifier "Screen0" Device "LCD" DefaultDepth 16EndSection3. Save and close the file.8. Reboot Your Raspberry PiAfter the installation is complete, reboot your Raspberry Pi to apply the changes:sudo reboot9. Verify the DisplayAfter rebooting, your Raspberry Pi 3B+ should output to the 3.5 inch LCD display. You should see the Raspberry Pi desktop environment on the screen. 10. TroubleshootingIf you encounter any issues, you can try the following steps:- Ensure the LCD is properly connected to the GPIO pins.- Re-run the installation script.- Check the LCD-show GitHub repository for any updates or additional instructions.- Reconfigure lightdm to ensure it is active:sudo dpkg-reconfigure lightdm- Use raspi-config to ensure lightdm is set as the default display manager:sudo raspi-configNavigate to Boot Options > Desktop / CLI > Desktop GUI, automatically logged in as 'pi' user.- Check for errors in the Xorg log file:cat /var/log/Xorg.0.log | grep EEExample error "Screen 0 deleted because of no matching config section" (Solution see 7. Add Xorg Configuration)[ 1740.345] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so[ 1740.345] (II) Module fbdevhw: vendor="X.Org Foundation"[ 1740.345] compiled for 1.21.1.7, module version = 0.0.2[ 1740.345] ABI class: X.Org Video Driver, version 25.2[ 1740.346] (II) FBDEV(0): using /dev/fb1[ 1740.346] (EE) Screen 0 deleted because of no matching config section.[ 1740.346] (II) UnloadModule: "fbdev"[ 1740.346] (II) UnloadSubModule: "fbdevhw"[ 1740.346] (EE) Device(s) detected, but none match those in the config file.[ 1740.346] (EE)Fatal server error:[ 1740.346] (EE) no screens found(EE)[ 1740.346] (EE)Please consult the The X.Org Foundation supportat http://wiki.x.org11. Uninstall the LCD DriverIf you need to uninstall the LCD driver and revert to the HDMI output, run the following script:cd LCD-show/sudo ./LCD-hdmiReboot your Raspberry Pi after running the script:sudo rebootConclusionYou've successfully set up and configured the 3.5 inch LCD display on your Raspberry Pi 3B+. You can now use the display for various projects and applications. For more information and advanced configurations, refer to the LCD-show GitHub repository. Log in to post comments