Display Raspberry Pi 3.2inch LCD 320x240 Resistive Touch Screen (9201)

hello can you please tell me how to set up the display Raspberry Pi 3.2inch LCD 320x240 Resistive Touch Screen (9201).
Volumio 3

Assuming that this “Waveshare 3.2inch RPi LCD (B)” is your display and that you are starting from a fresh Volumoi 3 installation try the following:

  1. Install the Touch Display plugin.

  2. Download the display specific overlay:

wget https://github.com/waveshare/LCD-show/raw/master/waveshare32b-overlay.dtb

  1. Copy the overlay to “/boot/overlays/waveshare32b-overlay.dtbo”:

sudo cp waveshare32b-overlay.dtb /boot/overlays/waveshare32b-overlay.dtbo

  1. Open “boot/userconfig.txt”:

nano /boot/userconfig.txt

  1. Add the following lines:
dtparam=spi=on
dtoverlay=waveshare32b-overlay

It could be necessary to add a rotation value to the overlay later on.

  1. Save “/boot/userconfig.txt” by typing Ctrl+x then y and Enter.

  2. Download “99-calibration.conf-32” as it might be necessary to calibrate the screen:

wget https://raw.githubusercontent.com/waveshare/LCD-show/master/etc/X11/xorg.conf.d/99-calibration.conf-32

  1. Create “/etc/X11/xorg.conf.d” in case it’s missing and copy “99-calibration.conf-32” to “/etc/X11/xorg.conf.d/99-calibration.conf”:

sudo mkdir -p /etc/X11/xorg.conf.d
sudo cp 99-calibration.conf-32 /etc/X11/xorg.conf.d/99-calibration.conf

  1. Download “99-fbturbo.conf” if this file should be missing from “/usr/share/X11/xorg.conf.d”:

sudo wget https://raw.githubusercontent.com/waveshare/LCD-show/master/usr/share/X11/xorg.conf.d/99-fbturbo.conf -P /usr/share/X11/xorg.conf.d

  1. Open “/usr/share/X11/xorg.conf.d/99-fbturbo.conf” with

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

and change

Driver "fbturbo"

to

Driver "fbdev"

If the file should contain

Option "fbdev" "/dev/fb0"

change it to

Option "fbdev" "/dev/fb1"

Save the file hitting Ctrl-x, y and Enter.

  1. For touch function you probably need to install “xserver-xorg-input-evdev” running

sudo apt-get install xserver-xorg-input-evdev

and then execute

sudo cp /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf

  1. Reboot.

  2. If the display should not have the orientation you are looking for, add a rotation parameter to the overlay in “/boot/userconfig.txt” so it looks something like this:

dtoverlay=waveshare32b:rotate=90

This would rotate the display (not touch) by 90 degrees clockwise.

  1. Reboot once again.

  2. If the display rotation appears to be correct now, check if the touch function is already properly aligned to the display. If this should not the be case try to find out by what amount touch has to be rotated. Then head over to the Touch Display’s configuration page and set this value in the rotation setting.

  3. Reboot and check if touch is properly aligned to the display now. It is possible that setting the rotation in the prior step does not suffice. This would be the case if the screen’s touch axes are inverted or swapped which is not uncommon on these kind of screens… Then you would have to find out how the axes are inverted or swapped to be able to find a correction.

Edit: Inserted an additional step as a new number 9.

2 Likes


seems something went wrong coping this part to Volumio: Looks like you copied only: “wget https://raw.githubusercontent.com/waveshare/LCD-
Please copy this string below in full.

wget https://raw.githubusercontent.com/waveshare/LCD-show/master/etc/X11/xorg.conf.d/99-calibration.conf-32

как изменить

Driver "fbturbo"

к

Driver "fbdev"

и

Option "fbdev" "/ dev / fb0"

к

Option "fbdev" "/ dev / fb1"

там пусто?

In Russian?

Translated:
how to change
Driver “fbturbo”
To
Driver “fbdev”
and
Option “fbdev” “/ dev / fb0”
To
Option “fbdev” “/ dev / fb1”
it’s empty there?

how to change

Driver “fbturbo”

To

Driver “fbdev”

and

Option “fbdev” “/ dev / fb0”

To

Option “fbdev” “/ dev / fb1”

it’s empty there?

Please in english…

Thank you @Wheaten:

@Wheaten: It is not a setting in “99-calibration.conf”, but in “/usr/share/X11/xorg.conf.d/99-fbturbo.conf”.

@Alex18 If the file “/usr/share/X11/xorg.conf.d/99-fbturbo.conf” is empty, it does not exist yet.

You can download and copy it to “/usr/share/X11/xorg.conf.d”:

wget https://raw.githubusercontent.com/waveshare/LCD-show/master/usr/share/X11/xorg.conf.d/99-fbturbo.conf

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

Then edit the file as described. (The downloaded file aready has “fb1”).

@gvolt Was not my remark, but the translation of Alex18

There are copy and paste errors in that there are blanks after/around the slashes. The line has to read

Option "fbdev" "/dev/fb1"

Sorry about that. I have corrected post #2 accordingly.

thank you very much.

Thank you very much for the feedback.

For future readers, I have added a new step 9 to post #2 regarding the possible need to download “99-fbturbo.conf”.

How to flip the display 180 degrees?

See post #2 step 13 and set the rotattion value to 180 accordingly.