Skipping choppy audio on Raspberry Pi 3 running Ubuntu MATE 16.04

Help
I’m having trouble with skipping choppy audio on my Raspberry Pi 3 running Ubuntu MATE 16.04 LTS.
At 1st I didn’t have any audio at all, but I found this post that suggested I add hdmi_drive=2 to the config.txt file. That fixed the no audio problem, but now the audio is constantly skipping and popping.
This happens with all apps including the system sound hardware test page.

Any Ideas?

1 Like

Hi @Eppster,

try installing the following package via the terminal (Ctrl + Alt + t):

sudo apt-get install libxine2-all-plugins

I’m not sure if sudo apt-get works on Raspi?. :smiley:

I installed those and I still have issues, I even switched the output to the analog out via the headphone jack, this also didn’t help. It has to be a issue with the sound driver because my copy of Kodi runs fine.

It might be a codecs issue but I really don’t know?, try taking a look on the Raspi pages as I don’t have one and cannot really help you further!:

Eppster, I have the same issue. I have several OS images that I use and the problem only occurs under Ubuntu Mate. And it is constant.

Wolfman, The doc page you suggested only shows how to switch from DVI mode to HDMI mode. Which does not solve the problem.

I have tried all suggestions listed above with no joy. I have also updated deleted and replaced the codecs without fixing it.

The only fix I have is to use a external Bluetooth receiver and skip the internal sound card.
It has to be a driver compatibility issue of some kind.

It is pulseaudio related !
Did you use audio jack ? Or HDMI ?
PulseAudio server is too slow even on pi3 on Ubuntu mate, so sound is choppy and not sync on mine.
The solutions are uninstall pulseaudio and go back to alsa but I don’t find any clean way to do it. (It work but problem with audio widget)
Or configure pulseaudio to optimize it. It is possible I try a little bit but without results.
Use lubuntu instead Ubuntu mate, lubuntu use alsa by default not pulaudio and it work great :slight_smile:

Using Debian Mate here but I found that renicing pulseaudio to -11 to give it much higher priority stopped all my track skipping issues.
Cheers.

I’m interested ! How did you do that ? What files did you edit ? Thanks :slight_smile:

I no longer recall exactly as it was a long while ago and has remained persistent and, it isn’t in my bash history any more but ‘renice’ is most likely.
My problem was skipping during playback on Clementine and one of the other things I do remember doing it increasing the buffer for that too, it is currently on 12000ms.

https://en.wikipedia.org/wiki/Nice_(Unix)

Seems I did something with rtkit a some point as this is in my journalctl and sets pulseaudio to high priority.

Aug 31 12:20:49 good-old-music systemd[1]: Starting RealtimeKit Scheduling Policy Service…
Aug 31 12:20:49 good-old-music dbus[1719]: [system] Successfully activated service ‘org.freedesktop.RealtimeKit1’
Aug 31 12:20:49 good-old-music systemd[1]: Started RealtimeKit Scheduling Policy Service.
Aug 31 12:20:49 good-old-music rtkit-daemon[2750]: Successfully called chroot.
Aug 31 12:20:49 good-old-music rtkit-daemon[2750]: Successfully dropped privileges.
Aug 31 12:20:49 good-old-music rtkit-daemon[2750]: Successfully limited resources.
Aug 31 12:20:49 good-old-music rtkit-daemon[2750]: Running.
Aug 31 12:20:49 good-old-music rtkit-daemon[2750]: Watchdog thread running.
Aug 31 12:20:49 good-old-music rtkit-daemon[2750]: Canary thread running.
Aug 31 12:20:51 good-old-music rtkit-daemon[2750]: Successfully made thread 2749 of process 2749 (n/a) owned by ‘1000’ high priority at nice level -11.
Aug 31 12:20:51 good-old-music rtkit-daemon[2750]: Supervising 1 threads of 1 processes of 1 users.

As indicated in https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting

Use
load-module module-udev-detect tsched=0
in
/etc/pulse/default.pa

This fixes the choppy audio

2 Likes

Are there any fixes or other work-around for this? I have been unable to solve my chopping audio problem on my RPi3 running Mate 16.04. I am tempted to ditch Mate for Raspbian, though I really don’t want to. I tried upgrading to kernel 4.4.20-v7; installing libxine2-all-plugins; changing pulseaudio’s niceness; and both tsched=0 and tsched=1 as described above in various files. I still get chopping audio, escpecially at the beginning of an piece of video or audio. I am using VLC with the “OpenMAX IL video output” module.

Hi,
I didn’t find a clean way.
You can uninstall pulseaudio but it is not very clean.
If you use vlc you can set the audio output to “alsa” in the parameters so you will have good sound after. It will fix the problem for vlc.

Hi. I’m new to Raspberry and found Ubuntu Mate 16.04 the ALMOST perfect O.S. for it. The only problem is the sound, anyone found a solution to this? I’m using Pi 3 Model B.

Thanks!

Perfect solution! Works like a charm :slight_smile:

2 Likes

great.. this is perfectly working..
even on ubuntu-mate 18.04 for raspberry.

Thanks for this.
Worked on Rasperry Pi 4 2GB RAM wih ubuntu mate installed.
Every time i opened Kodi sound was glitched/skipped.
Just added tsched=0 in line 52 of this file: /etc/pulse/default.pa
right next to the load-module module-udev-detect