OLED plugin with 2.42" display

After updating to the test version 3.699, I had problems with the proper operation of the 2.42" OLED display with the mpd_oled 1.1.2 plug-in.

In v. 3.695, everything worked without any problems.

I use Rpi 4b

I went back to stable version 3.661 (which I have on my second SD card) and the display works perfectly

1 Like

Hey @rak39,

Have you had a chance to capture the debug log? Or some technical details or errors?

Kind Regards,

Hello,
The OLED display shows nothing and playback stops shortly after it starts.

Here is the log:
http://logs.volumio.org/volumio/7EIGLmZ.html

Kind Regards,

Hey @rak39 ,

The line in the debug log: May 31 22:42:59 volumio volumio[1116]: error: [MPD_OLED Plugin] Could not start mpd_oled_plugin service: Error: Command failed: /usr/bin/sudo /bin/systemctl start mpd_oled_plugin.service.

Let’s dig a bit further and find why it is happening:

Login with ssh client as volumio user to you Rpi.
post the system unit output from: systemctl status mpd_oled_plugin.service

Kind Regards,

Hello @nerd ,
here is my system unit output:

Welcome to Volumio for Raspberry Pi (6.1.77-v7l+ armv7l)
volumio@volumio:~$ systemctl status mpd_oled_plugin.service
● mpd_oled_plugin.service - MPD OLED Plugin
Loaded: loaded (/etc/systemd/system/mpd_oled_plugin.service; disabled; vendor
Active: inactive (dead)

Best regards,

Hey @rak39 ,

systemctl restart mpd_oled_plugin.service && systemctl status mpd_oled_plugin.service

What does it say now?

hello @nerd,

Welcome to Volumio for Raspberry Pi (6.1.77-v7l+ armv7l)
Last login: Sat Jun 1 08:43:05 2024 from 192.168.0.115
volumio@volumio:~$ systemctl restart mpd_oled_plugin.service & systemctl status mpd_oled_plugin.service
[1] 2623
● mpd_oled_plugin.service - MPD OLED Plugin
Loaded: loaded (/etc/systemd/system/mpd_oled_plugin.service; disabled; vendor
Active: inactive (dead)

second probe:

Volumio Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Welcome to Volumio for Raspberry Pi (6.1.77-v7l+ armv7l)
Last login: Sat Jun 1 09:11:56 2024 from 192.168.0.115
volumio@volumio:~$ systemctl restart mpd_oled_plugin.service && systemctl status mpd_oled_plugin.service
● mpd_oled_plugin.service - MPD OLED Plugin
Loaded: loaded (/etc/systemd/system/mpd_oled_plugin.service; disabled; vendor
Active: active (running) since Sat 2024-06-01 09:12:41 CEST; 54ms ago
Main PID: 1788 (mpd_oled_plugin)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/mpd_oled_plugin.service
β”œβ”€1788 /bin/bash /tmp/mpd_oled_plugin.sh
└─1789 /usr/bin/mpd_oled -o 7 -b 32 -g 1 -f 50 -s 8,5 -C 0 -P p -c fi

Jun 01 09:12:41 volumio systemd[1]: Started MPD OLED Plugin.

Now it works.

I try restart


after restart the problem returns

Hey @rak39 ,

What is the content of:
/etc/systemd/system/mpd_oled_plugin.service
/tmp/mpd_oled_plugin.sh

Kind Regards,

Hey @nerd

volumio@volumio:~$ /etc/systemd/system/mpd_oled_plugin.service
-bash: /etc/systemd/system/mpd_oled_plugin.service: Permission denied
volumio@volumio:~$ /tmp/mpd_oled_plugin.sh
/tmp/mpd_oled_plugin.sh: line 3: 1732 Segmentation fault /usr/bin/mpd_oled -o 7 -b 32 -g 1 -f 50 -s 8,5 -C 0 -P p -c fifo,/tmp/mpdoledfifo -B 1 -r 25 -D 24 -S 0
volumio@volumio:~$

Kind Regards,

Hey @rak39 ,

The actual commands would be:

sudo cat /etc/systemd/system/mpd_oled_plugin.service
sudo cat /tmp/mpd_oled_plugin.sh

BTW: Moved to the plugin section, for the authors visibility.

hey @nerd,
Thank you for your help and patience.

I have followed these commands but after reboot the problem still persists.

Something is blocking the start of the plug-in that supports the OLED display, but this only happens in the test version of Volumio 3.699.

I also noticed that when the problem occurs, I press the save button in the mpd_oled plugin settings (without changing any settings) and everything starts working properly, but turning the plugin off and on again does not help.

In stable version 3.661, all this still works without problems, so I’ll go back to it for now.

For over a year, the MPD_OLED 1.1.2 plug-in has been working perfectly for me in all versions of Volumio (both stable and test) up to and including 3.695.

I think the problem is somewhere in the details in version 3.699

Best Regards

Hey @rak39 ,

Can you post results from commands?

sudo cat /etc/systemd/system/mpd_oled_plugin.service

sudo cat /tmp/mpd_oled_plugin.sh

I have suspicion that one or the other may make a call to a deprecated function.

Kind Regards,

hey @nerd,

Volumio Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Welcome to Volumio for Raspberry Pi (6.1.77-v7l+ armv7l)
volumio@volumio:~$ sudo cat /etc/systemd/system/mpd_oled_plugin.service
[sudo] password for volumio:
[Unit]
Description=MPD OLED Plugin
After=network.target mpd.service
Requires=mpd.service

[Service]
ExecStart=/tmp/mpd_oled_plugin.sh

[Install]
WantedBy=multi-user.target
volumio@volumio:~$ sudo cat /tmp/mpd_oled_plugin.sh
#!/bin/bash

    /usr/bin/mpd_oled  -o 7 -b 32 -g 1 -f 50 -s 8,5 -C 0 -P p -c fifo,/tmp/mpdoledfifo -B 1 -r 25 -D 24 -S 0volumio@volumio:~$

Hey @rak39 ,

Actually, this has helped a lot. As usual, the devil lives in the details. I think I understand now where the process recycle may break the system unit hierarchy.

Lastly - which exactly OLED display model are using?

Kind Regards,

Hey @nerd,

It is oled display Waveshare 2.42" from Aliexpress:

Best Regards

I confirm the issue with mpd_oled on v3.699, I reproduced it

I can help testing for finding a fix

Hello @Darmur,

I’m not very advanced, but I can try to help you solve this problem.
What first step should I take?

I think that only the authors of the plugin: supercrab, antiprism and balbuze can really help, because in my opinion the problem is in the new version of Volumio 3.699

Hey @rak39 ,

The key issue is that the plugin uses unsafe mpd service unit recycle. A quick pick into the other plugins reveals similar, not reported yet problems that will surface.

I am testing fix for all of above.

Kind Regards,

This is great news, because version 3.699 looks very promising.

Kind Regards,

@rak39 please try with version 3.701