@Wheaten & @supercrab Thanks! I checked the connection and measured exact 5V. I’m grabbing it from the GPIO pins on the allo Piano 2.1 DAC. That worked without issues before on Volumio 2 using pydPiper.
I now also went the manual route of installing the plugin as suggested. The alsa issue seems to be fixed but the result on the OLED is still the same. I can still see that flickering/distorted image always rolling upwards like on an old TV. Sometimes it even goes full white.
What is your setting in /boot/userconfig.txt
for:
dtparam=i2c_arm_baudrate=
The only time I’ve seen garbled output is when there are multiple mpd_oled
processes running. You could try killall mpd_oled
just to rule that out. If you’re seeing this with mpd_oled
itself then it might be something wrong with the screen? You could always buy another cheap OLED screen to test it’s not software related.
It is possible that mpd_oled has issues with some SSD1309 displays. See: OLED spectrum display on Volumio on Raspberry Pi Zero W - #281 by Adrii
This is a possibility, I’ve have some SSD1309 2.4inch displays and they work OK. I had to connect to all the pins on the screen including the reset pin…
@Wheaten: Baud rate is currently set to 800000.
@Adrii & @supercrab I could potentially try another one for sure. Do you know a model that works?
Thanks so far for your help!
Your issue sounds similar to, but not exactly the same as, the scrolling issue I linked to, so mpd_oled_dev might work with your current OLED GitHub - antiprism/mpd_oled_dev: mpd_oled development version (unstable)
Any cheap i2c OLED display 0.96 inches with just VCC, GND, data and clock pins.
@Adrii: Soo… I got some progress here with the dev version but some issues seem to occur on the installation.
First the display now seems to run properly. I can see time, date and IP without any flickering which is perfect!
However:
- While playing something it doesn’t change to the playing view (only did once but never again)
- Cava seems not to be working (see below)
I followed the exact steps of the dev installation for Volumio 3 by source and noticed the following:
The configure command in the cava directory throws some errors, not sure if they mean something:
volumio@volumio:~/cava$ ./configure --disable-input-portaudio --disable-input-sndio --disable-output-ncurses --disable-input-pulse --program-prefix=mpd_oled_
configure: WARNING: No alsa dev files found building without alsa support
checking for sqrt in -lm... yes
checking for fftw_execute in -lfftw3... yes
./configure: line 10468: syntax error near unexpected token `have_opengl=yes,'
./configure: line 10468: ` AX_CHECK_GL(have_opengl=yes, have_opengl=no)'
make does not seem to find a Makefile in the cava directory:
volumio@volumio:~/cava$ make
make: *** No targets specified and no makefile found. Stop.
volumio@volumio:~/cava$ dir
CAVACORE.md Makefile.in ar-lib cava.psf compile config.log debug.h install-sh output util.h
CONTRIBUTING.md README.md autogen.sh cavacore.c config.c config.sub depcomp ltmain.sh run_all_tests.sh version
LICENSE SHADERS.md autom4te.cache cavacore.h config.guess configure example_files m4 third_party
Makefile.am aclocal.m4 cava.c cavacore_test.c config.h configure.ac input missing todo
Thus mpd_oled does not seem to find cava:
volumio@volumio:~$ sudo systemctl status mpd_oled
● mpd_oled.service - MPD OLED Display
Loaded: loaded (/etc/systemd/system/mpd_oled.service; enabled; vendor preset:
Active: active (running) since Thu 2022-11-17 15:23:25 UTC; 2min 32s ago
Process: 507 ExecStartPre=/usr/local/bin/mpd_oled_launch_test (code=exited, st
Main PID: 524 (mpd_oled)
Tasks: 3 (limit: 2133)
CGroup: /system.slice/mpd_oled.service
└─524 /usr/local/bin/mpd_oled -o SSD1309,128X64,I2C -b 10 -g 1 -f 20
Nov 17 15:23:25 volumio systemd[1]: Starting MPD OLED Display...
Nov 17 15:23:25 volumio systemd[1]: Started MPD OLED Display.
Nov 17 15:25:20 volumio mpd_oled[524]: sh: 1: mpd_oled_cava: not found
@supercrab I have a 0.96 inch oled but need to use 2.42 one for my case so I was hoping for a 2.42 version that works but seems like it’s just the driver.
I’ve had no problems with the normal version of mpd_oled
with my 2.4 inch screens
Wonder why it’s not working for you
Hi Zhapox
cava now needs extra packages installed, but I haven’t updated the development instructions (I’ll do this now). Install these packages with
sudo apt install build-essential autoconf make libtool libfftw3-dev libiniparser-dev libmpdclient-dev libi2c-dev lm-sensors libasound2-dev
Then, delete the cava directory, and run the instructions to build and install cava again
mpd_oled/install_volumio3_source.md at master · antiprism/mpd_oled · GitHub
Now you should be able to run mpd_oled.
Adrian.
@Zhapox I meant to say, thatnks for the detailed report that made it easy to see what the problem was!
Hi Adrian,
No worries, I’m glad if I can help and thank you for yours!
I now tried the steps you suggested but the outcome still seems to be the same.
volumio@volumio:~$ sudo apt install build-essential autoconf make libtool libfftw3-dev libiniparser-dev libmpdclient-dev libi2c-dev lm-sensors libasound2-dev
[sudo] password for volumio:
Reading package lists... Done
Building dependency tree
Reading state information... Done
autoconf is already the newest version (2.69-11).
build-essential is already the newest version (12.6).
libfftw3-dev is already the newest version (3.3.8-2).
libi2c-dev is already the newest version (4.1-1).
libiniparser-dev is already the newest version (4.1-4).
libmpdclient-dev is already the newest version (2.16-1).
libtool is already the newest version (2.4.6-9).
lm-sensors is already the newest version (1:3.5.0-3).
make is already the newest version (4.2.1-1.2).
Suggested packages:
libasound2-doc
The following NEW packages will be installed:
libasound2-dev
0 upgraded, 1 newly installed, 0 to remove and 47 not upgraded.
Need to get 145 kB of archives.
After this operation, 546 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.raspberrypi.org/debian buster/main armhf libasound2-dev armhf 1.1.8-1+rpt2 [145 kB]
Fetched 145 kB in 0s (661 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libasound2-dev:armhf.
(Reading database ... 36493 files and directories currently installed.)
Preparing to unpack .../libasound2-dev_1.1.8-1+rpt2_armhf.deb ...
Unpacking libasound2-dev:armhf (1.1.8-1+rpt2) ...
Setting up libasound2-dev:armhf (1.1.8-1+rpt2) ...
I then deleted and downloaded cava again and ran the following:
volumio@volumio:~/cava$ ./autogen.sh
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
libtoolize: putting macros in 'm4'.
libtoolize: linking file 'm4/libtool.m4'
libtoolize: linking file 'm4/ltoptions.m4'
libtoolize: linking file 'm4/ltsugar.m4'
libtoolize: linking file 'm4/ltversion.m4'
libtoolize: linking file 'm4/lt~obsolete.m4'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
configure.ac:4: installing './ar-lib'
configure.ac:4: installing './compile'
configure.ac:5: installing './config.guess'
configure.ac:5: installing './config.sub'
configure.ac:2: installing './install-sh'
configure.ac:2: installing './missing'
Makefile.am: installing './depcomp'
volumio@volumio:~/cava$ ./configure --disable-input-portaudio --disable-input-sndio --disable-output-ncurses --disable-input-pulse --program-prefix=mpd_oled_
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for gcc option to accept ISO C99... none needed
checking for gcc option to accept ISO Standard C... (cached) none needed
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking for snd_pcm_open in -lasound... yes
checking for sqrt in -lm... yes
checking for fftw_execute in -lfftw3... yes
./configure: line 10468: syntax error near unexpected token `have_opengl=yes,'
./configure: line 10468: ` AX_CHECK_GL(have_opengl=yes, have_opengl=no)'
volumio@volumio:~/cava$ make
make: *** No targets specified and no makefile found. Stop.
volumio@volumio:~/cava$ dir
CAVACORE.md ar-lib compile debug.h output
CONTRIBUTING.md autogen.sh config.c depcomp run_all_tests.sh
LICENSE autom4te.cache config.guess example_files third_party
Makefile.am cava.c config.h input todo
Makefile.in cava.psf config.log install-sh util.h
README.md cavacore.c config.sub ltmain.sh version
SHADERS.md cavacore.h configure m4
aclocal.m4 cavacore_test.c configure.ac missing
@Adrii Seems like I figured something out. I ran below install command I found directly on the cava GitHub page:
apt install libfftw3-dev libasound2-dev libncursesw5-dev libpulse-dev libtool automake autoconf-archive libiniparser-dev libsdl2-2.0-0 libsdl2-dev
Looks like something was missing before as now the configuration file no longer threw that syntax error and the Makefile was also there so I could successfully complete the install. However when I play music the display still stays on the clock and does not switch to the play screen. If I restar the mpd_oled while playing a song it will change to the playing screen showing the playing title but it’s completely stuck. Clock, text scroll, progress bar, cava, nothing moves.
If the mpd_oled screen is stuck then see if the time changes, if not then mpd_oled has crashed.
I’ll review the install instructions later today to see if they need changes for the latest versions of Volumio and cava.
So, these are the symptoms I see during the below actions:
-
Volumio gets booted and let rest without playing any music. Mpd_oled shows time, date & IP and time gets updated correctly.
-
After a while I start playing music, a wave file from a CIFS share. Mpd_oled remains on the time screen, time no longer seems to get updated, assuming crash.
-
During the music playback mpd_oled gets manuall restarted, now showing title, progress bar and time but all of it is immediately frozen. No text scrolling, no progress bar moving, no Cava, no time update, assuming immediate crash.
-
Then I paused music and restarted mpd_oled again. Now the playback screen returned with time being updated, text of the paused track being scrolling. However as soon as I press play again it crashes again with symptoms of point 3.
I have just installed the Volumio 3 mpd_oled plugin from the store. I used the headphone jack on a Pi4, and I am not affected by the stuttering, so it will be hard for me to investigate it. In which case, I will look at modifying the plugin to use ALSA loopback (but can’t say when this will be).
Adrian.
@Zhapox the cava SDL GLSL dependency appears to be unintended, and I have opened an issue.
I believe the mpd_oled behaviour you are seeing is cava crashing, because I was accidentally using the current cava version that I had built from the plugin mpd_oled (because I installed mpd_oled_cava in /usr/local/bin) and I was seeing similar behaviour.
I’ll look into what is happening, but for now you could try installing an older version of cava. see
[PLUGIN] MPD OLED - installation & configuration plugin - #222 by Adrii
Adrian.
Thank for effort… Now I’m busy with home restructure and I’ve no time to play with volumio… I’ll come back in some day, I’ll reinstall it and will see…
There’s a version of cava bundled in the plugin. Not sure what version it is mind.