jbonjean / docker-public-images

Apache License 2.0
5 stars 3 forks source link

Stuttering audio since Upgrade to Ubuntu 20.04.2 #5

Open TheRealRWJ opened 3 years ago

TheRealRWJ commented 3 years ago

Would you be so kind to take a look at this issue. Can I run some kind of diagnostic in the Volumio container?

https://answers.launchpad.net/ubuntu/+source/alsa-driver/+question/698390

Volumio started stutturing audio resulting in the error message "Failed to open audio output", Volumio log states => alsa_output: Underrun on ALSA device "default"

jbonjean commented 3 years ago

Sorry I don't have much time to provide support for these Docker images, but are you sure you don't have pulseaudio running? If so, you should start volumio with pulseaudio instead of alsa.

TheRealRWJ commented 3 years ago

Thanks for your quick response.

I do not have Pulse audio installed. I will try, and let you know.

by the way: Keep building this beautifull stuff

TheRealRWJ commented 3 years ago

Found: How reset PulseAudio and ALSA on Ubuntu 20.04/20.10 URL: https://www.mind-overflow.net/post/how-to-reset-pulseaudio-and-alsa-on-ubuntu/

Apparently i did not fully remove Alsa, nor PulseAudio. I never purged it and did not use dkpg

After: sudo dpkg --purge --force-depends pulseaudio alsa-base alsa-utils and: sudo apt install pulseaudio alsa-base alsa-utils followed by a reboot playback is way better

Audio output does not completely stop after something between 5-15 seconds but Now there are 'only' hickups in the playback. about 5-10 in a 5 minute song.

Still VERY ANOYING, and but far from flawless like it used to run on 18.04.x

I still like suggestions to improve audio output

jbonjean commented 3 years ago

OK, so you (re-)installed pulseaudio. Do you use pulseaudio with volumio? Basically alsa supports only a single application, so if pulseaudio is running, it counts as an application and you shouldn't try to use alsa directly. If volumio is the only application that requires access to the sound device on your server, you can also simply remove pulseaudio.

This might not be your problem though, but this is the only obvious issue I can think of.

TheRealRWJ commented 3 years ago

Took a while before I could test again.

Set output type to "pulse" in/etc/mpd.conf and restarted the container. Startup sound was audible. When playin music an error occured:

Error Failed to enable output "Audio device" (pulse); pa_context_connect() has failed: Connection refused volumio

Is there an other way to use volumio on PulseAudio?

jbonjean commented 3 years ago

You need to expose the pulseaudio socket and cookie to the container, the instructions are on DockerHub.

maxdd commented 3 years ago

I believe the base image should be a real-time kernel. base-ubuntu-20.04 is the image on which this docker image is based so it might be worth trying a different real-time patched version. Also a real-time docker kernel running on a non real-time host is a little bit nonsense