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:
-
Install the Touch Display plugin.
-
Download the display specific overlay:
wget https://github.com/waveshare/LCD-show/raw/master/waveshare32b-overlay.dtb
- Copy the overlay to “/boot/overlays/waveshare32b-overlay.dtbo”:
sudo cp waveshare32b-overlay.dtb /boot/overlays/waveshare32b-overlay.dtbo
- Open “boot/userconfig.txt”:
nano /boot/userconfig.txt
- Add the following lines:
dtparam=spi=on
dtoverlay=waveshare32b-overlay
It could be necessary to add a rotation value to the overlay later on.
-
Save “/boot/userconfig.txt” by typing Ctrl+x then y and Enter.
-
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
- 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
- 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
- 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.
- 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
-
Reboot.
-
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.
-
Reboot once again.
-
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.
-
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.
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.
Hey @gvolt
I have tried all of the above steps and other tutorials aswell. I have done so on several fresh installations of volumio. However after completing my screen is still just white and has never changed. Do you have any tips? I am using this display 3.2inch Resistive Touch Display (B) For Raspberry Pi, 320×240, SPI
Which Pi model are you using?
Please post the output of
cat /var/log/Xorg.0.log
When posting the output, please use code tags.
I am using a raspberry pi 3 model b v1.2
It wont allow me to send it because of links and I cannot attach it as a file either. How can i provide it to you?
volumio@volumio:~$ cat /var/log/Xorg.0.log
[ 504.367]
X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
[ 504.368] Build Operating System: Linux 5.4.0-109-generic armv8l Raspbian
[ 504.368] Current Operating System: Linux volumio 6.6.62-v7+ #1816 SMP Mon Nov 18 15:30:49 GMT 2024 armv7l
[ 504.368] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 cgroup_disable=memory snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=640 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 splash plymouth.ignore-serial-consoles dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0xF dwc_otg.nak_holdoff=1 quiet console=ttyS0,115200 console=tty1 imgpart=UUID=fb80cb44-b4d3-4b36-be35-613cba0a09fb imgfile=/volumio_current.sqsh bootpart=UUID=51B1-040D datapart=UUID=2899bccc-8620-4c7a-b56a-43fd2f7a836a uuidconfig=cmdline.txt pcie_aspm=off pci=pcie_bus_safe rootwait bootdelay=7 logo.nologo vt.global_cursor_default=0 net.ifnames=0 snd-bcm2835.enable_compat_alsa= snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1 loglevel=0 nodebug use_kmsg=no
[ 504.368] Build Date: 04 April 2023 07:50:56AM
[ 504.368] xorg-server 2:1.20.4-1+rpt4+deb10u9 (https://www.debian.org/support)
[ 504.368] Current version of pixman: 0.36.0
[ 504.368] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 504.368] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 504.368] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Jan 26 20:02:29 2025
[ 504.369] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 504.369] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 504.369] (==) No Layout section. Using the first Screen section.
[ 504.369] (==) No screen section available. Using defaults.
[ 504.369] (**) |-->Screen "Default Screen Section" (0)
[ 504.369] (**) | |-->Monitor "<default monitor>"
[ 504.371] (==) No device specified for screen "Default Screen Section".
Using the first device section listed.
[ 504.371] (**) | |-->Device "Allwinner A10/A13 FBDEV"
[ 504.371] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 504.371] (==) Automatically adding devices
[ 504.371] (==) Automatically enabling devices
[ 504.371] (==) Automatically adding GPU devices
[ 504.371] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 504.371] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 504.371] Entry deleted from font path.
[ 504.371] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/100dpi/:unscaled,
/usr/share/fonts/X11/75dpi/:unscaled,
/usr/share/fonts/X11/Type1,
/usr/share/fonts/X11/100dpi,
/usr/share/fonts/X11/75dpi,
built-ins
[ 504.371] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 504.371] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 504.371] (II) Loader magic: 0x1fdf80
[ 504.371] (II) Module ABI versions:
[ 504.371] X.Org ANSI C Emulation: 0.4
[ 504.371] X.Org Video Driver: 24.0
[ 504.371] X.Org XInput driver : 24.1
[ 504.371] X.Org Server Extension : 10.0
[ 504.373] (--) using VT number 2
[ 504.373] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[ 504.374] (II) no primary bus or device found
[ 504.374] (II) LoadModule: "glx"
[ 504.374] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 504.377] (II) Module glx: vendor="X.Org Foundation"
[ 504.378] compiled for 1.20.4, module version = 1.0.0
[ 504.378] ABI class: X.Org Server Extension, version 10.0
[ 504.378] (II) LoadModule: "fbdev"
[ 504.378] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 504.378] (II) Module fbdev: vendor="X.Org Foundation"
[ 504.378] compiled for 1.20.3, module version = 0.5.0
[ 504.378] Module class: X.Org Video Driver
[ 504.378] ABI class: X.Org Video Driver, version 24.0
[ 504.378] (II) FBDEV: driver for framebuffer: fbdev
[ 504.381] (WW) Falling back to old probe method for fbdev
[ 504.381] (II) Loading sub module "fbdevhw"
[ 504.381] (II) LoadModule: "fbdevhw"
[ 504.381] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 504.382] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 504.382] compiled for 1.20.4, module version = 0.0.2
[ 504.382] ABI class: X.Org Video Driver, version 24.0
[ 504.382] (II) FBDEV(0): using /dev/fb1
[ 504.382] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 504.382] (II) FBDEV(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 16/16
[ 504.382] (==) FBDEV(0): Depth 16, (==) framebuffer bpp 16
[ 504.382] (==) FBDEV(0): RGB weight 565
[ 504.382] (==) FBDEV(0): Default visual is TrueColor
[ 504.382] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[ 504.382] (II) FBDEV(0): hardware: fb_ili9340 (video memory: 150kB)
[ 504.382] (DB) xf86MergeOutputClassOptions unsupported bus type 0
[ 504.382] (**) FBDEV(0): Option "fbdev" "/dev/fb1"
[ 504.382] (II) FBDEV(0): checking modes against framebuffer device...
[ 504.382] (II) FBDEV(0): checking modes against monitor...
[ 504.382] (II) FBDEV(0): Virtual size is 320x240 (pitch 320)
[ 504.382] (**) FBDEV(0): Built-in mode "current"
[ 504.382] (==) FBDEV(0): DPI set to (96, 96)
[ 504.382] (II) Loading sub module "fb"
[ 504.382] (II) LoadModule: "fb"
[ 504.383] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 504.383] (II) Module fb: vendor="X.Org Foundation"
[ 504.383] compiled for 1.20.4, module version = 1.0.0
[ 504.383] ABI class: X.Org ANSI C Emulation, version 0.4
[ 504.383] (**) FBDEV(0): using shadow framebuffer
[ 504.383] (II) Loading sub module "shadow"
[ 504.383] (II) LoadModule: "shadow"
[ 504.383] (II) Loading /usr/lib/xorg/modules/libshadow.so
[ 504.383] (II) Module shadow: vendor="X.Org Foundation"
[ 504.384] compiled for 1.20.4, module version = 1.1.0
[ 504.384] ABI class: X.Org ANSI C Emulation, version 0.4
[ 504.384] (II) FBDEV(0): FBIOBLANK: Invalid argument (Screen blanking not supported by kernel - disabling)
[ 504.384] (==) FBDEV(0): Backing store enabled
[ 504.384] (==) FBDEV(0): DPMS enabled
[ 504.384] (II) Initializing extension Generic Event Extension
[ 504.385] (II) Initializing extension SHAPE
[ 504.386] (II) Initializing extension MIT-SHM
[ 504.387] (II) Initializing extension XInputExtension
[ 504.388] (II) Initializing extension XTEST
[ 504.389] (II) Initializing extension BIG-REQUESTS
[ 504.390] (II) Initializing extension SYNC
[ 504.391] (II) Initializing extension XKEYBOARD
[ 504.392] (II) Initializing extension XC-MISC
[ 504.393] (II) Initializing extension SECURITY
[ 504.394] (II) Initializing extension XFIXES
[ 504.395] (II) Initializing extension RENDER
[ 504.396] (II) Initializing extension RANDR
[ 504.398] (II) Initializing extension COMPOSITE
[ 504.399] (II) Initializing extension DAMAGE
[ 504.400] (II) Initializing extension MIT-SCREEN-SAVER
[ 504.401] (II) Initializing extension DOUBLE-BUFFER
[ 504.403] (II) Initializing extension RECORD
[ 504.404] (II) Initializing extension DPMS
[ 504.405] (II) Initializing extension Present
[ 504.406] (II) Initializing extension DRI3
[ 504.406] (II) Initializing extension X-Resource
[ 504.407] (II) Initializing extension XVideo
[ 504.408] (II) Initializing extension XVideo-MotionCompensation
[ 504.408] (II) Initializing extension SELinux
[ 504.408] (II) SELinux: Disabled on system
[ 504.408] (II) Initializing extension GLX
[ 504.409] (II) AIGLX: Screen 0 is not DRI2 capable
[ 504.548] (II) IGLX: Loaded and initialized swrast
[ 504.548] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[ 504.548] (II) Initializing extension XFree86-VidModeExtension
[ 504.549] (II) Initializing extension XFree86-DGA
[ 504.550] (II) Initializing extension XFree86-DRI
[ 504.550] (II) Initializing extension DRI2
[ 504.734] (II) config/udev: Adding input device ADS7846 Touchscreen (/dev/input/event0)
[ 504.734] (**) ADS7846 Touchscreen: Applying InputClass "evdev touchscreen catchall"
[ 504.734] (**) ADS7846 Touchscreen: Applying InputClass "evdev touchscreen catchall"
[ 504.734] (**) ADS7846 Touchscreen: Applying InputClass "Touch rotation"
[ 504.734] (**) ADS7846 Touchscreen: Applying InputClass "calibration"
[ 504.734] (II) LoadModule: "evdev"
[ 504.734] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[ 504.735] (II) Module evdev: vendor="X.Org Foundation"
[ 504.736] compiled for 1.20.3, module version = 2.10.6
[ 504.736] Module class: X.Org XInput Driver
[ 504.736] ABI class: X.Org XInput driver, version 24.1
[ 504.736] (II) Using input driver 'evdev' for 'ADS7846 Touchscreen'
[ 504.736] (**) ADS7846 Touchscreen: always reports core events
[ 504.736] (**) evdev: ADS7846 Touchscreen: Device: "/dev/input/event0"
[ 504.736] (--) evdev: ADS7846 Touchscreen: Vendor 0 Product 0x1ea6
[ 504.736] (--) evdev: ADS7846 Touchscreen: Found absolute axes
[ 504.736] (--) evdev: ADS7846 Touchscreen: Found x and y absolute axes
[ 504.736] (--) evdev: ADS7846 Touchscreen: Found absolute touchscreen
[ 504.736] (**) Option "SwapAxes" "1"
[ 504.736] (II) evdev: ADS7846 Touchscreen: Configuring as touchscreen
[ 504.736] (**) Option "EmulateThirdButton" "1"
[ 504.736] (**) Option "EmulateThirdButtonTimeout" "1000"
[ 504.736] (**) Option "EmulateThirdButtonMoveThreshold" "300"
[ 504.736] (**) evdev: ADS7846 Touchscreen: YAxisMapping: buttons 4 and 5
[ 504.736] (**) evdev: ADS7846 Touchscreen: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[ 504.736] (**) Option "config_info" "udev:/sys/devices/platform/soc/3f204000.spi/spi_master/spi0/spi0.1/input/input0/event0"
[ 504.736] (II) XINPUT: Adding extended input device "ADS7846 Touchscreen" (type: TOUCHSCREEN, id 6)
[ 504.736] (II) evdev: ADS7846 Touchscreen: initialized for absolute axes.
[ 504.737] (**) ADS7846 Touchscreen: (accel) keeping acceleration scheme 1
[ 504.737] (**) ADS7846 Touchscreen: (accel) acceleration profile 0
[ 504.737] (**) ADS7846 Touchscreen: (accel) acceleration factor: 2.000
[ 504.737] (**) ADS7846 Touchscreen: (accel) acceleration threshold: 4
[ 504.739] (II) config/udev: Adding input device ADS7846 Touchscreen (/dev/input/mouse0)
[ 504.739] (**) ADS7846 Touchscreen: Applying InputClass "calibration"
[ 504.739] (II) No input driver specified, ignoring this device.
[ 504.739] (II) This device may have been added with another device file.
Please post the output of
ls -al /dev/fb*
cat /boot/userconfig.txt
and
cat /usr/share/X11/xorg.conf.d/99-fbturbo.conf