Forums

Pulseaudio "buffer underrun" tutorial

how to fix in Mint & Ubuntu

Auteur Réponses
booman Vendredi 7 Février 2014 à 18:39
booman

Many of us have had the "buffer underrun" error due to Pulseaudio and Alsa fighting over devices.  I did a lot of research and there was no clear solution.
Until now.

Thanks to David at Yet Another Linux Gaming Blox


Tested in Mint 16 and should work in Ubuntu 13.10 Saucey

† Booman †
Mint 19 64-bit | Nvidia 415.25 | GeForce GTX 1060
Linux for Beginners | List of Linux Games | My Games
PlayOnLinux Guides | PlayOnLinux Explained
izberion Vendredi 4 Avril 2014 à 16:50
izberionAnonymous

Hmm this didn't work for me. The manual device loading worked, but I still get the underrun errors.
petch Vendredi 4 Avril 2014 à 17:43
petch
Développeur

That means that even with PulseAudio out of the equation, your computer is too slow at refilling the soundcard's buffer, so there's "gaps" during play.
izberion Vendredi 4 Avril 2014 à 18:17
izberionAnonymous

Anyway to speed that up? It shouldn't be too slow. I like to think I have a pretty beefy computer seeing as I have 16GB of RAM and a 3.3 GHz i5
petch Vendredi 4 Avril 2014 à 18:49
petch
Développeur

As a first shot in the dark I'd say check that you use an efficient video driver, as that's one thing that's often heavily solicited by games
try closing other apps, browsers and stuff
run diagnostic tools like "top" to get an idea of what's using cpu...
Experiment with lower settings

Edité par petch

izberion Vendredi 4 Avril 2014 à 19:03
izberionAnonymous

I'll check top the next time it happens. It might be a combination of Skype, game, and Clementine, though I should have plenty of CPU and memory for that.

EDIT: Alright so when it happens, kmix jumps up to ~94% CPU usage. When it's not happening, kmix is at less than .1%

I could always remove pulseaudio and use just alsa or install jack, though I'm not sure how jack functions.

Edité par izberion

izberion Samedi 5 Avril 2014 à 9:44
izberionAnonymous

Well, so much for that. With Jack I got as far as only music audio working. With alsa alone, I couldn't get any audio going to my Megalodon, so I'm back with pulseaudio

EDIT: Ok seems like Jack with Pulseaudio has fixed it

Edité par izberion

booman Vendredi 11 Avril 2014 à 17:39
booman

My "buffer underrun" errors are gone, but performance in PlayOnLinux games are still poor.

I have tried several solutions and its still not working in Mint 16 32-bit which uses Pulseaudio 4.

I tried the tutorial, wine's suggestions, editing daemon.conf and even a custom .asoundrc script, but nothing works.

I'm going to try Mint 16 64-bit because I read that 64-bit Wine has less problems with Pulseaudio.

I never had serious audio/performance problems in Mint 13 and Mint 14. I've read that Ubuntu 13.10 has all of the same problems. Maybe I should try Ubuntu 14 beta?
Any other suggestions?

† Booman †
Mint 19 64-bit | Nvidia 415.25 | GeForce GTX 1060
Linux for Beginners | List of Linux Games | My Games
PlayOnLinux Guides | PlayOnLinux Explained
baytor Dimanche 29 Mars 2015 à 18:01
baytor

Hi, I have experienced this issue playing the beta of "Heroes of the Storm", WoW sometimes gives me that problem as well.

With the guide that Booman posted my problem seems to fix but i can't use my headset's microphone.

The problem seems to be the line "load-module module-alsa-source device=hw:0,0" (i can't record no sound).

If i change, as suggested by the author, in "load-module module-alsa-source device=hw:0,2" the result is that my microphone records what I hear in my headphone (examples: if I put on a video of any kind my microphone records the audio that is played).

I hope I was able to explain the facts clearly.

I use the last playonlinux version.

Thx
 


Mobo: ASROCK Z77 pro3; Proc: Intel(R) Core(TM) i5-3470; VideoCard: GeForce GTX 650; Ram: 2x4GiB DIMM DDR3 Synchronous 1600 MHz; Distro: Ubuntu 16.04; Desktop: Xfce4
booman Mercredi 1 Avril 2015 à 19:05
booman

Baytor - I talked with my colleague who created the tutorial, he suggested using JACK instead of Pulseaudio.  This way your mic will work.

If they want to use microphone and avoid overruns their best bet is using JACK (JACK Audio Connection Kit). They have to study the documentation and get things going, it's by far one of the best audio server if you want to have everything set up for recording, etc. It's not usb speakers friendly though. 

As for underruns themselves. Ubuntu patches their pulseaudio, I've noticed that vanilla pulseaudio (5.0) recovers from underruns quite fast thus never losing audio. I've been using Ubuntu 14.10 and only once it did a full underrun.

I personally have no experience with JACK


† Booman †
Mint 19 64-bit | Nvidia 415.25 | GeForce GTX 1060
Linux for Beginners | List of Linux Games | My Games
PlayOnLinux Guides | PlayOnLinux Explained
Ronin DUSETTE Mercredi 1 Avril 2015 à 19:14
Ronin DUSETTE
Admin

Jack is awesome, and you can integrate it very easily with Pulse, too. Pulse will route the audio while Jack takes care of everything at a lower level. As for it not being USB speaker friendly; you should be able to use any audio device that is recoginized in Linux through Jack, and subsequently, through WineASIO (which is what you really want to use if you want low latency audio via Jack).


Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
baytor Mercredi 1 Avril 2015 à 19:27
baytor

I have an USB headset.

I'll give it a shot anyway, thanks


Mobo: ASROCK Z77 pro3; Proc: Intel(R) Core(TM) i5-3470; VideoCard: GeForce GTX 650; Ram: 2x4GiB DIMM DDR3 Synchronous 1600 MHz; Distro: Ubuntu 16.04; Desktop: Xfce4
booman Mercredi 1 Avril 2015 à 19:44
booman

When the day comes and I can build my recording studio, I will be trying JACK, so I will eventually endeavor that realm


† Booman †
Mint 19 64-bit | Nvidia 415.25 | GeForce GTX 1060
Linux for Beginners | List of Linux Games | My Games
PlayOnLinux Guides | PlayOnLinux Explained