I was pleasantly surprised with how well Volumio 2 runs out of the box on my old Raspberry Pi 2 model B using an external USB DAC (in my case, Behringer UCA222). As a next step, I wanted to add a small 3.5 inch display that connects to the 26 GPIO pins of my Pi 2 B.
The setup of the 3.5" LCD screen is a bit tougher than expected, but after a lot of googling and trial and error I got the LCD touchscreen fully working with Volumio 2. It seems like the same display is sold under different brands.
These are the steps to get the display working:
- get Volumio running on your Raspberry Pi:
- install and activate Volumio on an SD card: follow the excellent guide in https://volumio.org/get-started/
- 2020-05: the latest volumio image still doesn't work for me on an old Pi 2 model B -- some issue with the overlayfs remaining stuck at 100% and causing "Dirty Bit set" error on /boot. I had to use the an image from 2018 http://updates.volumio.org/pi/volumio/2.457/volumio-2.457-2018-09-17-pi.img.zip and upgrade Volumio to the latest version(System / Check Updates). Now Volumio does work reliably.
- run the ssh daemon by going to http://volumio.local/dev/
- install and activate the Touch Display Plugin
- connect to your Raspberry Pi CLI through ssh (username: volumio; password: volumio) and execute the following commands
- download the display driver:
git clone https://github.com/goodtft/LCD-show - run these few commands (handpicked from the LCD35-show script -- do NOT run the script!):
cd LCD-show/
sudo mkdir /etc/X11/xorg.conf.d
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/tft35a.dtbo
sudo cp -rf ./usr/99-calibration.conf-35-90 /etc/X11/xorg.conf.d/99-calibration.conf
sudo mkdir -p /usr/share/X11/xorg.conf.d/
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/ - modify the 99-calibration.conf file and add the Driver "evdev" option:
- sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
- the file should be:
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3936 227 268 3880"
Option "SwapAxes" "1"
Driver "evdev"
EndSection - save the file (Control-X)
- create a new /boot/userconfig.txt (2020-05 update: this file is automatically included in /boot/config.txt by Volumio)
- sudo nano /boot/userconfig.txt
- add the single line:
dtoverlay=tft35a - save the file (Control-X)
- install missing packages:
- sudo apt update
- sudo apt install lightdm
- sudo apt install xserver-xorg-input-evdev
- fix the autologin user for lightdm (updated 2020-05)
- sudo nano /etc/lightdm/lightdm.conf
- modify the "autologin" user from "pi" to "volumio":
autologin-user=volumio - save the file (Control-X)
After a reboot, everything works fine :).
You can optionally disable the sleep mode and change the orientation of display in the Touch Display Plugin settings:
References:
- https://volumio.org/forum/101-direct-volumio-gui-raspberry-lcd-touchscreen-t3464.html
- use evdev driver: https://github.com/notro/fbtft/issues/445#issuecomment-354714529
- screen timeout: https://volumio.org/forum/screentimeout-rpi-touchscreen-t5059.html
- chromium restore tabs alert: https://superuser.com/a/864918
- older images: https://volumio.org/forum/older-volumio-versions-img-files-t7009.html
- fix playlist issues for volumio: https://volumio.org/forum/play-stops-midway-through-queue-since-444-t11180-10.html