Hardware: Raspberry Pi 3B/3B+/4B/5
Screen: Osoyoo 3.5″ SPI Touchscreen (480×320)
System: Raspberry Pi OS Bookworm (released before 2025-05-13)
Method: fbcp (Framebuffer Copy)

Burn the Raspberry Pi OS (Bookworm Version) with desktop to a TF card/micro SD card, and insert this card in your Raspberry Pi.
Download OS from: Raspberry Pi Official Website
Connect Raspberry Pi to your HDMI monitor or TV. Plug a keyboard and mouse into Raspberry Pi USB ports.

Get the Raspberry Pi connected to the Internet via WiFi or Ethernet.
For WiFi setup guide, visit: Raspberry Pi Basic Tutorial
Open terminal and enter the following command:
hostname -I

Shut down the Raspberry Pi, remove the HDMI monitor, keyboard and mouse. Then install the 3.5″ SPI screen.

Power on the Raspberry Pi with the SPI screen installed.
Use PuTTY (Windows) or terminal (Mac/Linux) to SSH into Raspberry Pi. PuTTY guide

Execute via SSH:
sudo apt install libraspberrypi-dev -y sudo apt-get install unzip cmake -y sudo wget https://osoyoo.com/driver/osoyoo35b.zip sudo unzip ./osoyoo35b.zip sudo cp osoyoo35b.dtbo /boot/overlays/ sudo wget https://osoyoo.com/driver/Rpi-fbcp.zip sudo unzip ./Rpi-fbcp.zip cd rpi-fbcp/ sudo rm -rf build sudo mkdir build cd build sudo cmake .. sudo make -j4 sudo install fbcp /usr/local/bin/fbcp




libraspberrypi-dev is required for fbcp GPU access. On RPi5, fbcp is not used.sudo nano /boot/firmware/config.txt
#dtoverlay=vc4-kms-v3d

# ========== SPI Screen Configuration ==========
dtparam=spi=on
dtoverlay=osoyoo35b:speed=20000000
hdmi_force_hotplug=1
max_usb_current=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 480 320 60 6 0 0 0
hdmi_drive=2
display_rotate=2

Save: Ctrl+X, then Y, then Enter.
sudo nano ~/.bash_profile
Add the following code:
if [ "$(cat /proc/device-tree/model | cut -d ' ' -f 3)" = "5" ]; then
# RPi 5B configuration
export FRAMEBUFFER=/dev/fb1
startx 2> /tmp/xorg_errors
else
# Non-Pi5 configuration (RPi 3/4)
export FRAMEBUFFER=/dev/fb0
fbcp &
startx 2> /tmp/xorg_errors
fi

sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf
If it exists, ensure content is:
Section "Device"
Identifier "Allwinner A10/A13 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb0"
Option "SwapbuffersWait" "true"
EndSection
sudo raspi-config nonint do_boot_behaviour B2 sudo raspi-config nonint do_wayland W1 sudo reboot

do_wayland W1 switches from Wayland to X11. SPI screens do NOT support Wayland!After desktop works, connect via SSH and install calibration software:
sudo apt-get install xserver-xorg-input-evdev xinput-calibrator -y sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf

Create calibration config:
sudo nano /usr/share/X11/xorg.conf.d/99-calibration.conf
Add:
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "241 3854 3885 240"
Option "SwapAxes" "1"
EndSection

Reboot:
sudo reboot
# Check X Server errors cat /tmp/xorg_errors # Check framebuffer devices ls -l /dev/fb* # Check if fbcp is running (RPi 3/4) ps aux | grep fbcp # Check SPI overlay dmesg | grep -i osoyoo
Error: fbcp: command not found
Solution: Re-compile fbcp:
cd ~/rpi-fbcp/build && sudo make && sudo install fbcp /usr/local/bin/fbcp
DISPLAY=:0 xinput_calibratorSave as setup-spi-fbcp.sh and run:
chmod +x setup-spi-fbcp.sh && ./setup-spi-fbcp.sh
#!/bin/bash
echo "=== RPi3/4/5 + Osoyoo 3.5 SPI Screen Setup (fbcp) ==="
sudo apt-get update
sudo apt install libraspberrypi-dev -y
sudo apt-get install -y unzip cmake
cd ~
sudo wget -q https://osoyoo.com/driver/osoyoo35b.zip
sudo unzip -o -q ./osoyoo35b.zip
sudo cp osoyoo35b.dtbo /boot/overlays/
sudo wget -q https://osoyoo.com/driver/Rpi-fbcp.zip
sudo unzip -o -q ./Rpi-fbcp.zip
cd rpi-fbcp/ && sudo rm -rf build && sudo mkdir build && cd build
sudo cmake .. && sudo make -j4 && sudo install fbcp /usr/local/bin/fbcp
cd ~
sudo sed -i 's/^dtoverlay=vc4-kms-v3d/#dtoverlay=vc4-kms-v3d/' /boot/firmware/config.txt
if ! grep -q "osoyoo35b" /boot/firmware/config.txt; then
sudo tee -a /boot/firmware/config.txt > /dev/null << 'CONF' # ========== SPI Screen Configuration ========== dtparam=spi=on dtoverlay=osoyoo35b:speed=20000000 hdmi_force_hotplug=1 max_usb_current=1 hdmi_group=2 hdmi_mode=1 hdmi_mode=87 hdmi_cvt 480 320 60 6 0 0 0 hdmi_drive=2 display_rotate=2 CONF fi cat > ~/.bash_profile << 'EOF' if [ "$(cat /proc/device-tree/model | cut -d ' ' -f 3)" = "5" ]; then export FRAMEBUFFER=/dev/fb1 startx 2> /tmp/xorg_errors
else
export FRAMEBUFFER=/dev/fb0
fbcp &
startx 2> /tmp/xorg_errors
fi
EOF
sudo raspi-config nonint do_boot_behaviour B2
sudo raspi-config nonint do_wayland W1
sudo apt-get install -y xserver-xorg-input-evdev xinput-calibrator
sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
sudo tee /usr/share/X11/xorg.conf.d/99-calibration.conf > /dev/null << 'EOF'
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "241 3854 3885 240"
Option "SwapAxes" "1"
EndSection
EOF
echo "=== Setup complete. Rebooting... ==="
sleep 3 && sudo reboot
Choose the tutorial that matches your Raspberry Pi model and OS version:
RPi 4/5 • 2025-10-01 and later
Bookworm / Trixie RPi 4/5
Bookworm / Trixie Setup Guide (RPi3-specific)
RPi 3 • Extra X11 config required • 2025-10-01 and later
Bookworm / Trixie RPi 3
RPi 3/4/5 • Before 2025-05-13
Bookworm RPi3/4/5
RPi 3/4 • LCD-show driver
Legacy RPi3/4
640×480 Virtual Resolution Guide
RPi 3 • x2fb scaling
Advanced • Trixie/Bookworm • 2025-10-01 and later
640×480 Virtual Resolution Guide
RPi 4/5 • x2fb scaling
Advanced • Trixie/Bookworm • 2025-10-01 and later
Not sure which to choose?
• Check your Pi model: cat /proc/device-tree/model
• Check your OS version: cat /etc/os-release
| Feature | RPi 3/4 | RPi 5 |
|---|---|---|
| Framebuffer | /dev/fb0 | /dev/fb1 |
| Method | fbcp | Direct |
| libraspberrypi-dev | Required | Not needed |
Need help or have feedback? Submit a ticket and our team will get back to you within 1-2 working
days. We appreciate your patience!
Working Time: 9 AM – 6 PM GMT+8 (Monday – Friday)
Contact Us: [email protected]
© 2026 Osoyoo | osoyoo.com
Last updated: 2026-02-10
DownLoad Url osoyoo.com