I've bought 4inch IPS LCD from WaveShare but cannot get it run on newest Raspberry PI 2. The original DVD comes with image which isn't compatible with RPI 2.

Tried to follow this manual but without success. My LCD is newer model and not covered by notro FBTFT drivers.

Any thoughts?

  • 1
    im in the same boat will try to work this out when i have time and let you know if i come up with anything. if you have any luck getting a image or driver that works please let me know im trying to get retro pi working with this screen but no luck so far i am going to try it on my old b+ just to confirm the screen works as the only image provided is currently for that model
    – user27135
    Feb 17, 2015 at 23:26
  • The image supplied with the waveshare spotpear 4 inch screen I have just received works out of the box with the pi2 but not the zero, I can supply the image if needed
    – john jones
    Jan 21, 2016 at 20:34

5 Answers 5


I've followed instructions from http://www.circuitbasics.com/setup-lcd-touchscreen-raspberry-pi/#content. But use flexfb device instead of waveshare32b. You may keep the configuration of touch device, but have to calibrate it or rotate screen to keep it as is.

Add modules in /etc/modules as below:

flexfb width=480 height=320 regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-1,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0x36,0x28,-1,0x11,-1,0x29,-3 

fbtft_device debug=3 rotate=0 name=flexfb speed=16000000 gpios=reset:25,dc:24

Changing screen rotation is a bit tricky but possible. You have to modify value of register 0x36 at the end of init string (value 0x28 just after 0x36). In the example above there is 0x28, as well as rotate=0 below. This is for horizontal screen with power socket on upper side, touch inverted. You can try these combinations:

Reg 0x36 value | rotate value | result

0x28 | 0 | Horizontal (power socket on top)

0xF8 | 0 | Horizontal (power socket on bottom side), touch works well

0x48 | 90 | Vertical

0x84 | 90 | Vertical (opposite)

Above values are found by testing, may not be the best settings but works :)

This is my /boot/cmdline.txt file:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbtft_device.custom fbtft_device.name=flexfb fbtft_device.gpios=dc:24,reset:25 fbtft_device.bgr=1 fbtft_device.speed=16000000 fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo dma.dmachans=0x7f35 console=tty1 consoleblank=0 fbtft_device.fps=50 fbtft_device.rotate=0

Note: The Noobs distribution of Raspbian installs the root filesystem to logical partition p6 rather than the second primary partition p2. The above change to /boot/cmdline.txt assumes the filesystem is on p2. If you are using Noobs and you get a kernel panic following reboot after this change, log in using Recovery Mode and edit the line above changing root=/dev/mmcblk0p2 to root=/dev/mmcblk0p6.

and my /etc/modules entry for touch device:

ads7846_device model=7846 cs=1 gpio_pendown=17 speed=1000000 keep_vref_on=1 swap_xy=1 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900

Full thread can be found there https://github.com/notro/fbtft/issues/215

  • Awesome., It works for me.
    – devsathish
    Mar 26, 2015 at 23:52
  • @twt I've tried your solution and use 0x84 as 0x36 reg value, the orientation is Great but now it seems that i've lost red colors everything is in blue range even raspberry logo on desktop. how do i fix this?
    – dev-masih
    Jul 12, 2016 at 19:06
  • @twk setting register to 48 doesn't have the color problem. How do I know what value do I need to set?
    – dev-masih
    Jul 12, 2016 at 19:24
  • I had no problems with colors at all, can't help - sorry.
    – twk
    Jul 14, 2016 at 21:19

The manuel you used is not for a waveshare spotPear touchscreen, only a waveshare one. Try this one: http://diyhacking.com/raspberry-pi-touchscreen-lcd-tutorial/


I found a step-by-step forum that finally helped me... I have the 4inch Waveshare and a RPi B+ with Raspbian originally downloaded from the Raspberry page.

Update firmware with:

sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update

Enable SPI in raspi-config.

sudo nano /etc/modules

flexfb nobacklight regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-1,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0x36,0x28,-1,0x11,-1,0x29,-3 width=480 height=320
fbtft_device name=flexfb speed=16000000 gpios=reset:25,dc:24

sudo nano /boot/cmdline.txt


fbcon=map:1 fbcon=font:ProFont6x11

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

Change fb0 to fb1

sudo nano /boot/config.txt

Add line:


sudo nano /usr/share/X11/xorg.conf.d/99-calibration.conf (Copy-paste)

Section "InputClass"      
Identifier      "calibration"     
MatchProduct    "ADS7846 Touchscreen"      
Option  "Calibration"  "3900 240 3900 240"      
  • Welcome to Raspberry Pi! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. May 22, 2015 at 7:59
  • Thank you so much. I accidentally rotated the screen using 5 inch configurations, so I needed to recalibrate.
    – Cobbles
    Oct 8, 2015 at 13:43

I have the 4" Spotpear IPS model and a RPi zero. Now with a current Raspian version (~2016), it is not necessary to use the notro firmware anymore and you can simply use the overlay provided here. Make sure you copy the overlay to /boot/overlays/waveshare35a-overlay.dtb (Kernel < 4.4) or /boot/overlays/waveshare35a.dtbo (Kernel >= 4.4). Add an overlay entry to /boot/config.txt:


If you have problems with screwed-up colors, try lowering the SPI speed. I had funky colors with 16MHz, but up to 14MHz worked ok:


This should already give you /dev/fb1 for the LCD. You may then want to adjust your resolution to 480x320 in config.txt, using:


If you are using fbcp to copy fb1 content to fb1, you may also want to adjust the resolution of the HDMI display to 640x400 (tables here) using:


This gives you an almost-filled screen. There is some blank space horizontally, but except that, it looks fine. It may sound intriguing to use a hdmi_cvt modeline to set the resolution to the proper 480x320, but found this to NOT work very well:

hdmi_cvt=480 320 60 1 0 0 0

To make the console readable, edit /boot/cmdline.txt and add:

fbcon=map:1 fbcon=font:ProFont6x11

The display should come with a CD containing an IMG file, my 4" did. Write the IMG file to your SD card and start as normal. The write process may only work in a direct SD port, I had no luck in USB adapters.

  • 1
    The original poster already specified that the image on the DVD didn't work as it's not compatible with the Pi 2.
    – recantha
    Apr 20, 2015 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.